Skip to content

Instantly share code, notes, and snippets.

@Tim-Schwalbe
Last active March 14, 2022 11:36
Show Gist options
  • Save Tim-Schwalbe/a7e20a5135d0753def636dc5b525e40c to your computer and use it in GitHub Desktop.
Save Tim-Schwalbe/a7e20a5135d0753def636dc5b525e40c to your computer and use it in GitHub Desktop.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "name" . }}
labels:
app: {{ template "name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "{{.Values.acme}}"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "route"
nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
nginx.ingress.kubernetes.io/limit-rps: "100"
nginx.ingress.kubernetes.io/proxy-body-size: 500m
nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header subdomain $subdomain;
nginx.ingress.kubernetes.io/server-snippet: |
server_name ~^(?<subdomain>.*)\.{{.Values.host}}$;
spec:
rules:
- host: "*.{{.Values.host}}"
http:
paths:
- path: /
pathType: "Prefix"
backend:
service:
name: {{ template "name" . }}
port:
number: 80
tls:
- secretName: "{{ .Values.tlsSecretName }}"
hosts:
- "{{.Values.host}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment