-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
pkg/helm: add overrideValues to watches.yaml (with env expansion) #2325
pkg/helm: add overrideValues to watches.yaml (with env expansion) #2325
Conversation
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.
Docs and some tests and then look pretty good to me at first glance.
pkg/helm/watches/watches.go
Outdated
|
||
yaml "gopkg.in/yaml.v2" | ||
"github.com/ghodss/yaml" |
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.
Is this a conscious change and why?
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.
It is. When gopkg.in/yaml.v2
unmarshals, the resulting map[string]interface{}
child maps with type map[interface{}]interface{}
. github.com/ghodss/yaml
gets this right with map[string]interface{}
all the way down.
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.
See the previous comment
851b990
to
1d30565
Compare
1d30565
to
81ae668
Compare
…sion), update tests and docs
81ae668
to
cb69aae
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
* upgrade helm to use SDK 0.14.1 by: * changes applied by in roles, crd and watch by comparing the project with an empty new helm project created with 0.14.1. * the watch was changed because with it no longer equired to inform the full path. See: (operator-framework/operator-sdk#2325)
Description of the change:
Adds
overrideValues
field to Helm operator's watches.yaml file, which allows an operator author to specify a values map that is merged with (and overrides) CRspec
values.The values defined in
overrideValues
can use environment variable expansion (e.g.$MY_VAR
or${MY_VAR}
) to use values from the environment.Motivation for the change:
In order to support disconnected scenarios and automated operand image rebuilds (e.g. to fix a CVE) it is necessary
To Do
overrideValues
overrideValues
, the container image should be built such that each environment variable is set to the chart's default value for that field.