Skip to content

Commit 10181e5

Browse files
neunhoefajanikow
authored andcommitted
Sort out permissions in reboot procedure example. (#456)
1 parent e9d44b9 commit 10181e5

File tree

1 file changed

+80
-16
lines changed

1 file changed

+80
-16
lines changed

examples/reboot-pod.yaml

Lines changed: 80 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,23 @@ apiVersion: v1
33
metadata:
44
name: kube-reboot-pod
55
spec:
6-
restartPolicy: OnFailure
7-
serviceAccountName: default
6+
restartPolicy: Never
7+
serviceAccountName: arango-deployment-operator-reboot
88
containers:
9-
- image: arangodb/kube-arangodb:0.3.10
9+
- image: arangodb/kube-arangodb:0.3.16
1010
name: reboot
1111
command: ["arangodb_operator", "reboot"]
1212
args:
13-
- --deployment-name=my-rebooted-depl
14-
- --image-name=arangodb/arangodb:3.4.3
13+
- --deployment-name=my-arangodb-cluster
14+
- --image-name=arangodb/enterprise:3.4.8
1515
- --license-secret-name=arangodb-license-key
1616
- --coordinators=3
17-
- pvc-5f98090b-4417-11e9-9423-42010aa401d7
18-
- pvc-60119ef4-4417-11e9-9423-42010aa401d7
19-
- pvc-60c8c3d8-4417-11e9-9423-42010aa401d7
20-
- pvc-6142d36a-4417-11e9-9423-42010aa401d7
21-
- pvc-61bce8a5-4417-11e9-9423-42010aa401d7
22-
- pvc-62928477-4417-11e9-9423-42010aa401d7
23-
- pvc-630c8f56-4417-11e9-9423-42010aa401d7
24-
- pvc-63680b68-4417-11e9-9423-42010aa401d7
25-
- pvc-63a52558-4417-11e9-9423-42010aa401d7
26-
- pvc-6400be5b-4417-11e9-9423-42010aa401d7
17+
- pvc-9aa241f7-df94-11e9-b74c-42010aac0044
18+
- pvc-9b1c76eb-df94-11e9-b74c-42010aac0044
19+
- pvc-9b966437-df94-11e9-b74c-42010aac0044
20+
- pvc-9c4d60d8-df94-11e9-b74c-42010aac0044
21+
- pvc-9d0480e4-df94-11e9-b74c-42010aac0044
22+
- pvc-9d418fb3-df94-11e9-b74c-42010aac0044
2723
env:
2824
- name: MY_POD_NAMESPACE
2925
valueFrom:
@@ -32,4 +28,72 @@ spec:
3228
- name: MY_POD_NAME
3329
valueFrom:
3430
fieldRef:
35-
fieldPath: metadata.name
31+
fieldPath: metadata.name
32+
33+
---
34+
35+
apiVersion: v1
36+
kind: ServiceAccount
37+
metadata:
38+
name: arango-deployment-operator-reboot
39+
namespace: default
40+
41+
---
42+
43+
apiVersion: rbac.authorization.k8s.io/v1
44+
kind: Role
45+
metadata:
46+
name: arango-deployment-operator-reboot
47+
namespace: default
48+
rules:
49+
- apiGroups: [""]
50+
resources: ["pods", "services", "endpoints", "persistentvolumeclaims", "events", "secrets"]
51+
verbs: ["*"]
52+
- apiGroups: ["database.arangodb.com"]
53+
resources: ["arangodeployments"]
54+
verbs: ["*"]
55+
56+
57+
---
58+
59+
apiVersion: rbac.authorization.k8s.io/v1
60+
kind: RoleBinding
61+
metadata:
62+
name: arango-deployment-operator-reboot
63+
namespace: default
64+
roleRef:
65+
apiGroup: rbac.authorization.k8s.io
66+
kind: Role
67+
name: arango-deployment-operator-reboot
68+
subjects:
69+
- kind: ServiceAccount
70+
name: arango-deployment-operator-reboot
71+
namespace: default
72+
73+
---
74+
75+
apiVersion: rbac.authorization.k8s.io/v1
76+
kind: ClusterRole
77+
metadata:
78+
name: arango-deployment-operator-reboot
79+
namespace: default
80+
rules:
81+
- apiGroups: [""]
82+
resources: ["persistentvolumes"]
83+
verbs: ["*"]
84+
85+
---
86+
87+
apiVersion: rbac.authorization.k8s.io/v1
88+
kind: ClusterRoleBinding
89+
metadata:
90+
name: arango-deployment-operator-reboot
91+
namespace: default
92+
roleRef:
93+
apiGroup: rbac.authorization.k8s.io
94+
kind: ClusterRole
95+
name: arango-deployment-operator-reboot
96+
subjects:
97+
- kind: ServiceAccount
98+
name: arango-deployment-operator-reboot
99+
namespace: default

0 commit comments

Comments
 (0)