Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85012cfbca | |||
| 85c6423704 | |||
| ed4d3f032d |
@@ -1,33 +1,49 @@
|
|||||||
{{- 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.{{- if eq .Values.ingress.provider "technitium" }}force-field.{{- end }}{{ .Values.ingress.domain }}
|
{{- range $key, $value := . }}
|
||||||
external-dns.alpha.kubernetes.io/{{ .Values.ingress.provider }}: "true"
|
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||||
cert-manager.io/cluster-issuer: {{ .Values.ingress.issuer }}
|
{{- end }}
|
||||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
{{- end }}
|
||||||
{{- if .Values.ingress.geoip }}
|
labels:
|
||||||
nginx.ingress.kubernetes.io/server-snippet: |
|
{{- range $key, $value := $ingress.labels }}
|
||||||
if ($lan = yes) { set $allowed_country yes; }
|
{{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }}
|
||||||
if ($allowed_country = no) { return 451; }
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.ingress.class }}
|
{{- if $ingress.ingressClassName }}
|
||||||
|
ingressClassName: {{ $ingress.ingressClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $ingress.tls }}
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
{{- range $ingress.tls }}
|
||||||
- {{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}
|
- hosts:
|
||||||
secretName: {{ .Release.Name }}-tls
|
{{- range .hosts }}
|
||||||
|
- {{ tpl . $ | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .secretName }}
|
||||||
|
secretName: {{ tpl . $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
rules:
|
rules:
|
||||||
- host: "{{ .Values.ingress.subdomain }}.{{ .Values.ingress.domain }}"
|
{{- range $ingress.rules }}
|
||||||
http:
|
- host: {{ tpl .host $ | quote }}
|
||||||
paths:
|
http:
|
||||||
- path: /
|
paths:
|
||||||
pathType: Prefix
|
{{- range .paths }}
|
||||||
backend:
|
- path: {{ tpl .path $ | quote }}
|
||||||
service:
|
pathType: {{ .pathType }}
|
||||||
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
|
backend:
|
||||||
port:
|
service:
|
||||||
name: {{ .Values.service.name }}
|
name: "{{ .Release.Name }}-{{ .Values.service.name }}"
|
||||||
{{- end }}
|
port:
|
||||||
|
name: {{ .Values.service.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|||||||
+22
-7
@@ -23,10 +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: ""
|
||||||
provider: cloudflare
|
# Ingress annotations
|
||||||
issuer: letsencrypt-prod
|
annotations: {}
|
||||||
geoip: false
|
# 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: ""
|
||||||
|
|||||||
Reference in New Issue
Block a user