Skip to content

Commit a72e469

Browse files
committed
feat(env_fieldref.yml): Add example of environment ariable from field reference
1 parent 358f1f4 commit a72e469

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

env_fieldref.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: env-fieldref
5+
spec:
6+
containers:
7+
- name: main
8+
image: busybox
9+
command:
10+
- /bin/sh
11+
- -c
12+
- env | grep MY_
13+
env:
14+
- name: MY_NODE_NAME
15+
valueFrom:
16+
fieldRef:
17+
fieldPath: spec.nodeName
18+
resources:
19+
requests:
20+
cpu: 30m
21+
memory: 20Mi
22+
limits:
23+
cpu: 30m
24+
memory: 20Mi
25+
restartPolicy: Never

0 commit comments

Comments
 (0)