{{- if .Values.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ template "helm-guestbook.fullname" . }} namespace: {{ template "helm-guestbook.fullname" . }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: rules: - host: {{ .Values.ingress.host }} http: paths: - pathType: Prefix path: {{ .Values.ingress.path }} backend: # serviceName must match canary.stableService service: name: {{ template "helm-guestbook.fullname" . }} port: number: {{ .Values.service.port }} {{- end }}