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

Fix registry operator hostname format for k8s #1431

Closed
3 tasks done
Tracked by #1274
michael-valdron opened this issue Feb 1, 2024 · 1 comment · Fixed by devfile/registry-operator#80
Closed
3 tasks done
Tracked by #1274

Fix registry operator hostname format for k8s #1431

michael-valdron opened this issue Feb 1, 2024 · 1 comment · Fixed by devfile/registry-operator#80
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure

Comments

@michael-valdron
Copy link
Member

michael-valdron commented Feb 1, 2024

Which area/kind this issue is related to?

/area registry

Issue Description

Currently, the registry operator hostname setup only uses the CR name value for the hostname part, for openshift deployments and how the helm chart sets up the hostname _template.tpl#L16, the CR name is coupled with the namespace name to create the hostname.

The registry operator source should be changed to something of the following:

GetDevfileRegistryIngress

func GetDevfileRegistryIngress(cr *registryv1alpha1.DevfileRegistry) string {
	return GetHostname(cr) + "." + cr.Spec.K8s.IngressDomain
}

GetHostname

func GetHostname(cr *registryv1alpha1.DevfileRegistry) string {
	return fmt.Sprintf("%s-%s", cr.Name, cr.Namespace)
}

Parent Epic: #1274

Acceptance Criteria

  • Create getter function to receive the hostname part of the ingress address
    • Create hostname using the format <DevfileRegistry.Name>-<DevfileRegistry.Namespace>
  • Update GetDevfileRegistryIngress to couple the result of the hostname getter function and the set ingress domain DevfileRegistry.Spec.K8s.IngressDomain
  • Ensure integration test cases are passing
@openshift-ci openshift-ci bot added the area/registry Devfile registry for stacks and infrastructure label Feb 1, 2024
@Jdubrick Jdubrick self-assigned this Feb 20, 2024
@Jdubrick Jdubrick moved this to Refinement in Devfile Project Feb 20, 2024
@thepetk thepetk moved this from Refinement to Backlog in Devfile Project Feb 21, 2024
@Jdubrick Jdubrick moved this from Backlog to To Do 📝 in Devfile Project Feb 21, 2024
@Jdubrick Jdubrick moved this from To Do 📝 to In Progress 🚧 in Devfile Project Feb 21, 2024
@Jdubrick
Copy link
Contributor

Jdubrick commented Mar 4, 2024

Functions have been created and updated to reflect the changes. I added some unit tests for these changes and they seem to be working great.

Currently working on adding a few more cases to the unit tests and then need to integration test. The integration tests are giving me issues as the pods don't want to run properly. Working through that issue before opening a PR.

@Jdubrick Jdubrick moved this from In Progress 🚧 to In Review 👀 in Devfile Project Mar 5, 2024
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in Devfile Project Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure
Projects
Status: Done ✅
Development

Successfully merging a pull request may close this issue.

2 participants