fix(argo-cd): fix unmarshal annotaions error (#1379)

Signed-off-by: Yixing Yan <yixingyan@gmail.com>
This commit is contained in:
yanyx 2022-07-19 20:47:42 +08:00 committed by GitHub
parent 1bf8dd4fdc
commit 833c877ca5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -5,18 +5,21 @@ metadata:
name: {{ template "argo-cd.notifications.fullname" . }}-metrics
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" "metrics") | nindent 4 }}
{{- with .Values.notifications.metrics.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.notifications.metrics.service.annotations }}
{{- if .Values.notifications.metrics.service.labels }}
{{- toYaml .Values.notifications.metrics.service.labels | nindent 4 }}
{{- end }}
{{- if .Values.notifications.metrics.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- range $key, $value := .Values.notifications.metrics.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
ports:
- name: {{ .Values.notifications.metrics.service.portName }}
protocol: TCP
port: {{ .Values.notifications.metrics.port }}
targetPort: {{ .Values.notifications.metrics.port }}
targetPort: metrics
{{- end }}