use public DNS on uptime kuma

This commit is contained in:
Morten Olsen
2026-01-03 23:06:29 +01:00
parent 9ee9abeadf
commit c7824eb179
2 changed files with 31 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ spec:
labels:
app: "{{ .Release.Name }}"
spec:
hostNetwork: true
containers:
- name: "{{ .Release.Name }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

View File

@@ -271,6 +271,36 @@ VirtualService gateway list for private gateway
- mesh
{{- end }}
{{/*
DNS configuration for pod spec
*/}}
{{- define "common.dnsConfig" -}}
{{- if .Values.deployment.dns }}
{{- if .Values.deployment.dns.nameservers }}
dnsPolicy: {{ .Values.deployment.dns.policy | default "None" }}
dnsConfig:
nameservers:
{{- range .Values.deployment.dns.nameservers }}
- {{ . | quote }}
{{- end }}
{{- if .Values.deployment.dns.searches }}
searches:
{{- range .Values.deployment.dns.searches }}
- {{ . | quote }}
{{- end }}
{{- end }}
{{- if .Values.deployment.dns.options }}
options:
{{- range .Values.deployment.dns.options }}
- {{ toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
{{- else if .Values.deployment.dnsPolicy }}
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
{{- end }}
{{- end }}
{{/*
Full Deployment resource
*/}}
@@ -305,9 +335,7 @@ spec:
{{- if .Values.deployment.hostNetwork }}
hostNetwork: {{ .Values.deployment.hostNetwork }}
{{- end }}
{{- if .Values.deployment.dnsPolicy }}
dnsPolicy: {{ .Values.deployment.dnsPolicy }}
{{- end }}
{{- include "common.dnsConfig" . | nindent 6 }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"