Skip to content

Instantly share code, notes, and snippets.

@nilebox
Last active July 27, 2017 03:08
Show Gist options
  • Save nilebox/d7e3ab95dfa0fafd32d8c0939807f26a to your computer and use it in GitHub Desktop.
Save nilebox/d7e3ab95dfa0fafd32d8c0939807f26a to your computer and use it in GitHub Desktop.
Instance parameters
# 1. Current Nail's PR implementation
# + single union type with uniform way of passing parameters
# - breaking backward compatibility with current "parameters" field
# - extra "inline" nesting level for inline parameters (concern expressed by Doug)
spec:
serviceClassName: user-provided-service
planName: default
parameters:
inline:
username: root
password: letmein
secretRef:
name: mySecret
secretKeyRef:
name: myOtherSecret
key: key1
# 2. Doug's proposal
# + eliminates extra "inline" nesting level
# + preserves backward compatibility with master implementation
# - "k8s_" prefix looks ugly and hacky
spec:
serviceClassName: user-provided-service
planName: default
parameters:
username: root
password: letmein
k8s_secretRef:
name: mySecret
k8s_secretKeyRef:
name: myOtherSecret
key: key1
# 3. Nail's alternative proposal
# + eliminates extra "inline" nesting level
# + preserves backward compatibility with master implementation
# + similar to "env.value" and "env.valueFrom" approach in Kubernetes
# - 2 fields at the top level, outstanding separate case for inline parameters
spec:
serviceClassName: user-provided-service
planName: default
parameters:
username: root
password: letmein
parametersFrom:
secretRef:
name: mySecret
secretKeyRef:
name: myOtherSecret
key: key1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment