{{/* THIS CHART GAINED AN ingress.enabled SWITCH WITH THE GATEWAY-API SWEEP (#114), AND IT IS THE ONLY CHART IN THE REPOSITORY THAT WAS STILL MISSING ONE. It defaults to true, so an existing release renders byte-identically and the addition is additive. It is not cosmetic uniformity: the Gateway mode is defined as mutually exclusive with the Ingress, the render abort has to name BOTH value paths, and there was no second path to name. Worse, without the switch the Ingress would keep rendering in Gateway mode, and with it the unconditional required() on ingress.clusterIssuer below - a value that demands to be set and then does nothing, which is the defect README guideline 12 and issue #114's "Folge 1" exist to remove. The switch is what makes that required() conditional, exactly as every other chart here has it. What does NOT become optional with the Ingress off: ingress.domain. It is also PAPERLESS_URL (paperless-server.sfs.yaml), the only origin this release declares to Django, and it therefore carries its own required() there. */}} {{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress annotations: cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer }} {{- /* Quoted for the same reason as the env block in the StatefulSet and the schedule in the CronJob (Gitea #11's genus): an annotation value must be a string, maxUploadFileSize is free operator text, and a unit-less "100" - schema-valid, since the schema types it as a string - renders bare as an integer and the API server rejects the whole Ingress. The default "10m" happens to be safe, which is exactly how this survived. */}} nginx.ingress.kubernetes.io/proxy-body-size: {{ .Values.paperless.files.maxUploadFileSize | quote }} nginx.org/client-max-body-size: {{ .Values.paperless.files.maxUploadFileSize | quote }} {{- with .Values.ingress.annotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} rules: - host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }} http: paths: - backend: service: name: {{ .Release.Name }}-{{ .Chart.Name }}-service port: name: pless-s-port path: / pathType: Prefix tls: - hosts: - {{ required "A Domain/Host must be provided" .Values.ingress.domain }} secretName: tls-{{ .Release.Name }}-{{ .Chart.Name }}-ingress {{- end }}