about summary refs log tree commit diff
path: root/misc/nginx/templates/ingress.yaml
diff options
context:
space:
mode:
authorIurii Plugatariov <[email protected]>2024-06-28 17:57:16 +0200
committerGitHub <[email protected]>2024-06-28 17:57:16 +0200
commitc6292662cd65ba74a15841c8e698e64bfbcc65cb (patch)
tree5ebb53f940860cd14ce5625c40b1d8db9ce9aa81 /misc/nginx/templates/ingress.yaml
parent303262c75bd8d3ad2e166760f0518a0d8aa0591c (diff)
parent812cf4c17ef7570e52427e4a590b3a8c168c1621 (diff)
downloadk3s-lab-c6292662cd65ba74a15841c8e698e64bfbcc65cb.tar.gz
Merge pull request #1 from makefunstuff/argocd-and-stuff
argocd and stuff
Diffstat (limited to 'misc/nginx/templates/ingress.yaml')
-rw-r--r--misc/nginx/templates/ingress.yaml35
1 files changed, 35 insertions, 0 deletions
diff --git a/misc/nginx/templates/ingress.yaml b/misc/nginx/templates/ingress.yaml
new file mode 100644
index 0000000..bd25f23
--- /dev/null
+++ b/misc/nginx/templates/ingress.yaml
@@ -0,0 +1,35 @@
+{{- if .Values.ingress.enabled -}}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: nginx
+  annotations:
+    {{- range $key, $value := .Values.ingress.annotations }}
+    {{ $key }}: {{ $value | quote }}
+    {{- end }}
+spec:
+  rules:
+    {{- range .Values.ingress.hosts }}
+    - host: {{ .host }}
+      http:
+        paths:
+          {{- range .paths }}
+          - path: {{ . }}
+            pathType: Prefix
+            backend:
+              service:
+                name: nginx
+                port:
+                  number: 80
+          {{- end }}
+    {{- end }}
+  tls:
+    {{- range .Values.ingress.tls }}
+    - hosts:
+        {{- range .hosts }}
+        - {{ . }}
+        {{- end }}
+      secretName: {{ .secretName }}
+    {{- end }}
+{{- end }}
+