k3s/pkg/kubelet
Kubernetes Submit Queue 2a989c60ff
Merge pull request #63221 from mtaufen/dkcfg-live-configmap
Automatic merge from submit-queue (batch tested with PRs 63881, 64046, 63409, 63402, 63221). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Kubelet responds to ConfigMap mutations for dynamic Kubelet config

This PR makes dynamic Kubelet config easier to reason about by leaving less room for silent skew scenarios. The new behavior is as follows:
- ConfigMap does not exist: Kubelet reports error status due to missing source
- ConfigMap is created: Kubelet starts using it
- ConfigMap is updated: Kubelet respects the update (but we discourage this pattern, in favor of incrementally migrating to a new ConfigMap)
- ConfigMap is deleted: Kubelet keeps using the config (non-disruptive), but reports error status due to missing source
- ConfigMap is recreated: Kubelet respects any updates (but, again, we discourage this pattern)

This PR also makes a small change to the config checkpoint file tree structure, because ResourceVersion is now taken into account when saving checkpoints. The new structure is as follows:
```
- dir named by --dynamic-config-dir (root for managing dynamic config)
| - meta
  | - assigned (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the assigned config)
  | - last-known-good (encoded kubeletconfig/v1beta1.SerializedNodeConfigSource object, indicating the last-known-good config)
| - checkpoints
  | - uid1 (dir for versions of object identified by uid1)
    | - resourceVersion1 (dir for unpacked files from resourceVersion1)
    | - ...
  | - ...
```


fixes: #61643

```release-note
The dynamic Kubelet config feature will now update config in the event of a ConfigMap mutation, which reduces the chance for silent config skew. Only name, namespace, and kubeletConfigKey may now be set in Node.Spec.ConfigSource.ConfigMap. The least disruptive pattern for config management is still to create a new ConfigMap and incrementally roll out a new Node.Spec.ConfigSource.
```
2018-05-21 17:05:42 -07:00
..
apis Kubelet config: Validate new config against future feature gates 2018-05-20 13:15:59 -07:00
cadvisor
certificate Extract connection rotating dialer into a package 2018-05-16 10:30:53 -07:00
checkpoint Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
checkpointmanager Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
client Use Dial with context 2018-05-19 08:14:37 +10:00
cm Merge pull request #63344 from RobertKrawitz/fix-process-kill-algorithm 2018-05-11 11:41:19 -07:00
config simplify api registration 2018-05-08 18:33:50 -04:00
configmap Refactor ConfigMapManager 2018-05-17 11:37:35 +02:00
container Merge pull request #63333 from deads2k/api-14-snip 2018-05-04 10:52:10 -07:00
custommetrics
dockershim Bump grpc max message size for docker service 2018-05-19 16:52:00 -04:00
envvars
events
eviction Merge pull request #57849 from dashpole/eviction_test_event 2018-05-17 00:28:19 -07:00
images
kubeletconfig Merge pull request #63221 from mtaufen/dkcfg-live-configmap 2018-05-21 17:05:42 -07:00
kuberuntime Make kubelet `ReadLogs` backward compatible. 2018-04-27 16:03:29 -07:00
leaky
lifecycle Remove unused code 2018-04-30 14:57:26 -04:00
logs
metrics
mountpod Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
network Update bazel BUILD files 2018-04-11 09:26:02 -07:00
pleg
pod Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
preemption Delete in-tree support for NVIDIA GPUs. 2018-04-02 20:17:01 -07:00
prober reset resultRun to 0 on pod restart 2018-04-19 22:58:19 +08:00
qos
remote pkg: kubelet: remote: increase grpc client default size 2018-05-17 17:32:33 +02:00
secret Refactor ConfigMapManager 2018-05-17 11:37:35 +02:00
server Apply pod name and namespace labels for pod cgroup for cadvisor metrics 2018-05-07 14:51:12 -04:00
stats Use a []string for CgroupName, which is a more accurate internal representation 2018-05-01 08:29:06 -07:00
status Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
sysctl Update generated files. 2018-04-11 18:35:24 +02:00
types
util Refactor cache based manager 2018-05-16 10:59:32 +02:00
volumemanager boring 2018-04-18 09:55:57 -07:00
winstats
BUILD Refactor cache based manager 2018-05-16 10:59:32 +02:00
OWNERS
active_deadline.go
active_deadline_test.go
doc.go
kubelet.go Refactor ConfigMapManager 2018-05-17 11:37:35 +02:00
kubelet_getters.go Apply pod name and namespace labels for pod cgroup for cadvisor metrics 2018-05-07 14:51:12 -04:00
kubelet_getters_test.go
kubelet_network.go Move hairpin mode logic to dockershim 2018-04-11 09:21:17 -07:00
kubelet_network_test.go Move the kubelet network package down to dockershim 2018-04-11 09:25:56 -07:00
kubelet_node_status.go Merge pull request #62242 from feiskyer/pod-cidr 2018-05-15 19:55:19 -07:00
kubelet_node_status_test.go Merge pull request #63492 from liggitt/node-heartbeat-close-connections 2018-05-14 16:56:35 -07:00
kubelet_pods.go Merge pull request #63045 from msau42/fix-subpath-readonly 2018-05-07 23:36:49 -07:00
kubelet_pods_test.go update tests to be specific about the versions they are testing instead of floating 2018-05-01 13:18:41 -04:00
kubelet_pods_windows_test.go
kubelet_resources.go
kubelet_resources_test.go
kubelet_test.go Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
kubelet_volumes.go
kubelet_volumes_test.go boring 2018-04-18 09:55:57 -07:00
oom_watcher.go
oom_watcher_test.go
pod_container_deletor.go kubelet: force filterContainerID to empty string when removeAll is true 2018-04-30 16:29:17 -05:00
pod_container_deletor_test.go
pod_workers.go
pod_workers_test.go
reason_cache.go
reason_cache_test.go
runonce.go
runonce_test.go Make 'pod' package to use unified checkpointManager 2018-04-16 01:30:20 -04:00
runtime.go
util.go
volume_host.go Only count mounts that are from other pods 2018-04-19 15:40:51 -07:00