From 8d6201c8a81a0dd885ff00c0fc1c258d7694a94e Mon Sep 17 00:00:00 2001 From: Nasar Khan Date: Sun, 21 Jan 2024 18:02:50 -0500 Subject: [PATCH] normalize kafka user name --- .../api/v1alpha1/helpers/miq-components/kafka/kafka.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manageiq-operator/api/v1alpha1/helpers/miq-components/kafka/kafka.go b/manageiq-operator/api/v1alpha1/helpers/miq-components/kafka/kafka.go index df4527301..6bee3f7eb 100644 --- a/manageiq-operator/api/v1alpha1/helpers/miq-components/kafka/kafka.go +++ b/manageiq-operator/api/v1alpha1/helpers/miq-components/kafka/kafka.go @@ -192,7 +192,7 @@ func MessagingEnvSecret(cr *miqv1alpha1.ManageIQ, client client.Client, scheme * if err := controllerutil.SetControllerReference(cr, secret, scheme); err != nil { return err } - secretKey := types.NamespacedName{Namespace: cr.ObjectMeta.Namespace, Name: cr.Spec.AppName + "-user"} + secretKey := types.NamespacedName{Namespace: cr.ObjectMeta.Namespace, Name: cr.Spec.AppName + "-kafka-admin"} kafkaUser := &corev1.Secret{} secretErr := client.Get(context.TODO(), secretKey, kafkaUser) if secretErr != nil { @@ -487,7 +487,7 @@ func KafkaUser(cr *miqv1alpha1.ManageIQ, scheme *runtime.Scheme) (*unstructured. Kind: "KafkaUser", Version: "v1beta2", }) - kafkaUserCR.SetName(cr.Spec.AppName + "-user") + kafkaUserCR.SetName(cr.Spec.AppName + "-kafka-admin") kafkaUserCR.SetNamespace(cr.Namespace) kafkaUserCR.SetLabels(map[string]string{"strimzi.io/cluster": cr.Spec.AppName})