Open asiegman opened 3 years ago
Found a bug with my previous feature.
If you specified only a secretKeyRef, and not an accompanying fieldRef, the env: tag would be missing in the yaml section, causing invalid yaml as such:
env:
containers: - name: mything image: mything:latest imagePullPolicy: Always envFrom: - configMapRef: name: mything-env-default - name: MYTHING_USERNAME valueFrom: secretKeyRef: name: mything-user key: username - name: MYTHING_PASSWORD valueFrom: secretKeyRef: name: mything-user key: password
This fixes this bug, so that if either fieldKeyRef or secretKeyRefs are referenced, the env: section will have the appropriate yaml
containers: - name: mything image: mything:latest imagePullPolicy: Always envFrom: - configMapRef: name: mything-env-default env: - name: MYTHING_USERNAME valueFrom: secretKeyRef: name: mything-user key: username - name: MYTHING_PASSWORD valueFrom: secretKeyRef: name: mything-user key: password
Found a bug with my previous feature.
If you specified only a secretKeyRef, and not an accompanying fieldRef, the
env:
tag would be missing in the yaml section, causing invalid yaml as such:This fixes this bug, so that if either fieldKeyRef or secretKeyRefs are referenced, the env: section will have the appropriate yaml