-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Pass CLUSTER_PROFILE env var to CVO render #4444
Pass CLUSTER_PROFILE env var to CVO render #4444
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.
The enhancement linked deals with how the CVO gets the cluster profile. Is there an enhancement discussing how the installer figures out the cluster profile to use? Historically, the use of environment variables to direct installer behavior has been discouraged.
It was discussed in the internal slack if it should be added to the installer API (install-config) and it was recommended to start with the environment variable to avoid changing API. |
11053b7
to
c71d76b
Compare
@staebler I updated the enhancement in the PR description and fixed all code comments |
Thanks. I commented on the enhancement. By the way, if we do end up sticking with using an environment variable, it should have a more specific name, like |
c71d76b
to
2be57b9
Compare
updated the environment variable name and added a warning |
/retest |
@@ -38,6 +38,7 @@ MDNS_PUBLISHER_IMAGE=$(image_for mdns-publisher) | |||
HAPROXY_IMAGE=$(image_for haproxy-router) | |||
BAREMETAL_RUNTIMECFG_IMAGE=$(image_for baremetal-runtimecfg) | |||
|
|||
|
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.
Superfluous newline.
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.
fixed
@@ -55,6 +56,7 @@ then | |||
|
|||
bootkube_podman_run \ | |||
--volume "$PWD:/assets:z" \ | |||
--env CLUSTER_PROFILE="{{.ClusterProfile}}" \ |
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.
Since this is still somewhat experimental, let's omit the environment variable in the CVO pod unless the user has set the cluster profile.
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.
changed
2be57b9
to
bec31ee
Compare
// Set cluster profile | ||
clusterProfile := "" | ||
if cp := os.Getenv("OPENSHIFT_INSTALL_EXPERIMENTAL_CLUSTER_PROFILE"); cp != "" { | ||
logrus.Warn("Found override for Cluster Profile. Please be warned.") |
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.
Probably want to include %q
for cp
in this message with:
logrus.Warnf("Found override for Cluster Profile: %q", cp)
No need for Please be warned
; it's already a warning-level log, and logrus will set level=warning or whatever.
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.
fixed
/retest |
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.
I like Trevor's suggestions for fixing up the warning log event. Other than that, it looks good.
/approve
Signed-off-by: Ravid Brown <ravid@redhat.com>
bec31ee
to
102c615
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: staebler 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 |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
1 similar comment
/retest |
@ravidbro: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/skip |
This PR adds the ability to pass CLUSTER_PROFILE as env var to the installer which will be propagated as env var to the CVO rendering.
Following the enhancements:
openshift/enhancements#200
openshift/enhancements#543
Signed-off-by: Ravid Brown ravid@redhat.com