Skip to content

Commit 4bd098e

Browse files
Add operator rbac to turtles
Signed-off-by: Danil-Grigorev <[email protected]>
1 parent 4bf4caf commit 4bd098e

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{{- if index .Values "rancherTurtles" "features" "embedded-operator" "enabled" }}
2-
apiversion: v1
2+
apiVersion: v1
33
kind: ConfigMap
44
metadata:
55
name: clusterctl-config
66
namespace: '{{ .Values.rancherTurtles.namespace }}'
7+
annotations:
8+
"helm.sh/hook": "pre-install, pre-upgrade"
9+
"helm.sh/hook-weight": "-1"
710
{{- end}}

charts/rancher-turtles/templates/operator-crds.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21810,4 +21810,18 @@ spec:
2181021810
storage: true
2181121811
subresources:
2181221812
status: {}
21813+
---
21814+
apiVersion: rbac.authorization.k8s.io/v1
21815+
kind: ClusterRole
21816+
metadata:
21817+
labels:
21818+
rancher-turtles/aggregate-to-manager: "true"
21819+
name: rancher-turtles-operator-admin
21820+
rules:
21821+
- apiGroups:
21822+
- '*'
21823+
resources:
21824+
- '*'
21825+
verbs:
21826+
- '*'
2181321827
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
labels:
5+
rancher-turtles/aggregate-to-manager: "true"
6+
name: operator-admin
7+
rules:
8+
- apiGroups:
9+
- '*'
10+
resources:
11+
- '*'
12+
verbs:
13+
- '*'

config/operator/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ resources:
99
- bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml
1010
- bases/operator.cluster.x-k8s.io_ipamproviders.yaml
1111
- bases/operator.cluster.x-k8s.io_runtimeextensionproviders.yaml
12+
- bases/operator_role.yaml
1213
#+kubebuilder:scaffold:crdkustomizeresource
1314

1415
patches:

0 commit comments

Comments
 (0)