Skip to content

Commit

Permalink
Provide the default values for sync period and ttl (#15296)
Browse files Browse the repository at this point in the history
* Provide the default values for sync period and ttl

Fill the default value information of kubelet sync period and ttl of ConfigMaps cache in kubelet.
Value info comes from:
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/configmap/configmap_manager.go#L110
https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/config/v1beta1/defaults.go#L51

* Update configure-pod-configmap.md
  • Loading branch information
GuoxiangZu authored and k8s-ci-robot committed Jul 6, 2019
1 parent 5cc0fbe commit e50dba3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ basis. The [Secrets](/docs/concepts/configuration/secret/#using-secrets-as-files

### Mounted ConfigMaps are updated automatically

When a ConfigMap already being consumed in a volume is updated, projected keys are eventually updated as well. Kubelet is checking whether the mounted ConfigMap is fresh on every periodic sync. However, it is using its local ttl-based cache for getting the current value of the ConfigMap. As a result, the total delay from the moment when the ConfigMap is updated to the moment when new keys are projected to the pod can be as long as kubelet sync period + ttl of ConfigMaps cache in kubelet.
When a ConfigMap already being consumed in a volume is updated, projected keys are eventually updated as well. Kubelet is checking whether the mounted ConfigMap is fresh on every periodic sync. However, it is using its local ttl-based cache for getting the current value of the ConfigMap. As a result, the total delay from the moment when the ConfigMap is updated to the moment when new keys are projected to the pod can be as long as kubelet sync period (1 minute by default) + ttl of ConfigMaps cache (1 minute by default) in kubelet.

{{< note >}}
A container using a ConfigMap as a [subPath](/docs/concepts/storage/volumes/#using-subpath) volume will not receive ConfigMap updates.
Expand Down

0 comments on commit e50dba3

Please sign in to comment.