Compare commits

..
3 changed files with 63 additions and 31 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ name: bot_tamiseur
# Version du chart : doit changer si l'application change ou si la configuration du chart change # Version du chart : doit changer si l'application change ou si la configuration du chart change
#version: 1 #version: 1
version: "1" version: "1.1.0"
# icon (optionnel) mais génère un warning avec "helm lint" # icon (optionnel) mais génère un warning avec "helm lint"
icon: https://helm.sh/img/helm-logo.svg icon: https://helm.sh/img/helm-logo.svg
+33 -17
View File
@@ -1,32 +1,48 @@
{{- if .Values.ingress.enabled }} {{- $ingress := .Values.ingress -}}
{{- if $ingress.enabled -}}
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ .Release.Name }} name: {{ $.Release.Name }}
{{- with $ingress.annotations }}
annotations: annotations:
external-dns.alpha.kubernetes.io/target: omegamaestro.{{ .Values.ingress.domain }} {{- range $key, $value := . }}
cert-manager.io/cluster-issuer: {{ .Values.ingress.issuer }} {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
nginx.ingress.kubernetes.io/backend-protocol: "HTTP" {{- end }}
{{- if .Values.ingress.geoip }} {{- end }}
nginx.ingress.kubernetes.io/server-snippet: | labels:
if ($lan = yes) { set $allowed_country yes; } {{- range $key, $value := $ingress.labels }}
if ($allowed_country = no) { return 451; } {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
ingressClassName: {{ .Values.ingress.class }} {{- if $ingress.ingressClassName }}
ingressClassName: {{ $ingress.ingressClassName }}
{{- end }}
{{- if $ingress.tls }}
tls: tls:
{{- range $ingress.tls }}
- hosts: - hosts:
- {{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }} {{- range .hosts }}
secretName: {{ .Release.Name }}-tls - {{ tpl . $ | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ tpl . $ }}
{{- end }}
{{- end }}
{{- end }}
rules: rules:
- host: "{{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}" {{- range $ingress.rules }}
- host: {{ tpl .host $ | quote }}
http: http:
paths: paths:
- path: / {{- range .paths }}
pathType: Prefix - path: {{ tpl .path $ | quote }}
pathType: {{ .pathType }}
backend: backend:
service: service:
name: "{{ .Release.Name }}-{{ .Values.service.name }}" name: "{{ $.Release.Name }}-{{ $.Values.service.name }}"
port: port:
name: {{ .Values.service.name }} name: {{ $.Values.service.name }}
{{- end }} {{- end }}
{{- end }}
{{- end -}}
+22 -6
View File
@@ -23,9 +23,25 @@ service:
name: twurple name: twurple
ingress: ingress:
enabled: true # If `true`, an Ingress is created
class: nginx enabled: false
subdomain: dcb-chantier.prd # The name of the Ingress Class associated with this ingress
domain: angels-dev.fr ingressClassName: ""
issuer: letsencrypt-prod # Ingress annotations
geoip: false 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: ""