Skip to content

Commit 6d5835e

Browse files
committed
Added manifests/arango-deployment-replication.yaml
1 parent 4aac6fe commit 6d5835e

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
## deployment-replication/rbac.yaml
2+
## Cluster role granting access to ArangoDeploymentReplication resources.
3+
apiVersion: rbac.authorization.k8s.io/v1beta1
4+
kind: ClusterRole
5+
metadata:
6+
name: arango-deployment-replications
7+
rules:
8+
- apiGroups: ["replication.database.arangodb.com"]
9+
resources: ["arangodeploymentreplications"]
10+
verbs: ["*"]
11+
12+
---
13+
14+
## Cluster role granting access to all resources needed by the ArangoDeploymentReplication operator.
15+
apiVersion: rbac.authorization.k8s.io/v1beta1
16+
kind: ClusterRole
17+
metadata:
18+
name: arango-deployment-replication-operator
19+
rules:
20+
- apiGroups: ["replication.database.arangodb.com"]
21+
resources: ["arangodeploymentreplications"]
22+
verbs: ["*"]
23+
- apiGroups: ["database.arangodb.com"]
24+
resources: ["arangodeployments"]
25+
verbs: ["get"]
26+
- apiGroups: ["apiextensions.k8s.io"]
27+
resources: ["customresourcedefinitions"]
28+
verbs: ["get"]
29+
- apiGroups: [""]
30+
resources: ["pods", "services", "endpoints", "persistentvolumeclaims", "events", "secrets"]
31+
verbs: ["*"]
32+
- apiGroups: [""]
33+
resources: ["nodes"]
34+
verbs: ["get"]
35+
- apiGroups: ["apps"]
36+
resources: ["deployments"]
37+
verbs: ["*"]
38+
39+
---
40+
41+
## Bind the cluster role granting access to ArangoDeploymentReplication resources
42+
## to the default service account of the configured namespace.
43+
apiVersion: rbac.authorization.k8s.io/v1beta1
44+
kind: RoleBinding
45+
metadata:
46+
name: arango-deployment-replications
47+
namespace: default
48+
roleRef:
49+
apiGroup: rbac.authorization.k8s.io
50+
kind: ClusterRole
51+
name: arango-deployment-replications
52+
subjects:
53+
- kind: ServiceAccount
54+
name: default
55+
namespace: default
56+
57+
---
58+
59+
## Bind the cluster role granting access to all resources needed by
60+
## the ArangoDeploymentReplication operator to the default service account
61+
## the is being used to run the operator deployment.
62+
apiVersion: rbac.authorization.k8s.io/v1beta1
63+
kind: ClusterRoleBinding
64+
metadata:
65+
name: arango-deployment-replication-operator-default
66+
roleRef:
67+
apiGroup: rbac.authorization.k8s.io
68+
kind: ClusterRole
69+
name: arango-deployment-replication-operator
70+
subjects:
71+
- kind: ServiceAccount
72+
name: default
73+
namespace: default
74+
75+
---
76+
77+
## deployment-replication/deployment-replication.yaml
78+
79+
apiVersion: extensions/v1beta1
80+
kind: Deployment
81+
metadata:
82+
name: arango-deployment-replication-operator
83+
namespace: default
84+
spec:
85+
replicas: 2
86+
strategy:
87+
type: Recreate
88+
template:
89+
metadata:
90+
labels:
91+
name: arango-deployment-replication-operator
92+
app: arango-deployment-replication-operator
93+
spec:
94+
containers:
95+
- name: operator
96+
imagePullPolicy: IfNotPresent
97+
image: arangodb/kube-arangodb@sha256:43bdc14d072fb1912d885536c189a631076e13e5c3e8a87b06e5ddbe60c66a6d
98+
args:
99+
- --operator.deployment-replication
100+
env:
101+
- name: MY_POD_NAMESPACE
102+
valueFrom:
103+
fieldRef:
104+
fieldPath: metadata.namespace
105+
- name: MY_POD_NAME
106+
valueFrom:
107+
fieldRef:
108+
fieldPath: metadata.name
109+
- name: MY_POD_IP
110+
valueFrom:
111+
fieldRef:
112+
fieldPath: status.podIP
113+
ports:
114+
- name: metrics
115+
containerPort: 8528
116+
livenessProbe:
117+
httpGet:
118+
path: /health
119+
port: 8528
120+
scheme: HTTPS
121+
initialDelaySeconds: 5
122+
periodSeconds: 10
123+
readinessProbe:
124+
httpGet:
125+
path: /ready/deployment-replication
126+
port: 8528
127+
scheme: HTTPS
128+
initialDelaySeconds: 5
129+
periodSeconds: 10
130+
tolerations:
131+
- key: "node.kubernetes.io/unreachable"
132+
operator: "Exists"
133+
effect: "NoExecute"
134+
tolerationSeconds: 5
135+
- key: "node.kubernetes.io/not-ready"
136+
operator: "Exists"
137+
effect: "NoExecute"
138+
tolerationSeconds: 5
139+

0 commit comments

Comments
 (0)