Skip to content
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

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

dhirajsb
Copy link
Contributor

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:

  • The commits and have meaningful messages; the author will squash them after approval or will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@dhirajsb dhirajsb requested a review from tarilabs July 12, 2024 01:59
tarilabs
tarilabs previously approved these changes Jul 12, 2024
Copy link
Member

@tarilabs tarilabs left a 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}'))
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@tarilabs tarilabs left a 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)

@dhirajsb dhirajsb merged commit 15a9698 into opendatahub-io:main Jul 12, 2024
2 checks passed
@dhirajsb dhirajsb deleted the feat/default-domain branch July 12, 2024 15:28
rareddy pushed a commit to rareddy/model-registry-operator that referenced this pull request Oct 1, 2024
…123 (opendatahub-io#115)

* feat: set domain automatically in Openshift cluster, fixes RHOAIENG-5123

* fix: add check for non-empty domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants