apiVersion: v1 kind: Service metadata: name: {{ .Values.services.sync.name }} labels: {{- include "front.labels" . | nindent 4 }} {{- $annotations := omit .Values.services.sync.annotations "cloud.google.com/backend-config" }} annotations: cloud.google.com/backend-config: {{ dict "default" .Values.services.sync.backendConfig.name | toJson | quote }} {{- with $annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.services.sync.type }} ports: - port: {{ .Values.services.sync.port }} targetPort: http protocol: TCP name: http selector: {{- include "front.selectorLabels" . | nindent 4 }}