argocd-helm/charts/argo-cd/templates/dex/service.yaml
Piotr Kowalczyk 3a4baae95d
feat(argo-cd): Parameterizing dex ports names due to istio 403 errors (#889)
* refactor: Parameterizing dex ports names due to istio 403 errors

Signed-off-by: Piotr Kowalczyk <kowalczyk.p.4@pg.com>

* fix: updating default http port name to http

Signed-off-by: Piotr Kowalczyk <kowalczyk.p.4@pg.com>
2021-08-23 19:23:07 +02:00

35 lines
1.1 KiB
YAML

{{- if .Values.dex.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "argo-cd.dex.fullname" . }}
{{- if .Values.dex.metrics.service.annotations }}
annotations:
{{- range $key, $value := .Values.dex.metrics.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 4 }}
{{- if .Values.dex.metrics.service.labels }}
{{- toYaml .Values.dex.metrics.service.labels | nindent 4 }}
{{- end }}
spec:
ports:
- name: {{ .Values.dex.servicePortHttpName }}
protocol: TCP
port: {{ .Values.dex.servicePortHttp }}
targetPort: http
- name: {{ .Values.dex.servicePortGrpcName }}
protocol: TCP
port: {{ .Values.dex.servicePortGrpc }}
targetPort: grpc
{{- if .Values.dex.metrics.enabled }}
- name: metrics
protocol: TCP
port: {{ .Values.dex.servicePortMetrics }}
targetPort: metrics
{{- end }}
selector:
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 4 }}
{{- end }}