infrastructure/pomerium/templates/authenticate-service.yaml

43 lines
1.6 KiB
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: {{ template "pomerium.authenticate.fullname" . }}
labels:
app.kubernetes.io/name: {{ template "pomerium.authenticate.name" . }}
helm.sh/chart: {{ template "pomerium.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/component: authenticate
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- if or .Values.authenticate.service.annotations .Values.service.annotations }}
annotations:
{{- if .Values.authenticate.service.annotations }}
{{- range $key, $value := .Values.authenticate.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- else if .Values.service.annotations }}
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.authenticate.service.type }}
ports:
- port: {{ template "pomerium.service.externalPort" . }}
targetPort: {{ template "pomerium.httpTrafficPort.name" . }}
protocol: TCP
name: {{ template "pomerium.httpTrafficPort.name" . }}
{{- if and .Values.authenticate.service.nodePort (eq .Values.authenticate.service.type "NodePort" )}}
nodePort: {{ .Values.authenticate.service.nodePort }}
{{- end }}
- name: metrics
port: {{ .Values.metrics.port }}
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: {{ template "pomerium.authenticate.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}