Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pdbs for web+capture #772

Merged
merged 3 commits into from
Oct 9, 2023
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: 1 addition & 1 deletion charts/posthog/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 30.28.0
version: 30.29.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
16 changes: 16 additions & 0 deletions charts/posthog/templates/events-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if and .Values.events.enabled .Values.events.pdb.enabled -}}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "posthog.fullname" . }}-events
labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }}
annotations: {{- include "_snippet-metadata-annotations-common" . | nindent 4 }}
spec:
maxUnavailable: .Values.events.pdb.maxUnavailable
selector:
matchLabels:
app: {{ template "posthog.fullname" . }}
release: "{{ .Release.Name }}"
role: events
{{- end }}
16 changes: 16 additions & 0 deletions charts/posthog/templates/recordings-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if and .Values.recordings.enabled .Values.recordings.pdb.enabled -}}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "posthog.fullname" . }}-recordings
labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }}
annotations: {{- include "_snippet-metadata-annotations-common" . | nindent 4 }}
spec:
maxUnavailable: .Values.recordings.pdb.maxUnavailable
selector:
matchLabels:
app: {{ template "posthog.fullname" . }}
release: "{{ .Release.Name }}"
role: recordings
{{- end }}
16 changes: 16 additions & 0 deletions charts/posthog/templates/web-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if and .Values.web.enabled .Values.web.pdb.enabled -}}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "posthog.fullname" . }}-web
labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }}
annotations: {{- include "_snippet-metadata-annotations-common" . | nindent 4 }}
spec:
maxUnavailable: .Values.web.pdb.maxUnavailable
selector:
matchLabels:
app: {{ template "posthog.fullname" . }}
release: "{{ .Release.Name }}"
role: web
{{- end }}
11 changes: 10 additions & 1 deletion charts/posthog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ events:
# for configuration options
behavior:

pdb:
enabled: false

rollout:
# The max surge in pods during a rollout
maxSurge: 25%
Expand Down Expand Up @@ -111,6 +114,9 @@ recordings:
# for configuration options
behavior:

pdb:
enabled: false

rollout:
# The max surge in pods during a rollout
maxSurge: 25%
Expand Down Expand Up @@ -206,6 +212,9 @@ web:
# for configuration options
behavior:

pdb:
enabled: false

rollout:
# The max surge in pods during a rollout
maxSurge: 25%
Expand Down Expand Up @@ -582,7 +591,7 @@ pluginsAnalyticsIngestion:
# intended to be used along side the `recordingsIngestion` deployment.
#
# The reason these values were added is to be able to scale analytics and
# session recordings events indepentently, and to be able to roll this out in
# session recordings events independently, and to be able to roll this out in
# a backwards compatible way.
enabled: false

Expand Down
Loading