Autodevops production service selector points to both canary+production deployments ( it shouldnt point to canary)
when doing canary deployments, ideally you want to have a service that points to the canary deployment only. You then control the traffic via your ingress(e.g. in nginx-ingress , create a separate canary ingress that has annotation nginx.ingress.kubernetes.io/canary: "true" set and points to canary service backend. However even with that set, i found out my production service points to both production deployment and production-canary deployment. To fix this, i had to add release: {{ .Release.Name }} as selector so production-canary release service points to production-canary deployment and likewise for production.
The fix is as simple as changing the service.yaml to:
selector:
app: {{ template "appname" . }}
release: {{ .Release.Name }}
tier: "{{ .Values.application.tier }}"
PS: this is just one of implementation of how i achieved canary deployment . Open to suggestions/ideas