You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatic merge from submit-queue (batch tested with PRs 50016, 49583, 49930, 46254, 50337)
Alpha Dynamic Kubelet Configuration
Feature: kubernetes/enhancements#281
This proposal contains the alpha implementation of the Dynamic Kubelet Configuration feature proposed in ~#29459~ [community/contributors/design-proposals/dynamic-kubelet-configuration.md](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md).
Please note:
- ~The proposal doc is not yet up to date with this implementation, there are some subtle differences and some more significant ones. I will update the proposal doc to match by tomorrow afternoon.~
- ~This obviously needs more tests. I plan to write several O(soon). Since it's alpha and feature-gated, I'm decoupling this review from the review of the tests.~ I've beefed up the unit tests, though there is still plenty of testing to be done.
- ~I'm temporarily holding off on updating the generated docs, api specs, etc, for the sake of my reviewers 😄~ these files now live in a separate commit; the first commit is the one to review.
/cc @dchen1107@vishh@bgrant0607@thockin@derekwaynecarr
```release-note
Adds (alpha feature) the ability to dynamically configure Kubelets by enabling the DynamicKubeletConfig feature gate, posting a ConfigMap to the API server, and setting the spec.configSource field on Node objects. See the proposal at https://github.com/kubernetes/community/blob/master/contributors/design-proposals/dynamic-kubelet-configuration.md for details.
```
Copy file name to clipboardexpand all lines: api/openapi-spec/swagger.json
+27
Original file line number
Diff line number
Diff line change
@@ -54865,6 +54865,29 @@
54865
54865
}
54866
54866
}
54867
54867
},
54868
+
"io.k8s.api.core.v1.NodeConfigSource": {
54869
+
"description": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.",
54870
+
"properties": {
54871
+
"apiVersion": {
54872
+
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources",
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds",
54880
+
"type": "string"
54881
+
}
54882
+
},
54883
+
"x-kubernetes-group-version-kind": [
54884
+
{
54885
+
"group": "",
54886
+
"kind": "NodeConfigSource",
54887
+
"version": "v1"
54888
+
}
54889
+
]
54890
+
},
54868
54891
"io.k8s.api.core.v1.NodeDaemonEndpoints": {
54869
54892
"description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.",
54870
54893
"properties": {
@@ -54967,6 +54990,10 @@
54967
54990
"io.k8s.api.core.v1.NodeSpec": {
54968
54991
"description": "NodeSpec describes the attributes that a node is created with.",
54969
54992
"properties": {
54993
+
"configSource": {
54994
+
"description": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field",
Copy file name to clipboardexpand all lines: api/swagger-spec/v1.json
+21
Original file line number
Diff line number
Diff line change
@@ -18318,6 +18318,10 @@
18318
18318
"$ref": "v1.Taint"
18319
18319
},
18320
18320
"description": "If specified, the node's taints."
18321
+
},
18322
+
"configSource": {
18323
+
"$ref": "v1.NodeConfigSource",
18324
+
"description": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field"
18321
18325
}
18322
18326
}
18323
18327
},
@@ -18347,6 +18351,23 @@
18347
18351
}
18348
18352
}
18349
18353
},
18354
+
"v1.NodeConfigSource": {
18355
+
"id": "v1.NodeConfigSource",
18356
+
"description": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.",
18357
+
"properties": {
18358
+
"kind": {
18359
+
"type": "string",
18360
+
"description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"
18361
+
},
18362
+
"apiVersion": {
18363
+
"type": "string",
18364
+
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources"
18365
+
},
18366
+
"configMapRef": {
18367
+
"$ref": "v1.ObjectReference"
18368
+
}
18369
+
}
18370
+
},
18350
18371
"v1.NodeStatus": {
18351
18372
"id": "v1.NodeStatus",
18352
18373
"description": "NodeStatus is information about the current status of a node.",
fs.StringVar(&f.NodeIP, "node-ip", f.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node")
141
213
142
214
fs.StringVar(&f.ProviderID, "provider-id", f.ProviderID, "Unique identifier for identifying the node in a machine database, i.e cloudprovider")
215
+
216
+
fs.StringVar(&f.CertDirectory, "cert-dir", f.CertDirectory, "The directory where the TLS certs are located. "+
217
+
"If --tls-cert-file and --tls-private-key-file are provided, this flag will be ignored.")
218
+
219
+
fs.StringVar(&f.CloudProvider, "cloud-provider", f.CloudProvider, "The provider for cloud services. By default, kubelet will attempt to auto-detect the cloud provider. Specify empty string for running with no cloud provider.")
220
+
fs.StringVar(&f.CloudConfigFile, "cloud-config", f.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.")
fs.Var(&f.DynamicConfigDir, "dynamic-config-dir", "The Kubelet will use this directory for checkpointing downloaded configurations and tracking configuration health. The Kubelet will create this directory if it does not already exist. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Providing this flag enables dynamic Kubelet configuration. Presently, you must also enable the DynamicKubeletConfig feature gate to pass this flag.")
225
+
fs.Var(&f.InitConfigDir, "init-config-dir", "The Kubelet will look in this directory for the init configuration. The path may be absolute or relative; relative paths start at the Kubelet's current working directory. Omit this argument to use the built-in default configuration values. Presently, you must also enable the DynamicKubeletConfig feature gate to pass this flag.")
143
226
}
144
227
145
-
// addFlags adds flags for a specific componentconfig.KubeletConfiguration to the specified FlagSet
fs.StringSliceVar(&c.HostNetworkSources, "host-network-sources", c.HostNetworkSources, "Comma-separated list of sources from which the Kubelet allows pods to use of host network.")
fs.Int32Var(&c.ImageGCLowThresholdPercent, "image-gc-low-threshold", c.ImageGCLowThresholdPercent, "The percent of disk usage before which image garbage collection is never run. Lowest disk usage to garbage collect to.")
228
308
fs.DurationVar(&c.VolumeStatsAggPeriod.Duration, "volume-stats-agg-period", c.VolumeStatsAggPeriod.Duration, "Specifies interval for kubelet to calculate and cache the volume disk usage for all pods and volumes. To disable volume calculations, set to 0.")
229
309
fs.StringVar(&c.VolumePluginDir, "volume-plugin-dir", c.VolumePluginDir, "<Warning: Alpha feature> The full path of the directory in which to search for additional third party volume plugins")
230
-
fs.StringVar(&c.CloudProvider, "cloud-provider", c.CloudProvider, "The provider for cloud services. By default, kubelet will attempt to auto-detect the cloud provider. Specify empty string for running with no cloud provider.")
231
-
fs.StringVar(&c.CloudConfigFile, "cloud-config", c.CloudConfigFile, "The path to the cloud provider configuration file. Empty string for no configuration file.")
232
310
fs.StringVar(&c.FeatureGates, "feature-gates", c.FeatureGates, "A set of key=value pairs that describe feature gates for alpha/experimental features. "+
0 commit comments