Last active
July 27, 2017 05:13
-
-
Save duglin/1422e0eafc7eca22157af96a3f4a84d0 to your computer and use it in GitHub Desktop.
params.yaml
This file contains 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 characters
spec: | |
serviceClassName: user-provided-service | |
planName: default | |
parameters: | |
- name: username # easy name/value pair case | |
value: root | |
- name: password # pull value from a secret's key | |
valueFrom: | |
secretKeyRef: | |
name: mySecret1 | |
key: passwd | |
- name: size # pull value from a configMap key | |
valueFrom: | |
configMapKeyRef: | |
name: myConfigMap0 | |
key: length | |
parametersFrom: | |
- configMapRef: myConfigMap1 # pull in all the CM's key/value's (string/string) | |
- secretRef: mySecret2 # pull in all the secret key/value's (string/string) | |
- configMapKeyBlobRef: | |
name: myConfigMap2 | |
key: credentials # "credentials" is a JSON object so we take it verbatim and we merge with the above | |
- secretKeyBlobRef: | |
name: mySecret3 | |
key: creds # "creds" is a JSON object so we take it verbatim and merge with the the above |
This looks like a comprehensive solution for a variety of use cases, I like it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just to demonstrate the consistency between this approach and Pod environment variables:
secretKeyBlobRef
andconfigMapKeyBlobRef
of course, but the rest maps one-to-oneenvFrom
items haveprefix
attribute, which we might want to leverage as well (for conflict resolution)