From 9572ab5e9942146a4c289ae09c404e39e70e9c12 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Fri, 26 Jan 2024 15:25:45 -0300 Subject: [PATCH] Fix #366 - Add custom label to manifests to avoid clashing with installed operators in a cluster Signed-off-by: Ricardo Zanini --- .github/workflows/e2e.yml | 2 +- ...ontroller-manager-metrics-service_v1_service.yaml | 4 ++-- .../logic-operator-rhel8.clusterserviceversion.yaml | 6 +++--- ...ontroller-manager-metrics-service_v1_service.yaml | 4 ++-- .../sonataflow-operator.clusterserviceversion.yaml | 6 +++--- config/manager/manager.yaml | 8 ++++---- config/manager/osl/manager.yaml | 8 ++++---- config/prometheus/monitor.yaml | 4 ++-- config/rbac/auth_proxy_service.yaml | 4 ++-- operator.yaml | 12 ++++++------ testbdd/steps/operator.go | 2 +- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e76ad9e21..cf3db3053 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -71,7 +71,7 @@ jobs: - name: Deploy operator run: | make deploy IMG=${{ env.OPERATOR_IMAGE_NAME }} - kubectl wait pod -A -l control-plane=controller-manager --for condition=Ready + kubectl wait pod -A -l control-plane=sonataflow-operator --for condition=Ready - name: Run tests run: | diff --git a/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml b/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml index 43c03ea78..1cbd241cc 100644 --- a/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml +++ b/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: creationTimestamp: null labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: logic-operator-rhel8-controller-manager-metrics-service spec: ports: @@ -12,6 +12,6 @@ spec: protocol: TCP targetPort: https selector: - control-plane: controller-manager + control-plane: sonataflow-operator status: loadBalancer: {} diff --git a/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml b/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml index 8f0e8abd0..bf035854b 100644 --- a/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml +++ b/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml @@ -510,20 +510,20 @@ spec: serviceAccountName: logic-operator-rhel8-controller-manager deployments: - label: - control-plane: controller-manager + control-plane: sonataflow-operator name: logic-operator-rhel8-controller-manager spec: replicas: 1 selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator strategy: {} template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: containers: - args: diff --git a/bundle/manifests/sonataflow-operator-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/sonataflow-operator-controller-manager-metrics-service_v1_service.yaml index d9f1354fe..a00cdcf0c 100644 --- a/bundle/manifests/sonataflow-operator-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/manifests/sonataflow-operator-controller-manager-metrics-service_v1_service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: creationTimestamp: null labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: sonataflow-operator-controller-manager-metrics-service spec: ports: @@ -12,6 +12,6 @@ spec: protocol: TCP targetPort: https selector: - control-plane: controller-manager + control-plane: sonataflow-operator status: loadBalancer: {} diff --git a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml index 94baa4f11..53cf1015f 100644 --- a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml +++ b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml @@ -595,20 +595,20 @@ spec: serviceAccountName: sonataflow-operator-controller-manager deployments: - label: - control-plane: controller-manager + control-plane: sonataflow-operator name: sonataflow-operator-controller-manager spec: replicas: 1 selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator strategy: {} template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: containers: - args: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index f5485cdc6..3a5d65124 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: system --- apiVersion: apps/v1 @@ -11,18 +11,18 @@ metadata: name: controller-manager namespace: system labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator replicas: 1 template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: securityContext: runAsNonRoot: true diff --git a/config/manager/osl/manager.yaml b/config/manager/osl/manager.yaml index f5485cdc6..3a5d65124 100644 --- a/config/manager/osl/manager.yaml +++ b/config/manager/osl/manager.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: system --- apiVersion: apps/v1 @@ -11,18 +11,18 @@ metadata: name: controller-manager namespace: system labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator replicas: 1 template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: securityContext: runAsNonRoot: true diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index d19136ae7..87586daaa 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -4,7 +4,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: controller-manager-metrics-monitor namespace: system spec: @@ -17,4 +17,4 @@ spec: insecureSkipVerify: true selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 71f179727..7e961aa7b 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: controller-manager-metrics-service namespace: system spec: @@ -12,4 +12,4 @@ spec: protocol: TCP targetPort: https selector: - control-plane: controller-manager + control-plane: sonataflow-operator diff --git a/operator.yaml b/operator.yaml index 973b5cacc..df9c0cbbf 100644 --- a/operator.yaml +++ b/operator.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: sonataflow-operator-system --- apiVersion: apiextensions.k8s.io/v1 @@ -26548,7 +26548,7 @@ apiVersion: v1 kind: Service metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: sonataflow-operator-controller-manager-metrics-service namespace: sonataflow-operator-system spec: @@ -26558,26 +26558,26 @@ spec: protocol: TCP targetPort: https selector: - control-plane: controller-manager + control-plane: sonataflow-operator --- apiVersion: apps/v1 kind: Deployment metadata: labels: - control-plane: controller-manager + control-plane: sonataflow-operator name: sonataflow-operator-controller-manager namespace: sonataflow-operator-system spec: replicas: 1 selector: matchLabels: - control-plane: controller-manager + control-plane: sonataflow-operator template: metadata: annotations: kubectl.kubernetes.io/default-container: manager labels: - control-plane: controller-manager + control-plane: sonataflow-operator spec: containers: - args: diff --git a/testbdd/steps/operator.go b/testbdd/steps/operator.go index 8ed78a3b4..17467689c 100644 --- a/testbdd/steps/operator.go +++ b/testbdd/steps/operator.go @@ -53,7 +53,7 @@ func (data *Data) sonataFlowOperatorIsDeployed() (err error) { } //func (data *Data) sonataFlowOperatorHasPodsRunning(numberOfPods int, name, phase string) error { -// return framework.WaitForPodsWithLabel(data.Namespace, "control-plane", "controller-manager", numberOfPods, 1) +// return framework.WaitForPodsWithLabel(data.Namespace, "control-plane", "sonataflow-operator", numberOfPods, 1) //} // //func (data *Data) kogitoOperatorShouldBeInstalled() error {