Skip to content

Commit f0acf2e

Browse files
committed
Make minio-ingress multi-ingress ready
When `fakeS3` is enabled, `nginx-ingress-services` creates an ingress for Minio. This ingress' name is now configurable to allow multiple of them("multi-ingress".)
1 parent fbfec98 commit f0acf2e

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
When `fakeS3` is enabled, `nginx-ingress-services` creates an ingress for
2+
Minio. This ingress' name is now configurable to allow multiple of them
3+
("multi-ingress".)

charts/nginx-ingress-services/templates/_helpers.tpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,21 @@ nginx-ingress-{{ .Values.ingressName }}
108108
{{- end -}}
109109
{{- end -}}
110110

111+
{{/*
112+
Name of the minio ingress. Extracted as helper to reduce the complexity in the template
113+
itself. The default name is 'minio-ingress' for backwards compatibility (it has
114+
been this name in previous versions.)
115+
Why do we need to be able to change this name? For multi-ingress setups, we'll
116+
have multiple of these ingresses (which need unique names).
117+
*/}}
118+
{{- define "nginx-ingress-services.getMinioIngressName" -}}
119+
{{- if (eq .Values.ingressName "") -}}
120+
minio-ingress
121+
{{- else -}}
122+
minio-ingress-{{ .Values.ingressName }}
123+
{{- end -}}
124+
{{- end -}}
125+
111126
{{/*
112127
Name of the certificate 'Issuer'. Especially, used in 'issuerRef's.
113128
In multi-domain backends (multi-ingress), the 'ingressName' is used as postfix

charts/nginx-ingress-services/templates/ingress_minio.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
apiVersion: {{ include "ingress.apiVersion" . }}
88
kind: Ingress
99
metadata:
10-
name: minio-ingress
10+
name: {{ include "nginx-ingress-services.getMinioIngressName" . | quote }}
1111
annotations:
1212
{{- if not $ingressFieldNotAnnotation }}
1313
kubernetes.io/ingress.class: "{{ .Values.config.ingressClass }}"

0 commit comments

Comments
 (0)