-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add value reference in OperandConfig #990
Conversation
Signed-off-by: Daniel Fan <fanyuchensx@gmail.com>
332ff6d
to
149b996
Compare
/retest |
Signed-off-by: Daniel Fan <fanyuchensx@gmail.com>
8f94240
to
6f30895
Compare
Signed-off-by: Daniel Fan <fanyuchensx@gmail.com>
988371c
to
f1ab989
Compare
Signed-off-by: Daniel Fan <fanyuchensx@gmail.com>
f1ab989
to
687d7c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Daniel-Fan, YCShen1010 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Overview
NOTE: Basic test cases are added in this PR, and overall usage is illustrated below. I will create another PR to add more test cases and write complete doc.
ODLM OperandConfig supports to reference value from
ConfigMap
,Secret
and other arbitrary objects.templatingValueFrom
is the top level key for the entire Templating Structure.Default hardcode value reference
Template
Final rendered template
ConfigMap Key value reference
configMapkeyRef
could be added undertemplatingValueFrom
ortemplatingValueFrom.default
Template
Final rendered template
When there are multiple references exist, the latter takes precedence.
Secret Key value reference
secretKeyRef
could be added undertemplatingValueFrom
ortemplatingValueFrom.default
Template
Final rendered template
Arbitrary Object
objectRef
could be added undertemplatingValueFrom
ortemplatingValueFrom.default
Template
Final rendered template
Additional attributes
required
could be added undertemplatingValueFrom
ortemplatingValueFrom.default
required: true
: the value reference could not be emptyrequired: false
: the value reference could be emptyTemplate
Final rendered template
It failed to render the template, because
required: true
is set.Key
non_domain_name
does not exist in ConfigMapreference-map
,domain
in template has nothing to reference.