File tree Expand file tree Collapse file tree 13 files changed +235
-108
lines changed Expand file tree Collapse file tree 13 files changed +235
-108
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ The following table lists the configurable parameters of the PostHog chart and t
2323| posthogSecretKey.existingSecret | string | ` nil ` | Specify that the key should be pulled from an existing secret key. By default the chart will generate a secret and create a Kubernetes Secret containing it. |
2424| posthogSecretKey.existingSecretKey | string | ` "posthog-secret" ` | Specify the key within the secret from which SECRET_KEY should be taken. |
2525| env | list | ` [] ` | Environment variables to inject into every PostHog deployment. |
26+ | nodeSelector | object | ` {} ` | Global Node labels for all deployment. |
27+ | tolerations | list | ` [] ` | Global Toleration labels for all deployment. |
28+ | affinity | object | ` {} ` | Global Affinity settings for all deployment. |
2629| migrate.enabled | bool | ` true ` | Whether to install the PostHog migrate job or not. |
2730| events.enabled | bool | ` true ` | Whether to install the PostHog events stack or not. |
2831| events.replicacount | int | ` 1 ` | Count of events pods to run. This setting is ignored if ` events.hpa.enabled ` is set to ` true ` . |
Original file line number Diff line number Diff line change 3737 { {- end } }
3838 spec:
3939 serviceAccountName: { { template " posthog.serviceAccountName" .root } }
40-
41- { {- if .params.affinity } }
42- affinity:
43- { {- toYaml .params.affinity | nindent 8 } }
44- { {- end } }
45-
46- { {- if .params.nodeSelector } }
47- nodeSelector:
48- { {- toYaml .params.nodeSelector | nindent 8 } }
49- { {- end } }
50-
51- { {- if .params.tolerations } }
52- tolerations:
53- { {- toYaml .params.tolerations | nindent 8 } }
54- { {- end } }
55-
40+ affinity: { { toYaml (merge .params.affinity .root.Values.affinity) | nindent 8 } }
41+ nodeSelector: { { toYaml (merge .params.nodeSelector .root.Values.nodeSelector) | nindent 8 } }
42+ tolerations: { { toYaml (coalesce .params.tolerations .root.Values.tolerations) | nindent 8 } }
5643 { {- if .params.schedulerName } }
5744 schedulerName: "{ { .params.schedulerName } }"
5845 { {- end } }
Original file line number Diff line number Diff line change 7171 podDistribution : {{ toYaml .Values.clickhouse.podDistribution | nindent 12 }}
7272 {{- end}}
7373 spec :
74- {{- if .Values.clickhouse.affinity }}
75- affinity : {{ toYaml .Values.clickhouse.affinity | nindent 12 }}
76- {{- end }}
77- {{- if .Values.clickhouse.tolerations }}
78- tolerations : {{ toYaml .Values.clickhouse.tolerations | nindent 12 }}
79- {{- end }}
80- {{- if .Values.clickhouse.nodeSelector }}
81- nodeSelector : {{ toYaml .Values.clickhouse.nodeSelector | nindent 12 }}
82- {{- end }}
83-
74+ affinity : {{ toYaml (merge .Values.clickhouse.affinity .Values.affinity) | nindent 12 }}
75+ nodeSelector : {{ toYaml (merge .Values.clickhouse.nodeSelector .Values.nodeSelector) | nindent 12 }}
76+ tolerations : {{ toYaml (coalesce .Values.clickhouse.tolerations .Values.tolerations) | nindent 12 }}
8477 {{- if .Values.clickhouse.persistence.enabled }}
8578 volumes :
8679 {{- if .Values.clickhouse.persistence.existingClaim }}
Original file line number Diff line number Diff line change 1818 metadata :
1919 annotations :
2020 checksum/secrets.yaml : {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
21- {{- if .Values.web .podAnnotations }}
22- {{ toYaml .Values.web .podAnnotations | indent 8 }}
21+ {{- if .Values.events .podAnnotations }}
22+ {{ toYaml .Values.events .podAnnotations | indent 8 }}
2323 {{- end }}
2424 labels :
2525 app : {{ template "posthog.fullname" . }}
3434 spec :
3535 terminationGracePeriodSeconds : {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
3636 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
37-
38- {{- if .Values.web.affinity }}
39- affinity :
40- {{ toYaml .Values.web.affinity | indent 8 }}
41- {{- end }}
42-
43- {{- if .Values.web.nodeSelector }}
44- nodeSelector :
45- {{ toYaml .Values.web.nodeSelector | indent 8 }}
46- {{- end }}
47-
48- {{- if .Values.web.tolerations }}
49- tolerations :
50- {{ toYaml .Values.web.tolerations | indent 8 }}
51- {{- end }}
52-
37+ affinity : {{ toYaml (merge .Values.events.affinity .Values.affinity) | nindent 8 }}
38+ nodeSelector : {{ toYaml (merge .Values.events.nodeSelector .Values.nodeSelector) | nindent 8 }}
39+ tolerations : {{ toYaml (coalesce .Values.events.tolerations .Values.tolerations) | nindent 8 }}
5340 {{- if .Values.web.schedulerName }}
5441 schedulerName : " {{ .Values.web.schedulerName }}"
5542 {{- end }}
Original file line number Diff line number Diff line change @@ -21,28 +21,16 @@ spec:
2121{{ toYaml .Values.worker.podLabels | indent 8 }}
2222 {{- end }}
2323 spec :
24- {{- with .Values.hooks.affinity }}
25- affinity :
26- {{ toYaml . | indent 8 }}
27- {{- end }}
28-
29- {{- with .Values.hooks.nodeSelector }}
30- nodeSelector :
31- {{ toYaml . | indent 8 }}
32- {{- end }}
33-
34- {{- with .Values.hooks.tolerations }}
35- tolerations :
36- {{ toYaml . | indent 8 }}
37- {{- end }}
38-
24+ affinity : {{ toYaml (merge .Values.hooks.affinity .Values.affinity) | nindent 8 }}
25+ nodeSelector : {{ toYaml (merge .Values.hooks.nodeSelector .Values.nodeSelector) | nindent 8 }}
26+ tolerations : {{ toYaml (coalesce .Values.hooks.tolerations .Values.tolerations) | nindent 8 }}
3927 restartPolicy : Never
4028
4129 {{- if .Values.image.imagePullSecrets }}
4230 imagePullSecrets :
4331{{ toYaml .Values.image.imagePullSecrets | indent 8 }}
4432 {{- end }}
45-
33+
4634 # I do not know for sure if the old one has been used anywhere, so do both :(
4735 {{- if .Values.image.pullSecrets }}
4836 imagePullSecrets :
Original file line number Diff line number Diff line change @@ -40,21 +40,10 @@ spec:
4040 # shuts down and exits before the terminationGracePeriod is done, we
4141 # moves to the next step immediately.
4242 terminationGracePeriodSeconds : 65
43-
4443 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
45-
46- {{- if .Values.pgbouncer.affinity }}
47- affinity : {{ toYaml .Values.pgbouncer.affinity | nindent 8 }}
48- {{- end }}
49-
50- {{- if .Values.pgbouncer.nodeSelector }}
51- nodeSelector : {{ toYaml .Values.pgbouncer.nodeSelector | nindent 8 }}
52- {{- end }}
53-
54- {{- if .Values.pgbouncer.tolerations }}
55- tolerations : {{ toYaml .Values.pgbouncer.tolerations | nindent 8 }}
56- {{- end }}
57-
44+ affinity : {{ toYaml (merge .Values.pgbouncer.affinity .Values.affinity) | nindent 8 }}
45+ nodeSelector : {{ toYaml (merge .Values.pgbouncer.nodeSelector .Values.nodeSelector) | nindent 8 }}
46+ tolerations : {{ toYaml (coalesce .Values.pgbouncer.tolerations .Values.tolerations) | nindent 8 }}
5847 {{- if .Values.pgbouncer.schedulerName }}
5948 schedulerName : " {{ .Values.pgbouncer.schedulerName }}"
6049 {{- end }}
Original file line number Diff line number Diff line change 3434 spec :
3535 terminationGracePeriodSeconds : {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
3636 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
37-
38- {{- if .Values.web.affinity }}
39- affinity :
40- {{ toYaml .Values.web.affinity | indent 8 }}
41- {{- end }}
42-
43- {{- if .Values.web.nodeSelector }}
44- nodeSelector :
45- {{ toYaml .Values.web.nodeSelector | indent 8 }}
46- {{- end }}
47-
48- {{- if .Values.web.tolerations }}
49- tolerations :
50- {{ toYaml .Values.web.tolerations | indent 8 }}
51- {{- end }}
52-
37+ affinity : {{ toYaml (merge .Values.web.affinity .Values.affinity) | nindent 8 }}
38+ nodeSelector : {{ toYaml (merge .Values.web.nodeSelector .Values.nodeSelector) | nindent 8 }}
39+ tolerations : {{ toYaml (coalesce .Values.web.tolerations .Values.tolerations) | nindent 8 }}
5340 {{- if .Values.web.schedulerName }}
5441 schedulerName : " {{ .Values.web.schedulerName }}"
5542 {{- end }}
Original file line number Diff line number Diff line change 3333 {{- end }}
3434 spec :
3535 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
36-
37- {{- if .Values.worker.affinity }}
38- affinity :
39- {{ toYaml .Values.worker.affinity | indent 8 }}
40- {{- end }}
41-
42- {{- if .Values.worker.nodeSelector }}
43- nodeSelector :
44- {{ toYaml .Values.worker.nodeSelector | indent 8 }}
45- {{- end }}
46-
47- {{- if .Values.worker.tolerations }}
48- tolerations :
49- {{ toYaml .Values.worker.tolerations | indent 8 }}
50- {{- end }}
51-
36+ affinity : {{ toYaml (merge .Values.worker.affinity .Values.affinity) | nindent 8 }}
37+ nodeSelector : {{ toYaml (merge .Values.worker.nodeSelector .Values.nodeSelector) | nindent 8 }}
38+ tolerations : {{ toYaml (coalesce .Values.worker.tolerations .Values.tolerations) | nindent 8 }}
5239 {{- if .Values.worker.schedulerName }}
5340 schedulerName : " {{ .Values.worker.schedulerName }}"
5441 {{- end }}
Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ the manifest should match the snapshot when using default values:
7070 podTemplates :
7171 - name : pod - template
7272 spec :
73+ affinity : {}
7374 containers :
7475 - command :
7576 - / bin / bash
@@ -87,10 +88,12 @@ the manifest should match the snapshot when using default values:
8788 volumeMounts :
8889 - mountPath : / var /lib/clickhouse
8990 name : data - volumeclaim - template
91+ nodeSelector : {}
9092 securityContext :
9193 fsGroup : 101
9294 runAsGroup : 101
9395 runAsUser : 101
96+ tolerations : null
9497 volumes :
9598 - name : data - volumeclaim - template
9699 persistentVolumeClaim :
Original file line number Diff line number Diff line change 11should match snapshot data :
22 1 : |
3+ affinity : {}
34 containers :
45 - env :
56 - name : POSTGRESQL_USERNAME
@@ -54,5 +55,7 @@ should match snapshot data:
5455 tcpSocket :
5556 port : 6543
5657 timeoutSeconds : 2
58+ nodeSelector : {}
5759 serviceAccountName : RELEASE - NAME - posthog
5860 terminationGracePeriodSeconds : 65
61+ tolerations : null
You can’t perform that action at this time.
0 commit comments