5 app: {{ template "oauth2-proxy.name" . }}
6 {{- include "oauth2-proxy.labels" . | indent 4 }}
7 name: {{ template "oauth2-proxy.fullname" . }}
8 {{- if .Values.service.annotations }}
10 {{ toYaml .Values.service.annotations | indent 4 }}
13 {{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
15 {{- if .Values.service.clusterIP }}
16 clusterIP: {{ .Values.service.clusterIP }}
18 {{- else if eq .Values.service.type "LoadBalancer" }}
19 type: {{ .Values.service.type }}
20 {{- if .Values.service.loadBalancerIP }}
21 loadBalancerIP: {{ .Values.service.loadBalancerIP }}
23 {{- if .Values.service.loadBalancerSourceRanges }}
24 loadBalancerSourceRanges:
25 {{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
28 type: {{ .Values.service.type }}
31 - port: {{ .Values.service.portNumber }}
32 targetPort: {{ .Values.httpScheme }}
33 {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
34 nodePort: {{ .Values.service.nodePort }}
37 {{- with .Values.service.appProtocol }}
40 name: {{ .Values.httpScheme }}
41 {{- if and .Values.metrics.enabled .Values.metrics.port }}
42 - port: {{ .Values.metrics.port }}
44 {{- with .Values.metrics.service.appProtocol }}
48 {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.metrics.nodePort))) }}
49 nodePort: {{ .Values.metrics.nodePort }}
54 {{- include "oauth2-proxy.selectorLabels" . | indent 4 }}