Skip to content

[Documentation] Replace Member procedure #1800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions chart/kube-arangodb-arm64/templates/webhook/mutation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@ webhooks:
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
- name: "generic.pod.policies.scheduler.arangodb.com"
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- {{ .Release.Namespace }}
objectSelector:
matchExpressions:
- key: profiles.arangodb.com/apply
operator: Exists
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "Namespaced"
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ template "kube-arangodb.operatorName" . }}-webhook
path: /webhook/core/v1/pods/policies/mutate
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5

{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@ webhooks:
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
- name: "generic.pod.policies.scheduler.arangodb.com"
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- {{ .Release.Namespace }}
objectSelector:
matchExpressions:
- key: profiles.arangodb.com/apply
operator: Exists
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "Namespaced"
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ template "kube-arangodb.operatorName" . }}-webhook
path: /webhook/core/v1/pods/policies/mutate
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5

{{- end }}
25 changes: 25 additions & 0 deletions chart/kube-arangodb-enterprise/templates/webhook/mutation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@ webhooks:
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
- name: "generic.pod.policies.scheduler.arangodb.com"
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- {{ .Release.Namespace }}
objectSelector:
matchExpressions:
- key: profiles.arangodb.com/apply
operator: Exists
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "Namespaced"
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ template "kube-arangodb.operatorName" . }}-webhook
path: /webhook/core/v1/pods/policies/mutate
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5

{{- end }}
25 changes: 25 additions & 0 deletions chart/kube-arangodb/templates/webhook/mutation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@ webhooks:
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5
- name: "generic.pod.policies.scheduler.arangodb.com"
namespaceSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- {{ .Release.Namespace }}
objectSelector:
matchExpressions:
- key: profiles.arangodb.com/apply
operator: Exists
rules:
- apiGroups: [""]
apiVersions: ["v1"]
operations: ["CREATE"]
resources: ["pods"]
scope: "Namespaced"
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ template "kube-arangodb.operatorName" . }}-webhook
path: /webhook/core/v1/pods/policies/mutate
admissionReviewVersions: ["v1"]
sideEffects: None
timeoutSeconds: 5

{{- end }}
25 changes: 25 additions & 0 deletions docs/how-to/replace-pod.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: page
title: How to replace Pod
parent: How to ...
---

# How to replace Pod

Replacement of ArangoDeployment Pods can be triggered by annotation.

Replacement of the pod will ensure that destruction of the member will never result in data loss.

Replacement is disabled for:
- Single Servers

Replacement of member for particular groups will result in:
- Agents - Member and PVC is recreated, Operator ensures that Quorum is kept during this operation
- DBServers - New DBServer is added where data is migrated before removal
- Coordinator, Gateway - Simple shutdown

Key: `deployment.arangodb.com/replace`
Value: `true`

To rotate ArangoDeployment Pod kubectl command can be used:
`kubectl annotate pod arango-pod deployment.arangodb.com/replace=true`