Skip to content

Commit

Permalink
Rename RBAC in metal-operator-remote
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuckal777 committed Nov 15, 2024
1 parent 46a58b9 commit 9956754
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kube-system
namePrefix: metal-operator-
resources:
- github.com/ironcore-dev/metal-operator//config/crd
- github.com/ironcore-dev/metal-operator//config/rbac
6 changes: 3 additions & 3 deletions system/kustomize/metal-operator-remote/remote-kubeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
resources.gardener.cloud/purpose: token-requestor
resources.gardener.cloud/class: shoot
annotations:
serviceaccount.resources.gardener.cloud/name: controller-manager
serviceaccount.resources.gardener.cloud/name: metal-operator-controller-manager
serviceaccount.resources.gardener.cloud/namespace: kube-system
stringData:
kubeconfig: |
Expand All @@ -19,13 +19,13 @@ stringData:
contexts:
- context:
cluster: remote-cluster
user: controller-manager
user: metal-operator-controller-manager
namespace: kube-system
name: remote-cluster
current-context: remote-cluster
kind: Config
preferences: {}
users:
- name: controller-manager
- name: metal-operator-controller-manager
user:
token: ""
30 changes: 15 additions & 15 deletions system/metal-operator-remote/managedresources/kustomize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: serviceaccount
app.kubernetes.io/part-of: metal-operator
name: controller-manager
name: metal-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -1233,7 +1233,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: role
app.kubernetes.io/part-of: metal-operator
name: leader-election-role
name: metal-operator-leader-election-role
namespace: kube-system
rules:
- apiGroups:
Expand Down Expand Up @@ -1271,7 +1271,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: manager-role
name: metal-operator-manager-role
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -1350,7 +1350,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: metal-operator
name: metrics-reader
name: metal-operator-metrics-reader
rules:
- nonResourceURLs:
- /metrics
Expand All @@ -1367,7 +1367,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrole
app.kubernetes.io/part-of: metal-operator
name: proxy-role
name: metal-operator-proxy-role
rules:
- apiGroups:
- authentication.k8s.io
Expand All @@ -1392,15 +1392,15 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: rolebinding
app.kubernetes.io/part-of: metal-operator
name: leader-election-rolebinding
name: metal-operator-leader-election-rolebinding
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: leader-election-role
name: metal-operator-leader-election-role
subjects:
- kind: ServiceAccount
name: controller-manager
name: metal-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -1413,14 +1413,14 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/part-of: metal-operator
name: manager-rolebinding
name: metal-operator-manager-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: manager-role
name: metal-operator-manager-role
subjects:
- kind: ServiceAccount
name: controller-manager
name: metal-operator-controller-manager
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -1433,14 +1433,14 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/part-of: metal-operator
name: proxy-rolebinding
name: metal-operator-proxy-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: proxy-role
name: metal-operator-proxy-role
subjects:
- kind: ServiceAccount
name: controller-manager
name: metal-operator-controller-manager
namespace: kube-system
---
apiVersion: v1
Expand All @@ -1454,7 +1454,7 @@ metadata:
app.kubernetes.io/name: service
app.kubernetes.io/part-of: metal-operator
control-plane: controller-manager
name: controller-manager-metrics-service
name: metal-operator-controller-manager-metrics-service
namespace: kube-system
spec:
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
control-plane: controller-manager
{{- include "metal-operator-remote.selectorLabels" . | nindent 4 }}
ports:
{{- .Values.metalRegistryService.ports | toYaml | nindent 2 }}
{{- .Values.metalRegistryService.ports | toYaml | nindent 2 }}
6 changes: 3 additions & 3 deletions system/metal-operator-remote/templates/remote-kubeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
resources.gardener.cloud/purpose: token-requestor
resources.gardener.cloud/class: shoot
annotations:
serviceaccount.resources.gardener.cloud/name: controller-manager
serviceaccount.resources.gardener.cloud/name: metal-operator-controller-manager
serviceaccount.resources.gardener.cloud/namespace: kube-system
stringData:
kubeconfig: |
Expand All @@ -19,13 +19,13 @@ stringData:
contexts:
- context:
cluster: remote-cluster
user: controller-manager
user: metal-operator-controller-manager
namespace: kube-system
name: remote-cluster
current-context: remote-cluster
kind: Config
preferences: {}
users:
- name: controller-manager
- name: metal-operator-controller-manager
user:
token: ""

0 comments on commit 9956754

Please sign in to comment.