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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Update manager.yaml to resolve multi operator controllers in the same cluster #111

Closed
12 tasks done
lwpk110 opened this issue Jun 20, 2024 · 0 comments
Closed
12 tasks done
Labels
enhancement New feature or request

Comments

@lwpk110
Copy link
Member

lwpk110 commented Jun 20, 2024

Duplicates

I have searched the existing issues

Summary 馃挕

The current configuration of the operator controller manager contains labels that cause incorrect pod references when multiple operator controller managers are present. The labels need to be updated to ensure proper identification and management of pods by different operator controllers.

馃毀
track operators:

Examples 馃寛

The following changes are proposed to the config/manager/manager.yaml file to correct the label issue:

diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml
index 38a0b8e..2ebb1c3 100644
--- a/config/manager/manager.yaml
+++ b/config/manager/manager.yaml
@@ -18,23 +18,25 @@ metadata:
   namespace: system
   labels:
     control-plane: controller-manager
-    app.kubernetes.io/name: deployment
+    app.kubernetes.io/name: hdfs-operator
     app.kubernetes.io/instance: controller-manager
     app.kubernetes.io/component: manager
-    app.kubernetes.io/created-by: hdfs-operator
+    app.kubernetes.io/created-by: operator-lifecycle-manager
     app.kubernetes.io/part-of: hdfs-operator
     app.kubernetes.io/managed-by: kustomize
 spec:
   selector:
     matchLabels:
-      control-plane: controller-manager
+      control-plane: hdfs-operator
+      app.kubernetes.io/name: hdfs-operator
   replicas: 1
   template:
     metadata:
       annotations:
         kubectl.kubernetes.io/default-container: manager
       labels:
-        control-plane: controller-manager
+        control-plane: hdfs-operator
+        app.kubernetes.io/name: hdfs-operator
     spec:
       # TODO(user): Uncomment the following code to configure the nodeAffinity expression

Motivation 馃敠

When multiple operator controller managers are deployed in the same cluster, the current labels in the configuration file cause conflicts due to ambiguous references. Specifically, the labels control-plane: controller-manager and app.kubernetes.io/name: deployment are too generic and can lead to pods being incorrectly managed by the wrong operator controller. By updating the labels to more specific values such as control-plane: hdfs-operator and app.kubernetes.io/name: hdfs-operator, we can ensure that pods are correctly referenced and managed by the appropriate operator controller manager, thus preventing conflicts and ensuring the stability of the deployment.

@lwpk110 lwpk110 added the enhancement New feature or request label Jun 20, 2024
@lwpk110 lwpk110 changed the title [Feature]: [Feature]: Update manager.yaml to resolve multi operator controllers in the same cluster Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/trino-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/secret-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/zookeeper-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/listener-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/commons-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/trino-operator Jun 20, 2024
@lwpk110 lwpk110 transferred this issue from zncdatadev/hdfs-operator Jun 20, 2024
@lwpk110 lwpk110 pinned this issue Jun 24, 2024
@lwpk110 lwpk110 closed this as completed Jun 27, 2024
@lwpk110 lwpk110 unpinned this issue Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant