helm-charts/adguard-home/templates/service-dns-over-https.yaml

38 lines
1.3 KiB
YAML
Raw Normal View History

2021-01-17 01:09:41 +00:00
{{- if .Values.serviceDNSOverHTTPS.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "adguard-home.fullname" . }}-dns-over-https
labels:
app.kubernetes.io/name: {{ include "adguard-home.name" . }}
helm.sh/chart: {{ include "adguard-home.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.serviceDNSOverHTTPS.annotations }}
annotations:
{{ toYaml .Values.serviceDNSOverHTTPS.annotations | indent 4 }}
{{- end }}
spec:
type: {{ .Values.serviceDNSOverHTTPS.type }}
{{- if .Values.serviceDNSOverHTTPS.loadBalancerIP }}
loadBalancerIP: {{ .Values.serviceDNSOverHTTPS.loadBalancerIP }}
{{- end }}
{{- if .Values.serviceDNSOverHTTPS.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.serviceDNSOverHTTPS.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- if .Values.serviceDNSOverHTTPS.externalIPs }}
externalIPs:
{{ toYaml .Values.serviceDNSOverHTTPS.externalIPs | indent 4 }}
{{- end }}
externalTrafficPolicy: {{ .Values.serviceDNSOverHTTPS.externalTrafficPolicy }}
ports:
- port: 443
targetPort: dns-over-https
protocol: TCP
name: dns-over-https
selector:
app.kubernetes.io/name: {{ include "adguard-home.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}