Skip to content

Fix registry operator hostname format for k8s #1431

@michael-valdron

Description

@michael-valdron

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

Metadata

Metadata

Assignees

Labels

area/registryDevfile registry for stacks and infrastructure

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions