File tree Expand file tree Collapse file tree 14 files changed +236
-108
lines changed Expand file tree Collapse file tree 14 files changed +236
-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 4444 { {- end } }
4545 spec:
4646 serviceAccountName: { { template " posthog.serviceAccountName" .root } }
47-
48- { {- if .params.affinity } }
49- affinity:
50- { {- toYaml .params.affinity | nindent 8 } }
51- { {- end } }
52-
53- { {- if .params.nodeSelector } }
54- nodeSelector:
55- { {- toYaml .params.nodeSelector | nindent 8 } }
56- { {- end } }
57-
58- { {- if .params.tolerations } }
59- tolerations:
60- { {- toYaml .params.tolerations | nindent 8 } }
61- { {- end } }
62-
47+ affinity: { { toYaml (merge .params.affinity .root.Values.affinity) | nindent 8 } }
48+ nodeSelector: { { toYaml (merge .params.nodeSelector .root.Values.nodeSelector) | nindent 8 } }
49+ tolerations: { { toYaml (coalesce .params.tolerations .root.Values.tolerations) | nindent 8 } }
6350 { {- if .params.schedulerName } }
6451 schedulerName: "{ { .params.schedulerName } }"
6552 { {- end } }
Original file line number Diff line number Diff line change 2929 {{- end }}
3030 {{- end }}
3131 {{- end }}
32+ affinity : {{ toYaml (merge .Values.clickhouse.affinity .Values.affinity) | nindent 12 }}
33+ nodeSelector : {{ toYaml (merge .Values.clickhouse.nodeSelector .Values.nodeSelector) | nindent 12 }}
34+ tolerations : {{ toYaml (coalesce .Values.clickhouse.tolerations .Values.tolerations) | nindent 12 }}
3235
3336 initContainers :
3437 #
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 2525 metadata :
2626 annotations :
2727 checksum/secrets.yaml : {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
28- {{- if .Values.web .podAnnotations }}
29- {{ toYaml .Values.web .podAnnotations | indent 8 }}
28+ {{- if .Values.events .podAnnotations }}
29+ {{ toYaml .Values.events .podAnnotations | indent 8 }}
3030 {{- end }}
3131 labels :
3232 app : {{ template "posthog.fullname" . }}
4141 spec :
4242 terminationGracePeriodSeconds : {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
44-
45- {{- if .Values.web.affinity }}
46- affinity :
47- {{ toYaml .Values.web.affinity | indent 8 }}
48- {{- end }}
49-
50- {{- if .Values.web.nodeSelector }}
51- nodeSelector :
52- {{ toYaml .Values.web.nodeSelector | indent 8 }}
53- {{- end }}
54-
55- {{- if .Values.web.tolerations }}
56- tolerations :
57- {{ toYaml .Values.web.tolerations | indent 8 }}
58- {{- end }}
59-
44+ affinity : {{ toYaml (merge .Values.events.affinity .Values.affinity) | nindent 8 }}
45+ nodeSelector : {{ toYaml (merge .Values.events.nodeSelector .Values.nodeSelector) | nindent 8 }}
46+ tolerations : {{ toYaml (coalesce .Values.events.tolerations .Values.tolerations) | nindent 8 }}
6047 {{- if .Values.web.schedulerName }}
6148 schedulerName : " {{ .Values.web.schedulerName }}"
6249 {{- 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 4141 spec :
4242 terminationGracePeriodSeconds : {{ include "snippet.web-deployments.terminationGracePeriodSeconds" . }}
4343 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
44-
45- {{- if .Values.web.affinity }}
46- affinity :
47- {{ toYaml .Values.web.affinity | indent 8 }}
48- {{- end }}
49-
50- {{- if .Values.web.nodeSelector }}
51- nodeSelector :
52- {{ toYaml .Values.web.nodeSelector | indent 8 }}
53- {{- end }}
54-
55- {{- if .Values.web.tolerations }}
56- tolerations :
57- {{ toYaml .Values.web.tolerations | indent 8 }}
58- {{- end }}
59-
44+ affinity : {{ toYaml (merge .Values.web.affinity .Values.affinity) | nindent 8 }}
45+ nodeSelector : {{ toYaml (merge .Values.web.nodeSelector .Values.nodeSelector) | nindent 8 }}
46+ tolerations : {{ toYaml (coalesce .Values.web.tolerations .Values.tolerations) | nindent 8 }}
6047 {{- if .Values.web.schedulerName }}
6148 schedulerName : " {{ .Values.web.schedulerName }}"
6249 {{- end }}
Original file line number Diff line number Diff line change 4040 {{- end }}
4141 spec :
4242 serviceAccountName : {{ template "posthog.serviceAccountName" . }}
43-
44- {{- if .Values.worker.affinity }}
45- affinity :
46- {{ toYaml .Values.worker.affinity | indent 8 }}
47- {{- end }}
48-
49- {{- if .Values.worker.nodeSelector }}
50- nodeSelector :
51- {{ toYaml .Values.worker.nodeSelector | indent 8 }}
52- {{- end }}
53-
54- {{- if .Values.worker.tolerations }}
55- tolerations :
56- {{ toYaml .Values.worker.tolerations | indent 8 }}
57- {{- end }}
58-
43+ affinity : {{ toYaml (merge .Values.worker.affinity .Values.affinity) | nindent 8 }}
44+ nodeSelector : {{ toYaml (merge .Values.worker.nodeSelector .Values.nodeSelector) | nindent 8 }}
45+ tolerations : {{ toYaml (coalesce .Values.worker.tolerations .Values.tolerations) | nindent 8 }}
5946 {{- if .Values.worker.schedulerName }}
6047 schedulerName : " {{ .Values.worker.schedulerName }}"
6148 {{- 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 :
You can’t perform that action at this time.
0 commit comments