Skip to content

Commit 7f663d5

Browse files
authored
[Documentation] Replace Member procedure (#1800)
1 parent f39e053 commit 7f663d5

File tree

5 files changed

+125
-0
lines changed

5 files changed

+125
-0
lines changed

chart/kube-arangodb-arm64/templates/webhook/mutation.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,30 @@ webhooks:
3838
admissionReviewVersions: ["v1"]
3939
sideEffects: None
4040
timeoutSeconds: 5
41+
- name: "generic.pod.policies.scheduler.arangodb.com"
42+
namespaceSelector:
43+
matchExpressions:
44+
- key: kubernetes.io/metadata.name
45+
operator: In
46+
values:
47+
- {{ .Release.Namespace }}
48+
objectSelector:
49+
matchExpressions:
50+
- key: profiles.arangodb.com/apply
51+
operator: Exists
52+
rules:
53+
- apiGroups: [""]
54+
apiVersions: ["v1"]
55+
operations: ["CREATE"]
56+
resources: ["pods"]
57+
scope: "Namespaced"
58+
clientConfig:
59+
service:
60+
namespace: {{ .Release.Namespace }}
61+
name: {{ template "kube-arangodb.operatorName" . }}-webhook
62+
path: /webhook/core/v1/pods/policies/mutate
63+
admissionReviewVersions: ["v1"]
64+
sideEffects: None
65+
timeoutSeconds: 5
4166

4267
{{- end }}

chart/kube-arangodb-enterprise-arm64/templates/webhook/mutation.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,30 @@ webhooks:
3838
admissionReviewVersions: ["v1"]
3939
sideEffects: None
4040
timeoutSeconds: 5
41+
- name: "generic.pod.policies.scheduler.arangodb.com"
42+
namespaceSelector:
43+
matchExpressions:
44+
- key: kubernetes.io/metadata.name
45+
operator: In
46+
values:
47+
- {{ .Release.Namespace }}
48+
objectSelector:
49+
matchExpressions:
50+
- key: profiles.arangodb.com/apply
51+
operator: Exists
52+
rules:
53+
- apiGroups: [""]
54+
apiVersions: ["v1"]
55+
operations: ["CREATE"]
56+
resources: ["pods"]
57+
scope: "Namespaced"
58+
clientConfig:
59+
service:
60+
namespace: {{ .Release.Namespace }}
61+
name: {{ template "kube-arangodb.operatorName" . }}-webhook
62+
path: /webhook/core/v1/pods/policies/mutate
63+
admissionReviewVersions: ["v1"]
64+
sideEffects: None
65+
timeoutSeconds: 5
4166

4267
{{- end }}

chart/kube-arangodb-enterprise/templates/webhook/mutation.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,30 @@ webhooks:
3838
admissionReviewVersions: ["v1"]
3939
sideEffects: None
4040
timeoutSeconds: 5
41+
- name: "generic.pod.policies.scheduler.arangodb.com"
42+
namespaceSelector:
43+
matchExpressions:
44+
- key: kubernetes.io/metadata.name
45+
operator: In
46+
values:
47+
- {{ .Release.Namespace }}
48+
objectSelector:
49+
matchExpressions:
50+
- key: profiles.arangodb.com/apply
51+
operator: Exists
52+
rules:
53+
- apiGroups: [""]
54+
apiVersions: ["v1"]
55+
operations: ["CREATE"]
56+
resources: ["pods"]
57+
scope: "Namespaced"
58+
clientConfig:
59+
service:
60+
namespace: {{ .Release.Namespace }}
61+
name: {{ template "kube-arangodb.operatorName" . }}-webhook
62+
path: /webhook/core/v1/pods/policies/mutate
63+
admissionReviewVersions: ["v1"]
64+
sideEffects: None
65+
timeoutSeconds: 5
4166

4267
{{- end }}

chart/kube-arangodb/templates/webhook/mutation.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,30 @@ webhooks:
3838
admissionReviewVersions: ["v1"]
3939
sideEffects: None
4040
timeoutSeconds: 5
41+
- name: "generic.pod.policies.scheduler.arangodb.com"
42+
namespaceSelector:
43+
matchExpressions:
44+
- key: kubernetes.io/metadata.name
45+
operator: In
46+
values:
47+
- {{ .Release.Namespace }}
48+
objectSelector:
49+
matchExpressions:
50+
- key: profiles.arangodb.com/apply
51+
operator: Exists
52+
rules:
53+
- apiGroups: [""]
54+
apiVersions: ["v1"]
55+
operations: ["CREATE"]
56+
resources: ["pods"]
57+
scope: "Namespaced"
58+
clientConfig:
59+
service:
60+
namespace: {{ .Release.Namespace }}
61+
name: {{ template "kube-arangodb.operatorName" . }}-webhook
62+
path: /webhook/core/v1/pods/policies/mutate
63+
admissionReviewVersions: ["v1"]
64+
sideEffects: None
65+
timeoutSeconds: 5
4166

4267
{{- end }}

docs/how-to/replace-pod.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
layout: page
3+
title: How to replace Pod
4+
parent: How to ...
5+
---
6+
7+
# How to replace Pod
8+
9+
Replacement of ArangoDeployment Pods can be triggered by annotation.
10+
11+
Replacement of the pod will ensure that destruction of the member will never result in data loss.
12+
13+
Replacement is disabled for:
14+
- Single Servers
15+
16+
Replacement of member for particular groups will result in:
17+
- Agents - Member and PVC is recreated, Operator ensures that Quorum is kept during this operation
18+
- DBServers - New DBServer is added where data is migrated before removal
19+
- Coordinator, Gateway - Simple shutdown
20+
21+
Key: `deployment.arangodb.com/replace`
22+
Value: `true`
23+
24+
To rotate ArangoDeployment Pod kubectl command can be used:
25+
`kubectl annotate pod arango-pod deployment.arangodb.com/replace=true`

0 commit comments

Comments
 (0)