Skip to content

Commit

Permalink
GITBOOK-137: No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
mouuii authored and gitbook-bot committed Sep 19, 2024
1 parent 997328a commit 56c3af4
Show file tree
Hide file tree
Showing 4 changed files with 708 additions and 2 deletions.
1 change: 1 addition & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
* [5.10 多版本和序列化](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-wu-zhang-apimachinery/5.10-duo-ban-ben-he-xu-lie-hua.md)
* [5.11 Scheme 解析](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-wu-zhang-apimachinery/5.11-scheme-jie-xi.md)
* [5.12 k8s api-changes(翻译)](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-wu-zhang-apimachinery/5.12-k8s-apichanges-fan-yi.md)
* [5.13 序列化器与序列化器工厂](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-wu-zhang-apimachinery/5.13-xu-lie-hua-qi-yu-xu-lie-hua-qi-gong-chang.md)
* [5.13 k8s API Codec 解析](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-wu-zhang-apimachinery/5.13-k8s-api-codec-jie-xi.md)
* [第六章: kubelet 源码分析](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-liu-zhang-kubelet-yuan-ma-fen-xi.md)
* [第七章: kubeproxy 源码分析](k8s-yuan-ma-ren-cai-fu-hua-xun-lian-ying/di-qi-zhang-kubeproxy-yuan-ma-fen-xi.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (c *Controller) syncService(logger klog.Logger, key string) error {

声明了两个切片 slicesToDelete , map slicesByAddressType

1. 检查 endpointSlice 的 AddressType ,没匹配到类型的加入到 slicesToDelete 数组等待删除。匹配到响应的地址类型的 endpointSlice 加入到 slicesByAddressType 数组
1. 检查 endpointSlice 的 AddressType ,不再支持的类型的加入到 slicesToDelete 等待删除,支持的加入 slicesByAddressType 。
2. 不同地址类型的 endpointSlice 都会调用 r.reconcileByAddressType() 函数去调谐,传的参数里面就包含了地址类型。

```go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru

#### 跟数据库进行交互

[Kubernetes APIServer Storage 框架解析](https://hackerain.github.io/2020/09/19/kubernetes/kube-apiserver-storage-overview.html) 这篇文章中,就介绍过API对象是怎么存储到数据库中的,其中,在为每个API资源构建`etcd store`时,会通过 `DefaultStorageFactory` 来为其构建存储配置,而Codec相关的逻辑就在这:
在为每个API资源构建`etcd store`时,会通过 `DefaultStorageFactory` 来为其构建存储配置,而Codec相关的逻辑就在这:

```go
// k8s.io/apiserver/pkg/server/storage/storage_factory.go
Expand Down
Loading

0 comments on commit 56c3af4

Please sign in to comment.