-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: set domain automatically in Openshift cluster, fixes RHOAIENG-5123 #115
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.
besides minor comment below, I understand this will be set to the value of DEFAULT_DOMAIN (which is an empty string) in case domain is not set
/lgtm
thanks!
@@ -197,7 +197,7 @@ $(ENVTEST): $(LOCALBIN) | |||
.PHONY: certificates | |||
certificates: | |||
# generate TLS certs | |||
scripts/generate_certs.sh $(DOMAIN) | |||
scripts/generate_certs.sh $(or $(DOMAIN),$(shell oc get ingresses.config/cluster -o jsonpath='{.spec.domain}')) |
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.
shouldn't this be guarded in case both of the two fails (retrieving env variable, executing oc get) so to handle the case none are successful call somewhere instead of inline?
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.
Makefile didn't make it easy to add logic easily, so I added a guard in the generate_certs.sh
script. It'll make sure that a non-empty domain is used.
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.
thank you for adding the check #115 (review)
…123 (opendatahub-io#115) * feat: set domain automatically in Openshift cluster, fixes RHOAIENG-5123 * fix: add check for non-empty domain
Description
Set domain automatically in Openshift cluster either from an env variable in the operator, or from Openshift cluster if available
Fixes RHOAIENG-5123
How Has This Been Tested?
The default istio.env config file now has an empty DOMAIN parameter
Merge criteria: