Correctly handle secret and configMap envs in kubectl describe

This commit is contained in:
Paul Morie
2016-04-05 17:36:22 -04:00
parent 4f329516ae
commit 9069cbb086
3 changed files with 76 additions and 3 deletions

25
hack/testdata/pod-with-api-env.yaml vendored Normal file
View File

@@ -0,0 +1,25 @@
apiVersion: v1
kind: Pod
metadata:
name: env-test-pod
spec:
containers:
- name: test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
- name: TEST_CMD_1
valueFrom:
secretKeyRef:
name: test-secret
key: key-1
- name: TEST_CMD_2
valueFrom:
configMapKeyRef:
name: test-configmap
key: key-2
- name: TEST_CMD_3
valueFrom:
fieldRef:
fieldPath: metadata.name
restartPolicy: Never