Skip to content

Commit

Permalink
Add PDB and anti affinity (#1392)
Browse files Browse the repository at this point in the history
  • Loading branch information
marians authored Apr 8, 2022
1 parent ebdd4d5 commit e4de526
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helm/docs-app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ spec:
labels:
app: {{ .Values.name }}
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
app: {{ .Values.name }}
topologyKey: kubernetes.io/hostname
weight: 100
securityContext:
runAsUser: 1000
containers:
Expand Down
11 changes: 11 additions & 0 deletions helm/docs-app/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Capabilities.APIVersions.Has "policy/v1/PodDisruptionBudget" }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "resource.dex.name" . }}
spec:
minAvailable: 1
selector:
matchLabels:
app: {{ .Values.name }}
{{- end }}

0 comments on commit e4de526

Please sign in to comment.