From e7dde5f478dcb89e2780d5c4aa916a5e4fc9295d Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Tue, 7 Jan 2025 14:33:41 +0100 Subject: [PATCH] wip --- Makefile | 6 +- ...-operator-metrics-service_v1_service.yaml} | 6 +- ...kstage-operator.clusterserviceversion.yaml | 8 +- ...kstage-operator.clusterserviceversion.yaml | 6 +- ...c.authorization.k8s.io_v1_clusterrole.yaml | 4 +- ...c.authorization.k8s.io_v1_clusterrole.yaml | 4 +- ...er-manager-metrics-service_v1_service.yaml | 23 ------ ...c.authorization.k8s.io_v1_clusterrole.yaml | 4 +- bundle/rhdh/metadata/annotations.yaml | 2 +- config/manager/deployment.yaml | 10 +-- .../profile/backstage.io/kustomization.yaml | 2 +- config/profile/backstage.io/namespace.yaml | 8 +- config/profile/external/kustomization.yaml | 2 +- config/profile/rhdh/kustomization.yaml | 7 +- config/profile/rhdh/namespace.yaml | 8 +- .../{env-patch.yaml => deployment-patch.yaml} | 12 ++- config/prometheus/monitor.yaml | 8 +- config/rbac/_common/role.yaml | 81 ------------------- config/rbac/backstage.io/kustomization.yaml | 4 - config/rbac/backstage.io/metrics_service.yaml | 21 ----- .../{_common => }/backstage_editor_role.yaml | 0 .../{_common => }/backstage_viewer_role.yaml | 0 config/rbac/{_common => }/kustomization.yaml | 1 + .../{_common => }/leader_election_role.yaml | 0 .../leader_election_role_binding.yaml | 2 +- .../rbac/{_common => }/metrics_auth_role.yaml | 0 .../metrics_auth_role_binding.yaml | 2 +- config/rbac/{_common => }/metrics_reader.yaml | 0 config/rbac/{rhdh => }/metrics_service.yaml | 6 +- config/rbac/rhdh/kustomization.yaml | 4 - config/rbac/{_common => }/role_binding.yaml | 2 +- .../rbac/{_common => }/service_account.yaml | 2 +- 32 files changed, 55 insertions(+), 190 deletions(-) rename bundle/backstage.io/manifests/{backstage-controller-manager-metrics-service_v1_service.yaml => backstage-operator-metrics-service_v1_service.yaml} (79%) delete mode 100644 bundle/rhdh/manifests/rhdh-controller-manager-metrics-service_v1_service.yaml rename config/profile/rhdh/patches/{env-patch.yaml => deployment-patch.yaml} (67%) delete mode 100644 config/rbac/_common/role.yaml delete mode 100644 config/rbac/backstage.io/kustomization.yaml delete mode 100644 config/rbac/backstage.io/metrics_service.yaml rename config/rbac/{_common => }/backstage_editor_role.yaml (100%) rename config/rbac/{_common => }/backstage_viewer_role.yaml (100%) rename config/rbac/{_common => }/kustomization.yaml (98%) rename config/rbac/{_common => }/leader_election_role.yaml (100%) rename config/rbac/{_common => }/leader_election_role_binding.yaml (95%) rename config/rbac/{_common => }/metrics_auth_role.yaml (100%) rename config/rbac/{_common => }/metrics_auth_role_binding.yaml (94%) rename config/rbac/{_common => }/metrics_reader.yaml (100%) rename config/rbac/{rhdh => }/metrics_service.yaml (84%) delete mode 100644 config/rbac/rhdh/kustomization.yaml rename config/rbac/{_common => }/role_binding.yaml (95%) rename config/rbac/{_common => }/service_account.yaml (92%) diff --git a/Makefile b/Makefile index 1bbd5286..09552417 100644 --- a/Makefile +++ b/Makefile @@ -308,9 +308,9 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada $(KUSTOMIZE) build config/manifests/$(PROFILE) | $(OPERATOR_SDK) generate bundle --kustomize-dir config/manifests/$(PROFILE) $(BUNDLE_GEN_FLAGS) $(OPERATOR_SDK) bundle validate ./bundle/$(PROFILE) @mv -f bundle.Dockerfile ./bundle/$(PROFILE)/bundle.Dockerfile - @sed -i 's/-controller-manager/-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml - @sed -i 's/: controller-manager/: $(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml - @sed -i 's/backstage-operator/$(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml +# @sed -i 's/-controller-manager/-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml +# @sed -i 's/: controller-manager/: $(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml +# @sed -i 's/backstage-operator/$(PROFILE_SHORT)-operator/g' ./bundle/$(PROFILE)/manifests/*.yaml @sed -i 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/metadata/annotations.yaml @sed -i 's/backstage-operator/$(BUNDLE_METADATA_PACKAGE_NAME)/g' ./bundle/$(PROFILE)/bundle.Dockerfile diff --git a/bundle/backstage.io/manifests/backstage-controller-manager-metrics-service_v1_service.yaml b/bundle/backstage.io/manifests/backstage-operator-metrics-service_v1_service.yaml similarity index 79% rename from bundle/backstage.io/manifests/backstage-controller-manager-metrics-service_v1_service.yaml rename to bundle/backstage.io/manifests/backstage-operator-metrics-service_v1_service.yaml index fce84d6e..99423f3a 100644 --- a/bundle/backstage.io/manifests/backstage-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/backstage.io/manifests/backstage-operator-metrics-service_v1_service.yaml @@ -3,10 +3,10 @@ kind: Service metadata: creationTimestamp: null labels: - app: backstage-operator + app: operator app.kubernetes.io/component: metrics app.kubernetes.io/created-by: backstage-operator - app.kubernetes.io/instance: backstage-operator-metrics-service + app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: service app.kubernetes.io/part-of: backstage-operator @@ -18,6 +18,6 @@ spec: protocol: TCP targetPort: metrics selector: - app: backstage-operator + app: operator status: loadBalancer: {} diff --git a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml index 1c384d29..e9e09af1 100644 --- a/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/backstage.io/manifests/backstage-operator.clusterserviceversion.yaml @@ -35,7 +35,7 @@ metadata: } } ] - createdAt: "2025-01-07T11:35:26Z" + createdAt: "2025-01-07T13:28:03Z" description: Backstage Operator operators.operatorframework.io/builder: operator-sdk-v1.37.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 @@ -168,13 +168,13 @@ spec: serviceAccountName: backstage-operator deployments: - label: - app: backstage-operator + app: operator name: backstage-operator spec: replicas: 1 selector: matchLabels: - app: backstage-operator + app: operator strategy: type: RollingUpdate template: @@ -182,7 +182,7 @@ spec: annotations: kubectl.kubernetes.io/default-container: manager labels: - app: backstage-operator + app: operator spec: affinity: nodeAffinity: diff --git a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml index c3691550..304da9b1 100644 --- a/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml +++ b/bundle/rhdh/manifests/backstage-operator.clusterserviceversion.yaml @@ -42,7 +42,7 @@ metadata: categories: Developer Tools certified: "true" containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.5 - createdAt: "2025-01-07T11:35:29Z" + createdAt: "2025-01-07T13:28:05Z" description: Red Hat Developer Hub is a Red Hat supported version of Backstage. It comes with pre-built plug-ins and configuration settings, supports use of an external database, and can help streamline the process of setting up a self-managed @@ -66,7 +66,7 @@ metadata: support: Red Hat labels: operatorframework.io/arch.amd64: supported - name: rhdh-operator.v1.5.0 + name: backstage-operator.v1.5.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -226,6 +226,8 @@ spec: kubectl.kubernetes.io/default-container: manager labels: app: rhdh-operator + app.kubernetes.io/component: rhdh-operator + app.kubernetes.io/managed-by: olm spec: affinity: nodeAffinity: diff --git a/bundle/rhdh/manifests/rhdh-backstage-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/rhdh/manifests/rhdh-backstage-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml index dfdccc2a..dce2a4d6 100644 --- a/bundle/rhdh/manifests/rhdh-backstage-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/rhdh/manifests/rhdh-backstage-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -4,11 +4,11 @@ metadata: creationTimestamp: null labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: rhdh-operator + app.kubernetes.io/created-by: backstage-operator app.kubernetes.io/instance: backstage-editor-role app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: rhdh-operator + app.kubernetes.io/part-of: backstage-operator name: rhdh-backstage-editor-role rules: - apiGroups: diff --git a/bundle/rhdh/manifests/rhdh-backstage-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/rhdh/manifests/rhdh-backstage-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml index c467efee..ce86d897 100644 --- a/bundle/rhdh/manifests/rhdh-backstage-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/rhdh/manifests/rhdh-backstage-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -4,11 +4,11 @@ metadata: creationTimestamp: null labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: rhdh-operator + app.kubernetes.io/created-by: backstage-operator app.kubernetes.io/instance: backstage-viewer-role app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: rhdh-operator + app.kubernetes.io/part-of: backstage-operator name: rhdh-backstage-viewer-role rules: - apiGroups: diff --git a/bundle/rhdh/manifests/rhdh-controller-manager-metrics-service_v1_service.yaml b/bundle/rhdh/manifests/rhdh-controller-manager-metrics-service_v1_service.yaml deleted file mode 100644 index 2e01cf7f..00000000 --- a/bundle/rhdh/manifests/rhdh-controller-manager-metrics-service_v1_service.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - creationTimestamp: null - labels: - app: rhdh-operator - app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: rhdh-operator - app.kubernetes.io/instance: rhdh-operator-metrics-service - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: service - app.kubernetes.io/part-of: rhdh-operator - name: rhdh-operator-metrics-service -spec: - ports: - - name: metrics - port: 8443 - protocol: TCP - targetPort: metrics - selector: - app: rhdh-operator -status: - loadBalancer: {} diff --git a/bundle/rhdh/manifests/rhdh-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/rhdh/manifests/rhdh-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml index 7baad1c1..1ee5de04 100644 --- a/bundle/rhdh/manifests/rhdh-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/rhdh/manifests/rhdh-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -4,11 +4,11 @@ metadata: creationTimestamp: null labels: app.kubernetes.io/component: metrics-rbac - app.kubernetes.io/created-by: rhdh-operator + app.kubernetes.io/created-by: backstage-operator app.kubernetes.io/instance: metrics-reader app.kubernetes.io/managed-by: kustomize app.kubernetes.io/name: clusterrole - app.kubernetes.io/part-of: rhdh-operator + app.kubernetes.io/part-of: backstage-operator name: rhdh-metrics-reader rules: - nonResourceURLs: diff --git a/bundle/rhdh/metadata/annotations.yaml b/bundle/rhdh/metadata/annotations.yaml index d8ebbe60..6962915e 100644 --- a/bundle/rhdh/metadata/annotations.yaml +++ b/bundle/rhdh/metadata/annotations.yaml @@ -3,7 +3,7 @@ annotations: operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: rhdh + operators.operatorframework.io.bundle.package.v1: backstage-operator operators.operatorframework.io.bundle.channels.v1: fast,fast-${CI_X_VERSION}.${CI_Y_VERSION} operators.operatorframework.io.bundle.channel.default.v1: fast operators.operatorframework.io.metrics.builder: operator-sdk-v1.37.0 diff --git a/config/manager/deployment.yaml b/config/manager/deployment.yaml index 1bca3809..39aca307 100644 --- a/config/manager/deployment.yaml +++ b/config/manager/deployment.yaml @@ -1,14 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: operator labels: - app: backstage-controller-manager + app: operator spec: replicas: 1 selector: matchLabels: - app: backstage-controller-manager + app: operator strategy: type: RollingUpdate template: @@ -16,7 +16,7 @@ spec: annotations: kubectl.kubernetes.io/default-container: manager labels: - app: backstage-controller-manager + app: operator spec: # Required because the operator does not work without a Service Account Token automountServiceAccountToken: true # NOSONAR @@ -92,7 +92,7 @@ spec: volumeMounts: - mountPath: /default-config name: default-config - serviceAccountName: controller-manager + serviceAccountName: operator terminationGracePeriodSeconds: 10 volumes: - name: default-config diff --git a/config/profile/backstage.io/kustomization.yaml b/config/profile/backstage.io/kustomization.yaml index f33a9f93..5c74dcea 100644 --- a/config/profile/backstage.io/kustomization.yaml +++ b/config/profile/backstage.io/kustomization.yaml @@ -13,7 +13,7 @@ namePrefix: backstage- resources: - ../../crd -- ../../rbac/backstage.io +- ../../rbac - ../../manager - namespace.yaml diff --git a/config/profile/backstage.io/namespace.yaml b/config/profile/backstage.io/namespace.yaml index ec639451..51e961f8 100644 --- a/config/profile/backstage.io/namespace.yaml +++ b/config/profile/backstage.io/namespace.yaml @@ -2,11 +2,5 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager - app.kubernetes.io/name: namespace - app.kubernetes.io/instance: system - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: backstage-operator - app.kubernetes.io/part-of: backstage-operator - app.kubernetes.io/managed-by: kustomize + app: operator name: system \ No newline at end of file diff --git a/config/profile/external/kustomization.yaml b/config/profile/external/kustomization.yaml index e42fcf79..57eb66af 100644 --- a/config/profile/external/kustomization.yaml +++ b/config/profile/external/kustomization.yaml @@ -8,7 +8,7 @@ namePrefix: backstage- resources: - ../../crd -- ../../rbac/external +- ../../rbac - ../../manager images: diff --git a/config/profile/rhdh/kustomization.yaml b/config/profile/rhdh/kustomization.yaml index ba3648f6..688de9d8 100644 --- a/config/profile/rhdh/kustomization.yaml +++ b/config/profile/rhdh/kustomization.yaml @@ -13,7 +13,7 @@ namePrefix: rhdh- resources: - ../../crd -- ../../rbac/rhdh +- ../../rbac - ../../manager - namespace.yaml @@ -23,11 +23,10 @@ images: newTag: "1.5" patches: -- path: patches/env-patch.yaml +- path: patches/deployment-patch.yaml target: kind: Deployment - name: controller-manager - + name: operator generatorOptions: disableNameSuffixHash: true diff --git a/config/profile/rhdh/namespace.yaml b/config/profile/rhdh/namespace.yaml index db987089..3786f311 100644 --- a/config/profile/rhdh/namespace.yaml +++ b/config/profile/rhdh/namespace.yaml @@ -2,11 +2,5 @@ apiVersion: v1 kind: Namespace metadata: labels: - control-plane: controller-manager - app.kubernetes.io/name: namespace - app.kubernetes.io/instance: system - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: backstage-operator - app.kubernetes.io/part-of: backstage-operator - app.kubernetes.io/managed-by: kustomize + app: operator name: operator diff --git a/config/profile/rhdh/patches/env-patch.yaml b/config/profile/rhdh/patches/deployment-patch.yaml similarity index 67% rename from config/profile/rhdh/patches/env-patch.yaml rename to config/profile/rhdh/patches/deployment-patch.yaml index 4236206e..fd8a4584 100644 --- a/config/profile/rhdh/patches/env-patch.yaml +++ b/config/profile/rhdh/patches/deployment-patch.yaml @@ -1,9 +1,19 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: controller-manager + name: operator + labels: + app: rhdh-operator spec: + selector: + matchLabels: + app: rhdh-operator template: + metadata: + labels: + app: rhdh-operator + app.kubernetes.io/component: rhdh-operator + app.kubernetes.io/managed-by: olm spec: containers: - name: manager diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index b4feb71f..17c1a907 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -3,10 +3,8 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: labels: - control-plane: controller-manager - app.kubernetes.io/name: backstage-operator - app.kubernetes.io/managed-by: kustomize - name: controller-manager-metrics-monitor + app: controller + name: operator-metrics-monitor namespace: system spec: endpoints: @@ -18,4 +16,4 @@ spec: insecureSkipVerify: true selector: matchLabels: - control-plane: controller-manager + app: operator diff --git a/config/rbac/_common/role.yaml b/config/rbac/_common/role.yaml deleted file mode 100644 index 5267b3a8..00000000 --- a/config/rbac/_common/role.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: manager-role -rules: -- apiGroups: - - "" - resources: - - configmaps - - persistentvolumeclaims - - secrets - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - persistentvolumes - verbs: - - get - - list - - watch -- apiGroups: - - apps - resources: - - deployments - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rhdh.redhat.com - resources: - - backstages - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rhdh.redhat.com - resources: - - backstages/finalizers - verbs: - - update -- apiGroups: - - rhdh.redhat.com - resources: - - backstages/status - verbs: - - get - - patch - - update -- apiGroups: - - route.openshift.io - resources: - - routes - - routes/custom-host - verbs: - - create - - delete - - get - - list - - patch - - update - - watch diff --git a/config/rbac/backstage.io/kustomization.yaml b/config/rbac/backstage.io/kustomization.yaml deleted file mode 100644 index df5a3270..00000000 --- a/config/rbac/backstage.io/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -resources: -- ../_common -# Metrics -- metrics_service.yaml diff --git a/config/rbac/backstage.io/metrics_service.yaml b/config/rbac/backstage.io/metrics_service.yaml deleted file mode 100644 index e298f27e..00000000 --- a/config/rbac/backstage.io/metrics_service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app: backstage-operator - app.kubernetes.io/name: service - app.kubernetes.io/instance: controller-manager-metrics-service - app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: backstage-operator - app.kubernetes.io/part-of: backstage-operator - app.kubernetes.io/managed-by: kustomize - name: controller-manager-metrics-service - namespace: system -spec: - ports: - - name: metrics - port: 8443 - protocol: TCP - targetPort: metrics - selector: - app: backstage-operator diff --git a/config/rbac/_common/backstage_editor_role.yaml b/config/rbac/backstage_editor_role.yaml similarity index 100% rename from config/rbac/_common/backstage_editor_role.yaml rename to config/rbac/backstage_editor_role.yaml diff --git a/config/rbac/_common/backstage_viewer_role.yaml b/config/rbac/backstage_viewer_role.yaml similarity index 100% rename from config/rbac/_common/backstage_viewer_role.yaml rename to config/rbac/backstage_viewer_role.yaml diff --git a/config/rbac/_common/kustomization.yaml b/config/rbac/kustomization.yaml similarity index 98% rename from config/rbac/_common/kustomization.yaml rename to config/rbac/kustomization.yaml index 33001e0a..d449df95 100644 --- a/config/rbac/_common/kustomization.yaml +++ b/config/rbac/kustomization.yaml @@ -10,6 +10,7 @@ resources: - leader_election_role.yaml - leader_election_role_binding.yaml # Metrics +- metrics_service.yaml # The following RBAC configurations are used to protect # the metrics endpoint with authn/authz. These configurations # ensure that only authorized users and service accounts diff --git a/config/rbac/_common/leader_election_role.yaml b/config/rbac/leader_election_role.yaml similarity index 100% rename from config/rbac/_common/leader_election_role.yaml rename to config/rbac/leader_election_role.yaml diff --git a/config/rbac/_common/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml similarity index 95% rename from config/rbac/_common/leader_election_role_binding.yaml rename to config/rbac/leader_election_role_binding.yaml index dfdf1017..a2ff639c 100644 --- a/config/rbac/_common/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -15,5 +15,5 @@ roleRef: name: leader-election-role subjects: - kind: ServiceAccount - name: controller-manager + name: operator namespace: system diff --git a/config/rbac/_common/metrics_auth_role.yaml b/config/rbac/metrics_auth_role.yaml similarity index 100% rename from config/rbac/_common/metrics_auth_role.yaml rename to config/rbac/metrics_auth_role.yaml diff --git a/config/rbac/_common/metrics_auth_role_binding.yaml b/config/rbac/metrics_auth_role_binding.yaml similarity index 94% rename from config/rbac/_common/metrics_auth_role_binding.yaml rename to config/rbac/metrics_auth_role_binding.yaml index 1159515b..5607698f 100644 --- a/config/rbac/_common/metrics_auth_role_binding.yaml +++ b/config/rbac/metrics_auth_role_binding.yaml @@ -14,5 +14,5 @@ roleRef: name: metrics-auth-role subjects: - kind: ServiceAccount - name: controller-manager + name: operator namespace: system diff --git a/config/rbac/_common/metrics_reader.yaml b/config/rbac/metrics_reader.yaml similarity index 100% rename from config/rbac/_common/metrics_reader.yaml rename to config/rbac/metrics_reader.yaml diff --git a/config/rbac/rhdh/metrics_service.yaml b/config/rbac/metrics_service.yaml similarity index 84% rename from config/rbac/rhdh/metrics_service.yaml rename to config/rbac/metrics_service.yaml index f94a308b..34517f71 100644 --- a/config/rbac/rhdh/metrics_service.yaml +++ b/config/rbac/metrics_service.yaml @@ -2,14 +2,14 @@ apiVersion: v1 kind: Service metadata: labels: - app: rhdh-operator + app: operator app.kubernetes.io/name: service app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/component: metrics app.kubernetes.io/created-by: backstage-operator app.kubernetes.io/part-of: backstage-operator app.kubernetes.io/managed-by: kustomize - name: controller-manager-metrics-service + name: operator-metrics-service namespace: system spec: ports: @@ -18,4 +18,4 @@ spec: protocol: TCP targetPort: metrics selector: - app: rhdh-operator + app: operator diff --git a/config/rbac/rhdh/kustomization.yaml b/config/rbac/rhdh/kustomization.yaml deleted file mode 100644 index df5a3270..00000000 --- a/config/rbac/rhdh/kustomization.yaml +++ /dev/null @@ -1,4 +0,0 @@ -resources: -- ../_common -# Metrics -- metrics_service.yaml diff --git a/config/rbac/_common/role_binding.yaml b/config/rbac/role_binding.yaml similarity index 95% rename from config/rbac/_common/role_binding.yaml rename to config/rbac/role_binding.yaml index 1ad28fea..211299c9 100644 --- a/config/rbac/_common/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -15,5 +15,5 @@ roleRef: name: manager-role subjects: - kind: ServiceAccount - name: controller-manager + name: operator namespace: system diff --git a/config/rbac/_common/service_account.yaml b/config/rbac/service_account.yaml similarity index 92% rename from config/rbac/_common/service_account.yaml rename to config/rbac/service_account.yaml index 292ba189..7b511789 100644 --- a/config/rbac/_common/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -8,5 +8,5 @@ metadata: app.kubernetes.io/created-by: backstage-operator app.kubernetes.io/part-of: backstage-operator app.kubernetes.io/managed-by: kustomize - name: controller-manager + name: operator namespace: system