diff --git a/pkg/openshift/consoleplugin/common.go b/pkg/openshift/consoleplugin/common.go index e00bf0be0..cca19e2fd 100644 --- a/pkg/openshift/consoleplugin/common.go +++ b/pkg/openshift/consoleplugin/common.go @@ -1,15 +1,17 @@ package consoleplugin const ( - KUADRANT_CONSOLE = "kuadrant-console" + KuadrantConsoleName = "kuadrant-console" + KuadrantPluginComponent = "kuadrant-plugin" ) func CommonLabels() map[string]string { return map[string]string{ - "app": KUADRANT_CONSOLE, - "app.kubernetes.io/component": KUADRANT_CONSOLE, - "app.kubernetes.io/instance": KUADRANT_CONSOLE, - "app.kubernetes.io/name": KUADRANT_CONSOLE, - "app.kubernetes.io/part-of": KUADRANT_CONSOLE, + "app": KuadrantConsoleName, + "app.kubernetes.io/component": KuadrantPluginComponent, + "app.kubernetes.io/managed-by": "kuadrant-operator", + "app.kubernetes.io/instance": KuadrantConsoleName, + "app.kubernetes.io/name": KuadrantConsoleName, + "app.kubernetes.io/part-of": KuadrantConsoleName, } } diff --git a/pkg/openshift/consoleplugin/consoleplugin.go b/pkg/openshift/consoleplugin/consoleplugin.go index 8657908b9..5cd882ac0 100644 --- a/pkg/openshift/consoleplugin/consoleplugin.go +++ b/pkg/openshift/consoleplugin/consoleplugin.go @@ -5,15 +5,15 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -func ConsolePluginName() string { - return KUADRANT_CONSOLE +func Name() string { + return KuadrantConsoleName } func ConsolePlugin(ns string) *consolev1.ConsolePlugin { return &consolev1.ConsolePlugin{ TypeMeta: metav1.TypeMeta{Kind: "ConsolePlugin", APIVersion: "v1"}, ObjectMeta: metav1.ObjectMeta{ - Name: ConsolePluginName(), + Name: Name(), Labels: CommonLabels(), }, Spec: consolev1.ConsolePluginSpec{ @@ -21,7 +21,7 @@ func ConsolePlugin(ns string) *consolev1.ConsolePlugin { Backend: consolev1.ConsolePluginBackend{ Type: consolev1.Service, Service: &consolev1.ConsolePluginService{ - Name: KUADRANT_CONSOLE, + Name: KuadrantConsoleName, Namespace: ns, Port: 9443, BasePath: "/", diff --git a/pkg/openshift/consoleplugin/deployment.go b/pkg/openshift/consoleplugin/deployment.go index ff47a33ff..cd40bfb83 100644 --- a/pkg/openshift/consoleplugin/deployment.go +++ b/pkg/openshift/consoleplugin/deployment.go @@ -11,7 +11,7 @@ import ( ) func DeploymentName() string { - return KUADRANT_CONSOLE + return KuadrantConsoleName } func DeploymentStrategy() appsv1.DeploymentStrategy { @@ -98,7 +98,7 @@ func Deployment(ns, image string) *appsv1.Deployment { Spec: corev1.PodSpec{ Containers: []corev1.Container{ { - Name: KUADRANT_CONSOLE, + Name: KuadrantConsoleName, Image: image, Ports: []corev1.ContainerPort{ { diff --git a/pkg/openshift/consoleplugin/service.go b/pkg/openshift/consoleplugin/service.go index 5185ca0e3..37e898f76 100644 --- a/pkg/openshift/consoleplugin/service.go +++ b/pkg/openshift/consoleplugin/service.go @@ -7,7 +7,7 @@ import ( ) func ServiceName() string { - return KUADRANT_CONSOLE + return KuadrantConsoleName } func ServiceAnnotations() map[string]string { @@ -18,7 +18,7 @@ func ServiceAnnotations() map[string]string { func ServiceSelector() map[string]string { return map[string]string{ - "app": KUADRANT_CONSOLE, + "app": KuadrantConsoleName, } }