Skip to content

Registry operator host alias for registry viewer not working #1028

@michael-valdron

Description

@michael-valdron

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

Go project

Operating System and version: N/A

Go Pkg Version: 1.18

Bug Summary

Describe the bug:

For the registry operator, the host alias should be able to be set after the operator is deployed and during the deployment of the devfile registry using the (*registryv1alpha1.DevfileRegistry).Status.URL devfile/registry-operator/pkg/registry/configmap.go#L56 which is set once the operator picks up the server hostname. However, in the current state cr.Status.URL is an empty string resulting in the registry viewer defaulting to the staging host alias of the community registry. A fix to operator will be needed to correct this.

To Reproduce:

Deploy the registry operator in any deployment environment, this will result in all stack/sample links (e.g. starter project download and raw devfile links) in the registry viewer pointing to the registry server to point to the one deployed in staging for the community registry.

Expected behavior

Stack/sample links in the registry viewer should point to the registry server deployed with it. cr.Status.URL needs to be set to the host address of the deployment clusters ingress route.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Additional context

Any workaround?

This can also work with the following source, but this would require the registry admin to set the hostname before deploying the operator:

viewerEnvfile := fmt.Sprintf(`
ANALYTICS_WRITE_KEY=%s
DEVFILE_REGISTRIES=[{"name":"Community","url":"http://localhost:8080","fqdn":"http://%s.%s"}]`,
		cr.Spec.Telemetry.RegistryViewerWriteKey, IngressName(cr.Name), cr.Spec.K8s.IngressDomain)

"http://%s.%s": Additional source will be needed to set the right protocol based on spec.tls.enabled.

Suggestion on how to fix the bug

A proper fix would have the operator to set cr.Status.URL to the host address of the deployment cluster's ingress route.

Target Date: May 30, 2023

Metadata

Metadata

Assignees

Labels

area/registryDevfile registry for stacks and infrastructurekind/bugSomething isn't workingseverity/blockerIssues that prevent developers from working

Type

No type

Projects

Status

Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions