diff --git a/charts/posthog/Chart.yaml b/charts/posthog/Chart.yaml index 4a097ed3..a8c840d3 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.44.0 +version: 30.45.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 d3db62b8..92165ca3 100644 --- a/charts/posthog/templates/web-deployment.yaml +++ b/charts/posthog/templates/web-deployment.yaml @@ -23,6 +23,8 @@ spec: maxUnavailable: {{ .Values.web.rollout.maxUnavailable }} {{- else if eq .Values.web.deployment.strategy "canary" }} canary: + canaryService: {{ template "posthog.fullname" . }}-web-canary + stableService: {{ template "posthog.fullname" . }}-web trafficRouting: plugins: argoproj-labs/contour: diff --git a/charts/posthog/templates/web-service.yaml b/charts/posthog/templates/web-service.yaml index b944d703..c8194918 100644 --- a/charts/posthog/templates/web-service.yaml +++ b/charts/posthog/templates/web-service.yaml @@ -29,4 +29,37 @@ spec: loadBalancerSourceRanges: {{- toYaml . | nindent 4 }} {{- end }} +{{- if eq .Values.web.deployment.strategy "canary" }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ template "posthog.fullname" . }}-web-canary + labels: {{- include "_snippet-metadata-labels-common" . | nindent 4 }} + annotations: {{- include "_snippet-metadata-annotations-common" . | nindent 4 }} + {{- if .Values.service.annotations }} + {{ toYaml .Values.service.annotations | indent 4 }} + {{- end }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + protocol: TCP + name: {{ .Values.service.name }} +{{- if and (.Values.service.nodePort) (eq .Values.service.type "NodePort") }} + nodePort: {{ .Values.service.nodePort }} +{{- end }} +{{- if .Values.service.externalIPs }} + externalIPs: +{{ toYaml .Values.service.externalIPs | indent 4 }} +{{- end }} + selector: + app: {{ template "posthog.fullname" . }} + role: web + {{- with .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} {{- end }}