47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
{{- if .Values.ingress.enabled }}
|
|
---
|
|
apiVersion: {{ include "nextcloud.ingress.apiVersion" . }}
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ template "nextcloud.fullname" . }}
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
|
|
helm.sh/chart: {{ include "nextcloud.chart" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
app.kubernetes.io/component: app
|
|
{{- with .Values.ingress.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- with .Values.ingress.className }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
rules:
|
|
- host: {{ .Values.nextcloud.host }}
|
|
http:
|
|
paths:
|
|
- path: {{ .Values.ingress.path }}
|
|
{{- if (eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
|
|
pathType: {{ .Values.ingress.pathType }}
|
|
{{- end }}
|
|
backend:
|
|
{{- if (eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
|
|
service:
|
|
name: {{ template "nextcloud.fullname" . }}
|
|
port:
|
|
number: {{ .Values.service.port }}
|
|
{{- else }}
|
|
serviceName: {{ template "nextcloud.fullname" . }}
|
|
servicePort: {{ .Values.service.port }}
|
|
{{- end }}
|
|
{{- with .Values.ingress.tls }}
|
|
tls:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|