Skip to content

Commit ee71753

Browse files
authored
Merge pull request #2076 from NCEAS/feature-1666-misc-k8s-fixes
ingress: add ability to include arbitrary rules yaml
2 parents 0d9a27b + c0dfb87 commit ee71753

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

helm/templates/ingress.yaml

+4-17
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,9 @@ spec:
6262
{{- end }}
6363
{{- end }}
6464
rules:
65-
{{- if .Values.ingress.hosts }}
66-
{{- range .Values.ingress.hosts }}
67-
- host: {{ .host | quote }}
68-
http:
69-
paths:
70-
{{- range .paths }}
71-
- path: {{ .path }}
72-
pathType: {{ .pathType }}
73-
backend:
74-
service:
75-
name: {{ $fullName }}-hl
76-
port:
77-
number: 8080
78-
{{- end }}
79-
{{- end }}
80-
{{- else }}
65+
{{- if and (.Values.ingress.rules) (ne (len .Values.ingress.rules) 0) }}
66+
{{- .Values.ingress.rules | toYaml | nindent 4 }}
67+
{{- else }}
8168
- host: {{ $serverName }}
8269
http:
8370
paths:
@@ -98,5 +85,5 @@ spec:
9885
port:
9986
number: 80
10087
{{- end }}
101-
{{- end }}
88+
{{- end }}
10289
{{- end }}

helm/values.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,31 @@ ingress:
778778
##
779779
tls: []
780780

781+
## @param ingress.rules The Ingress rules can be defined here or left blank to be auto-populated
782+
## based on the metacat.server.name value. If defining rules here, they will be copied verbatim
783+
## to the ingress definition. For schema guidance, see:
784+
## https://kubernetes.io/docs/concepts/services-networking/ingress/
785+
## Example:
786+
## - host: goa.nceas.ucsb.edu
787+
## http:
788+
## paths:
789+
## - backend:
790+
## service:
791+
## name: metacatgoa-hl
792+
## port:
793+
## number: 8080
794+
## path: /goa
795+
## pathType: Prefix
796+
## - backend:
797+
## service:
798+
## name: metacatgoa-metacatui
799+
## port:
800+
## number: 80
801+
## path: /
802+
## pathType: Prefix
803+
##
804+
rules: []
805+
781806
## @param ingress.d1CaCertSecretName Name of Secret containing DataONE CA certificate chain
782807
## For DataONE Replication -- mutual authentication with x509 client-side certs.
783808
## Also see `metacat.dataone.certificate.fromHttpHeader.enabled`

0 commit comments

Comments
 (0)