argocd-helm/charts/argo-cd/templates/argocd-notifications/service-metrics.yaml
ericpdurand 3a2858aa98
feat(argo-cd): Adding applicationSet.enable and notifications.enable (#1181)
* feat(argo-cd) Adding applicationSet.enable and notifications.enable to allow to disable them

Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Fixing Chart version and redudant ifs

Signed-off-by: Eric Durand eric_p_durand@yahoo.com
Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Detail the change

Signed-off-by: Eric Durand <eric_p_durand@yahoo.com>

* Drop one more redundant if

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
2022-03-18 17:41:56 +01:00

22 lines
828 B
YAML

{{- if and .Values.notifications.enabled .Values.notifications.metrics.enabled }}
apiVersion: v1
kind: Service
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 }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.notifications.name) | nindent 6 }}
ports:
- name: metrics
port: {{ .Values.notifications.metrics.port }}
targetPort: {{ .Values.notifications.metrics.port }}
{{- end }}