Verified Commit ab359560 authored by Hugo's avatar Hugo
Browse files

handle multiple ingress versions

parent 56addf4e
apiVersion: extensions/v1beta1
{{ if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
......@@ -15,10 +16,14 @@ spec:
http:
paths:
- backend:
serviceName: {{ tpl .Values.fqdn . }}-app
servicePort: http
service:
name: {{ tpl .Values.fqdn . }}-app
port:
name: http
path: /
pathType: Prefix
tls:
- hosts:
- {{ tpl .Values.domain . }}
secretName: {{ tpl .Values.fqdn . }}-tls
{{ end }}
\ No newline at end of file
{{ if .Capabilities.APIVersions.Has "extensions/v1beta1" }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/tls-acme: "true"
labels:
app.kubernetes.io/component: app
app.kubernetes.io/instance: {{ tpl .Values.fqdn . }}
app.kubernetes.io/name: hedgedoc
app.kubernetes.io/part-of: hedgedoc
name: {{ tpl .Values.fqdn . }}-app
spec:
rules:
- host: {{ tpl .Values.domain . }}
http:
paths:
- backend:
serviceName: {{ tpl .Values.fqdn . }}-app
servicePort: http
path: /
tls:
- hosts:
- {{ tpl .Values.domain . }}
secretName: {{ tpl .Values.fqdn . }}-tls
{{ end }}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment