Skip to content
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

feat: add pdb and topologySpreadConstraints to helm chart #651

Merged
merged 3 commits into from
Sep 24, 2024
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
5 changes: 4 additions & 1 deletion helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,7 @@ spec:
{{ end -}}
{{ if .Values.deployment.priorityClassName -}}
priorityClassName: {{ .Values.deployment.priorityClassName }}
{{ end -}}
{{ end -}}
{{ if .Values.deployment.topologySpreadConstraints -}}
topologySpreadConstraints: {{ .Values.deployment.topologySpreadConstraints | toYaml | nindent 8 }}
{{ end -}}
26 changes: 26 additions & 0 deletions helm/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{- if .Values.pdb.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "app.fullname" . }}
kimxogus marked this conversation as resolved.
Show resolved Hide resolved
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
k8s-app: {{ include "app.name" . }}
helm.sh/chart: {{ include "chart.name-version" . }}
control-plane: controller
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "app.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- with .Values.pdb.minAvailable }}
minAvailable: {{ . }}
{{- end }}
{{- with .Values.pdb.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
{{- end -}}
8 changes: 7 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ deployment:
priorityClassName: ""
# Number of replicas.
replicas: 2
topologySpreadConstraints: []

# If "installScope: cluster" then these labels will be applied to ClusterRole
role:
labels: {}
labels: {}
kimxogus marked this conversation as resolved.
Show resolved Hide resolved

metrics:
service:
Expand All @@ -54,6 +55,11 @@ resources:
memory: "128Mi"
cpu: "100m"

pdb:
enabled: false
minAvailable:
maxUnavailable:

# log level for the controller
log:
level: info
Expand Down
Loading