diff --git a/charts/posthog/Chart.yaml b/charts/posthog/Chart.yaml index 460ee1cf..e1399cdd 100644 --- a/charts/posthog/Chart.yaml +++ b/charts/posthog/Chart.yaml @@ -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.41.0 +version: 30.42.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. diff --git a/charts/posthog/templates/web-deployment.yaml b/charts/posthog/templates/web-deployment.yaml index ecedfc7f..6a2f3a8a 100644 --- a/charts/posthog/templates/web-deployment.yaml +++ b/charts/posthog/templates/web-deployment.yaml @@ -1,6 +1,6 @@ {{- if .Values.web.enabled -}} -apiVersion: apps/v1 -kind: Deployment +apiVersion: {{ .Values.web.deployment.apiVersion }} +kind: {{ .Values.web.deployment.kind }} metadata: name: {{ template "posthog.fullname" . }}-web labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }} @@ -16,10 +16,22 @@ spec: {{- end }} strategy: + {{- if eq .Values.web.deployment.strategy "rollingUpdate" }} type: RollingUpdate rollingUpdate: maxSurge: {{ .Values.web.rollout.maxSurge }} maxUnavailable: {{ .Values.web.rollout.maxUnavailable }} + {{- else if eq .Values.web.deployment.strategy "canary" }} + canary: + steps: + - setWeight: 1 + - pause: {duration: 60s} + - setWeight: 10 + - pause: {duration: 60s} + - setWeight: 50 + - pause: {duration: 60s} + - setWeight: 100 + {{- end }} template: metadata: diff --git a/charts/posthog/values.yaml b/charts/posthog/values.yaml index 5c60921d..8e226b51 100644 --- a/charts/posthog/values.yaml +++ b/charts/posthog/values.yaml @@ -191,6 +191,11 @@ web: image: {} + deployment: + apiVersion: apps/v1 + kind: Deployment + strategy: rollingUpdate + podAnnotations: # Uncomment these lines if you want Prometheus server to scrape metrics. # prometheus.io/scrape: "true"