Skip to content
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
2 changes: 2 additions & 0 deletions charts/posthog/ALL_VALUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ The following table lists the configurable parameters of the PostHog chart and t
| cloudwatch.region | string | `nil` | AWS region |
| cloudwatch.clusterName | string | `nil` | AWS EKS cluster name |
| cloudwatch.fluentBit | object | `{"port":2020,"readHead":"On","readTail":"Off","server":"On"}` | fluentBit configuration |
| hooks.nodeSelector | object | `{}` | Node labels for hooks |
| hooks.tolerations | list | `[]` | Toleration labels for hooks |
| hooks.affinity | object | `{}` | Affinity settings for hooks |
| hooks.migrate.env | list | `[]` | Env variables for migate hooks |
| hooks.migrate.resources | object | `{}` | Hook job resource limits/requests |
Expand Down
8 changes: 8 additions & 0 deletions charts/posthog/templates/migrate.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ spec:
spec:
{{- with .Values.hooks.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.hooks.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.hooks.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
restartPolicy: Never
Expand Down
16 changes: 16 additions & 0 deletions charts/posthog/tests/migrate-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,19 @@ tests:
content:
name: SENTRY_DSN
value: sentry.endpoint

- it: nodeSelector override via 'hooks.nodeSelector' works
template: templates/migrate.job.yaml # TODO: remove once secrets.yaml will be fixed/removed
set:
cloud: local # TODO: remove once secrets.yaml will be fixed/removed
hooks.nodeSelector:
diskType: ssd
nodeType: fast
asserts:
- hasDocuments:
count: 1
- equal:
path: spec.template.spec.nodeSelector
value:
diskType: ssd
nodeType: fast
6 changes: 5 additions & 1 deletion charts/posthog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,11 @@ cloudwatch:

# Provide affinity for hooks if needed
hooks:
# -- Affinity settings for hooks
# -- Node labels for hooks.
nodeSelector: {}
# -- Toleration labels for hooks.
tolerations: []
# -- Affinity settings for hooks.
affinity: {}
migrate:
# -- Env variables for migate hooks
Expand Down