Skip to content

Commit f0bde74

Browse files
authored
Merge 6051530 into cd66e2e
2 parents cd66e2e + 6051530 commit f0bde74

12 files changed

+50
-1
lines changed

charts/posthog/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type: application
1111

1212
# This is the chart version. This version number should be incremented each time you make changes
1313
# to the chart and its templates, including the app version.
14-
version: 30.32.0
14+
version: 30.33.0
1515

1616
# This is the version number of the application being deployed. This version number should be
1717
# incremented each time you make changes to the application.

charts/posthog/templates/_snippet-plugins-deployment.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ spec:
4444
{{- end }}
4545
spec:
4646
serviceAccountName: {{ template "posthog.serviceAccountName" .root }}
47+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4748

4849
{{- if .params.affinity }}
4950
affinity:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{{/* Common topologySpreadConstraints definition */}}
2+
{{/*
3+
matchLabelsKeys are the set of unique pod labels for which the constraints are applied
4+
any missing labels are ignored.
5+
6+
pod-template-hash is added automatically by deployments and is unique for each rollout.
7+
Including this means we don't get out of sync on rollouts as it ignores the locations
8+
of existing pods that will be terminated after the rollout is finished.
9+
*/}}
10+
{{- define "_snippet-selectors" -}}
11+
labelSelector:
12+
matchLabels: {}
13+
matchLabelKeys:
14+
- pod-template-hash
15+
- app
16+
- release
17+
- role
18+
- app.kubernetes.io/name
19+
- app.kubernetes.io/instance
20+
{{- end }}
21+
{{- define "_snippet-topologySpreadConstraints" }}
22+
{{- if .Values.includeDefaultTopologySpreadConstraints }}
23+
topologySpreadConstraints:
24+
- maxSkew: 1
25+
minDomains: 3
26+
topologyKey: topology.kubernetes.io/zone
27+
whenUnsatisfiable: DoNotSchedule
28+
nodeTaintsPolicy: Honor
29+
{{- include "_snippet-selectors" . | nindent 2 }}
30+
- maxSkew: 3
31+
topologyKey: kubernetes.io/hostname
32+
whenUnsatisfiable: ScheduleAnyway
33+
nodeTaintsPolicy: Honor
34+
{{- include "_snippet-selectors" . | nindent 2 }}
35+
{{- end }}
36+
{{- end }}

charts/posthog/templates/decide-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
spec:
4242
terminationGracePeriodSeconds: {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
44+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4445

4546
{{- if .Values.web.affinity }}
4647
affinity:

charts/posthog/templates/events-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
spec:
4242
terminationGracePeriodSeconds: {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
44+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4445

4546
{{- if .Values.web.affinity }}
4647
affinity:

charts/posthog/templates/pgbouncer-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
terminationGracePeriodSeconds: 65
4343

4444
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
45+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4546

4647
{{- if .Values.pgbouncer.affinity }}
4748
affinity: {{ toYaml .Values.pgbouncer.affinity | nindent 8 }}

charts/posthog/templates/pgbouncer-read-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ spec:
4242
terminationGracePeriodSeconds: 65
4343

4444
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
45+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4546

4647
{{- if .Values.pgbouncerRead.affinity }}
4748
affinity: {{ toYaml .Values.pgbouncerRead.affinity | nindent 8 }}

charts/posthog/templates/recordings-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
spec:
4242
terminationGracePeriodSeconds: {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
44+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4445

4546
{{- if .Values.web.affinity }}
4647
affinity:

charts/posthog/templates/temporal-py-worker-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
spec:
3636
terminationGracePeriodSeconds: {{ .Values.temporalPyWorker.terminationGracePeriodSeconds }}
3737
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
38+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
3839

3940
{{- if .Values.temporalPyWorker.affinity }}
4041
affinity:

charts/posthog/templates/web-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
spec:
4242
terminationGracePeriodSeconds: {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343
serviceAccountName: {{ template "posthog.serviceAccountName" . }}
44+
{{- include "_snippet-topologySpreadConstraints" . | nindent 6 }}
4445

4546
{{- if .Values.web.affinity }}
4647
affinity:

0 commit comments

Comments
 (0)