Update helm chart values

This commit is contained in:
Zachary Guénot
2026-03-27 13:56:39 +01:00
parent 560699c81d
commit ed4d3f032d
2 changed files with 62 additions and 31 deletions
+40 -24
View File
@@ -1,33 +1,49 @@
{{- if .Values.ingress.enabled }}
{{- $ingress := .Values.ingress -}}
{{- if $ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}
{{- with $ingress.annotations }}
annotations:
external-dns.alpha.kubernetes.io/target: OmegaMaestro.{{- if eq .Values.ingress.provider "technitium" }}force-field.{{- end }}{{ .Values.ingress.domain }}
external-dns.alpha.kubernetes.io/{{ .Values.ingress.provider }}: "true"
cert-manager.io/cluster-issuer: {{ .Values.ingress.issuer }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
{{- if .Values.ingress.geoip }}
nginx.ingress.kubernetes.io/server-snippet: |
if ($lan = yes) { set $allowed_country yes; }
if ($allowed_country = no) { return 451; }
{{- range $key, $value := . }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- range $key, $value := $ingress.labels }}
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.class }}
{{- if $ingress.ingressClassName }}
ingressClassName: {{ $ingress.ingressClassName }}
{{- end }}
{{- if $ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}
secretName: {{ .Release.Name }}-tls
{{- range $ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ tpl . $ }}
{{- end }}
{{- end }}
{{- end }}
rules:
- host: "{{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
port:
name: {{ .Values.service.name }}
{{- end }}
{{- range $ingress.rules }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- range .paths }}
- path: {{ tpl .path $ | quote }}
pathType: {{ .pathType }}
backend:
service:
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
port:
name: {{ .Values.service.name }}
{{- end }}
{{- end }}
{{- end -}}
{{- end -}}