From ed4d3f032d332a2cc88672ee7463156b8b4a4815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zachary=20Gu=C3=A9not?= Date: Fri, 27 Mar 2026 13:56:39 +0100 Subject: [PATCH] Update helm chart values --- deploy/templates/ingress.yaml | 64 ++++++++++++++++++++++------------- deploy/values.yaml | 29 ++++++++++++---- 2 files changed, 62 insertions(+), 31 deletions(-) diff --git a/deploy/templates/ingress.yaml b/deploy/templates/ingress.yaml index ab374d3..77b7ac2 100644 --- a/deploy/templates/ingress.yaml +++ b/deploy/templates/ingress.yaml @@ -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 }} \ No newline at end of file + {{- 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 -}} diff --git a/deploy/values.yaml b/deploy/values.yaml index 8c6a739..22260e0 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -23,10 +23,25 @@ service: name: twurple ingress: - enabled: true - class: nginx - subdomain: dcb-chantier.prd - domain: angels-dev.fr - provider: cloudflare - issuer: letsencrypt-prod - geoip: false \ No newline at end of file + # If `true`, an Ingress is created + enabled: false + # The name of the Ingress Class associated with this ingress + ingressClassName: "" + # Ingress annotations + annotations: {} + # Additional Ingress labels + labels: {} + # List of rules for the Ingress + rules: + - + # Ingress host + host: discord.example.com + # Paths for the host + paths: + - path: / + pathType: Prefix + # TLS configuration + tls: [] + # - hosts: + # - discord.example.com + # secretName: "" -- 2.43.0