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
Copy file name to clipboardExpand all lines: content/en/docs/tasks/manage-kubernetes-objects/kustomization.md
+3-12Lines changed: 3 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,20 +86,12 @@ metadata:
86
86
name: example-configmap-1-8mbdf7882g
87
87
```
88
88
89
-
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`. This can also be used to set values from local environment variables by omitting the `=` and the value.
90
-
91
-
{{< note >}}
92
-
It's recommended to use the local environment variable population functionality sparingly - an overlay with a patch is often more maintainable. Setting values from the environment may be useful when they cannot easily be predicted, such as a git SHA.
93
-
{{< /note >}}
94
-
95
-
Here is an example of generating a ConfigMap with a data item from a `.env` file:
89
+
To generate a ConfigMap from an env file, add an entry to the `envs` list in `configMapGenerator`. Here is an example of generating a ConfigMap with a data item from a `.env` file:
96
90
97
91
```shell
98
92
# Create a .env file
99
-
# BAZ will be populated from the local environment variable $BAZ
100
93
cat <<EOF >.env
101
94
FOO=Bar
102
-
BAZ
103
95
EOF
104
96
105
97
cat <<EOF >./kustomization.yaml
@@ -113,19 +105,18 @@ EOF
113
105
The generated ConfigMap can be examined with the following command:
0 commit comments