From 20df4e46f6fe859c5a032bf85e92d81fc8b71e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Mon, 11 Dec 2023 09:05:35 +0100 Subject: [PATCH 1/2] renames infrastructure manager roles and rolesbindings --- Makefile | 2 +- config/rbac/leader_election_role_binding.yaml | 4 ++-- config/rbac/role.yaml | 2 +- config/rbac/role_binding.yaml | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 51fb1a26..1e6039b4 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ help: ## Display this help. .PHONY: manifests manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. - $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases + $(CONTROLLER_GEN) rbac:roleName=infrastructure-manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases .PHONY: generate generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 99f110c3..c732a00b 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -3,12 +3,12 @@ kind: RoleBinding metadata: labels: app.kubernetes.io/name: rolebinding - app.kubernetes.io/instance: leader-election-rolebinding + app.kubernetes.io/instance: infrastructure-manager-le-rolebinding app.kubernetes.io/component: rbac app.kubernetes.io/created-by: infrastructure-manager app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize - name: leader-election-rolebinding + name: infrastructure-manager-le-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: Role diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 86cf5fbc..933d1522 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: manager-role + name: infrastructure-manager-role rules: - apiGroups: - "" diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 6fcf34b7..60f28ad3 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -3,16 +3,16 @@ kind: ClusterRoleBinding metadata: labels: app.kubernetes.io/name: clusterrolebinding - app.kubernetes.io/instance: manager-rolebinding + app.kubernetes.io/instance: infrastructure-manager-rolebinding app.kubernetes.io/component: rbac app.kubernetes.io/created-by: infrastructure-manager app.kubernetes.io/part-of: infrastructure-manager app.kubernetes.io/managed-by: kustomize - name: manager-rolebinding + name: infrastructure-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: manager-role + name: infrastructure-manager-role subjects: - kind: ServiceAccount name: infrastructure-manager From 10515373190ab7fa63ee036c80938365fb676f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Mon, 11 Dec 2023 10:59:39 +0100 Subject: [PATCH 2/2] adds missing label --- config/manager/manager.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index f7146aa7..ede85e34 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -36,6 +36,7 @@ spec: kubectl.kubernetes.io/default-container: manager labels: control-plane: infrastructure-manager + app.kubernetes.io/component: infrastructure-manager.kyma-project.io spec: # TODO(user): Uncomment the following code to configure the nodeAffinity expression # according to the platforms which are supported by your solution.