Skip to content

Commit b5b9d88

Browse files
author
Tim Bannister
committed
Add headings for Immutable ConfigMaps and Secrets
1 parent 11d13b8 commit b5b9d88

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

content/en/docs/concepts/configuration/configmap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ when new keys are projected to the Pod can be as long as the kubelet sync period
213213
propagation delay, where the cache propagation delay depends on the chosen cache type
214214
(it equals to watch propagation delay, ttl of cache, or zero correspondingly).
215215

216+
## Immutable ConfigMaps {#configmap-immutable}
217+
216218
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
217219

218220
The Kubernetes beta feature _Immutable Secrets and ConfigMaps_ provides an option to set

content/en/docs/concepts/configuration/secret.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -717,38 +717,6 @@ A container using a Secret as a
717717
Secret updates.
718718
{{< /note >}}
719719

720-
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
721-
722-
The Kubernetes beta feature _Immutable Secrets and ConfigMaps_ provides an option to set
723-
individual Secrets and ConfigMaps as immutable. For clusters that extensively use Secrets
724-
(at least tens of thousands of unique Secret to Pod mounts), preventing changes to their
725-
data has the following advantages:
726-
727-
- protects you from accidental (or unwanted) updates that could cause applications outages
728-
- improves performance of your cluster by significantly reducing load on kube-apiserver, by
729-
closing watches for secrets marked as immutable.
730-
731-
This feature is controlled by the `ImmutableEphemeralVolumes` [feature
732-
gate](/docs/reference/command-line-tools-reference/feature-gates/),
733-
which is enabled by default since v1.19. You can create an immutable
734-
Secret by setting the `immutable` field to `true`. For example,
735-
```yaml
736-
apiVersion: v1
737-
kind: Secret
738-
metadata:
739-
...
740-
data:
741-
...
742-
immutable: true
743-
```
744-
745-
{{< note >}}
746-
Once a Secret or ConfigMap is marked as immutable, it is _not_ possible to revert this change
747-
nor to mutate the contents of the `data` field. You can only delete and recreate the Secret.
748-
Existing Pods maintain a mount point to the deleted Secret - it is recommended to recreate
749-
these pods.
750-
{{< /note >}}
751-
752720
### Using Secrets as environment variables
753721

754722
To use a secret in an {{< glossary_tooltip text="environment variable" term_id="container-env-variables" >}}
@@ -809,6 +777,40 @@ The output is similar to:
809777
1f2d1e2e67df
810778
```
811779

780+
## Immutable Secrets {#secret-immutable}
781+
782+
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
783+
784+
The Kubernetes beta feature _Immutable Secrets and ConfigMaps_ provides an option to set
785+
individual Secrets and ConfigMaps as immutable. For clusters that extensively use Secrets
786+
(at least tens of thousands of unique Secret to Pod mounts), preventing changes to their
787+
data has the following advantages:
788+
789+
- protects you from accidental (or unwanted) updates that could cause applications outages
790+
- improves performance of your cluster by significantly reducing load on kube-apiserver, by
791+
closing watches for secrets marked as immutable.
792+
793+
This feature is controlled by the `ImmutableEphemeralVolumes` [feature
794+
gate](/docs/reference/command-line-tools-reference/feature-gates/),
795+
which is enabled by default since v1.19. You can create an immutable
796+
Secret by setting the `immutable` field to `true`. For example,
797+
```yaml
798+
apiVersion: v1
799+
kind: Secret
800+
metadata:
801+
...
802+
data:
803+
...
804+
immutable: true
805+
```
806+
807+
{{< note >}}
808+
Once a Secret or ConfigMap is marked as immutable, it is _not_ possible to revert this change
809+
nor to mutate the contents of the `data` field. You can only delete and recreate the Secret.
810+
Existing Pods maintain a mount point to the deleted Secret - it is recommended to recreate
811+
these pods.
812+
{{< /note >}}
813+
812814
### Using imagePullSecrets
813815

814816
The `imagePullSecrets` field is a list of references to secrets in the same namespace.

0 commit comments

Comments
 (0)