feat(ingress): update capability names and add ingressClassName

This commit is contained in:
Alex Babel 2021-11-20 23:32:38 +01:00
parent 80eb32741a
commit 358b867dd0
No known key found for this signature in database
GPG key ID: 172C226B30136F43
11 changed files with 41 additions and 6 deletions

View file

@ -1,7 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "element-web.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
@ -17,6 +17,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}

View file

@ -88,6 +88,10 @@ ingress:
# hosts:
# - chart-example.local
## Set the name of the IngressClass cluster resource (optional)
## https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec
#className: can-be-anything
## Resource configuration for the application.
##
resources: {}

View file

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "funkwhale.fullname" . -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
@ -19,6 +19,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}

View file

@ -30,6 +30,10 @@ ingress:
# hosts:
# - chart-example.local
## Set the name of the IngressClass cluster resource (optional)
## https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec
#className: can-be-anything
postgresql:
## If you already have a Postgresql service you'd like to use, set
## this to false and adjust the host to use your existing service.

View file

@ -1,7 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "matrix-media-repo.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
@ -17,6 +17,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}

View file

@ -151,6 +151,10 @@ ingress:
# hosts:
# - chart-example.local
## Set the name of the IngressClass cluster resource (optional)
## https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec
#className: can-be-anything
## Resource configuration for the application.
##
resources: {}

View file

@ -1,7 +1,7 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "matrix-synapse.fullname" . -}}
{{- $wkName := include "matrix-synapse.externalname" (dict "global" . "external" "wellknown-lighttpd") -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}

View file

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "netbox.fullname" . -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
@ -19,6 +19,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}

View file

@ -37,6 +37,10 @@ ingress:
# hosts:
# - chart-example.local
## Set the name of the IngressClass cluster resource (optional)
## https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec
#className: can-be-anything
postgresql:
enabled: true

View file

@ -1,6 +1,6 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "radosgw.fullname" . -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
{{- $v1Ingress := .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
{{- if $v1Ingress -}}
apiVersion: networking.k8s.io/v1
{{- else -}}
@ -16,6 +16,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}

View file

@ -41,6 +41,10 @@ ingress:
# hosts:
# - chart-example.local
## Set the name of the IngressClass cluster resource (optional)
## https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/#IngressSpec
#className: can-be-anything
resources: {}
# limits:
# cpu: 100m