Created
April 5, 2024 09:40
-
-
Save zarelit/d08ad9d3d064cf6122eb4508f1a46945 to your computer and use it in GitHub Desktop.
Revisions
-
zarelit created this gist
Apr 5, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ **Build environment variables on the values of other variables** https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/ **Expose introspection information to pod** https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ --- apiVersion: apps/v1 kind: Deployment metadata: name: downward-test spec: replicas: 1 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:latest envFrom: - configMapRef: name: my-configmap env: - name: DAT_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: TEST_URL value: "https://$(DAT_NAMESPACE)"