feat(argo-cd): add poddisruptionbudget template. (#1110)
Signed-off-by: mugioka <okamugi0722@gmail.com>
This commit is contained in:
parent
4c1ee93faf
commit
f1995d697e
8 changed files with 202 additions and 2 deletions
|
|
@ -0,0 +1,26 @@
|
|||
{{- if .Values.controller.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-cd.controller.fullname" . }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }}
|
||||
{{- with .Values.controller.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.controller.pdb.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.controller.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.controller.pdb.minAvailable }}
|
||||
{{- else if .Values.controller.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.controller.pdb.maxUnavailable }}
|
||||
{{- else }}
|
||||
minAvailable: 0
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }}
|
||||
{{- end }}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{{- if .Values.repoServer.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-cd.repoServer.fullname" . }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }}
|
||||
{{- with .Values.repoServer.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.repoServer.pdb.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.repoServer.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.repoServer.pdb.minAvailable }}
|
||||
{{- else if .Values.repoServer.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.repoServer.pdb.maxUnavailable }}
|
||||
{{- else }}
|
||||
minAvailable: 0
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.repoServer.name) | nindent 6 }}
|
||||
{{- end }}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{{- if .Values.server.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-cd.server.fullname" . }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
|
||||
{{- with .Values.server.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.server.pdb.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.server.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.server.pdb.minAvailable }}
|
||||
{{- else if .Values.server.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.server.pdb.maxUnavailable }}
|
||||
{{- else }}
|
||||
minAvailable: 0
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }}
|
||||
{{- end }}
|
||||
26
charts/argo-cd/templates/dex/poddisruptionbudget.yaml
Normal file
26
charts/argo-cd/templates/dex/poddisruptionbudget.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{{- if .Values.dex.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-cd.dex.fullname" . }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
|
||||
{{- with .Values.dex.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.dex.pdb.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.dex.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.dex.pdb.minAvailable }}
|
||||
{{- else if .Values.dex.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.dex.pdb.maxUnavailable }}
|
||||
{{- else }}
|
||||
minAvailable: 0
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }}
|
||||
{{- end }}
|
||||
26
charts/argo-cd/templates/redis/poddisruptionbudget.yaml
Normal file
26
charts/argo-cd/templates/redis/poddisruptionbudget.yaml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{{- if .Values.redis.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-cd.redis.fullname" . }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
||||
{{- with .Values.redis.pdb.labels }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.redis.pdb.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.redis.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.redis.pdb.minAvailable }}
|
||||
{{- else if .Values.redis.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.redis.pdb.maxUnavailable }}
|
||||
{{- else }}
|
||||
minAvailable: 0
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue