-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 clusterctl: support envsubst in clusterctl config #7343
🌱 clusterctl: support envsubst in clusterctl config #7343
Conversation
93e11b7
to
18b5854
Compare
18b5854
to
a421772
Compare
@CecileRobertMichon @enxebre @fabriziopandini @vincepri Hey folks, WDYT? |
/test pull-cluster-api-e2e-full-main |
@@ -69,6 +70,11 @@ func (o *overrides) Path() string { | |||
f, err := o.configVariablesClient.Get(overrideFolderKey) | |||
if err == nil && strings.TrimSpace(f) != "" { | |||
basepath = f | |||
|
|||
evaluatedBasePath, err := envsubst.Eval(basepath, os.Getenv) | |||
if err == nil { |
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.
@fabriziopandini We have a few options here:
- log the error
- silently ignore the error
- change the interface so the Path() func can return an error
What would you prefer?
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.
Given that we are backporting, let's log the error; the we can eventually made a followup PR to change the interface in main
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.
Makes sense, done ptal :)
a421772
to
60528f4
Compare
/test pull-cluster-api-e2e-full-main |
60528f4
to
e9f33d2
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 pending adding the log line in Path
Signed-off-by: Stefan Büringer [email protected]
e9f33d2
to
19410e1
Compare
/test pull-cluster-api-e2e-full-main |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
/cherry-pick release-1.2 |
@sbueringer: cannot checkout In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@sbueringer: #7343 failed to apply on top of branch "release-1.2":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
This PR adds support for envsubst for the URL/ file path variables in the clusterctl config.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #5457