Skip to content

Commit

Permalink
Correctly handle empty list of labels, tls block
Browse files Browse the repository at this point in the history
Signed-off-by: Emiliano Suñé <[email protected]>
  • Loading branch information
esune committed Oct 9, 2024
1 parent 97f6b43 commit 9e4ce3c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion charts/tdw-server/templates/server/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@ kind: Ingress
metadata:
name: {{ include "server.fullname" . }}
labels:
{{- if .Values.ingress.labels }}
{{- toYaml .Values.ingress.labels | nindent 4 }}
{{- end }}
{{- include "server.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
- hosts:
- hosts:
- {{ .Values.server.host | quote }}
secretName: {{ .Values.fullnameOverride }}-tls
{{- end }}
rules:
- host: {{ .Values.server.host | quote }}
http:
Expand Down
4 changes: 3 additions & 1 deletion charts/tdw-server/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
nameOverride: "tdw-server"
fullnameOverride: "tdw-server"
ingressSuffix: ""

selectorLabels: {}

ingress:
tls: false
labels: []
annotations: []

Expand All @@ -19,6 +19,8 @@ server:
tag: pre-0.0.11
pullPolicy: IfNotPresent
pullSecrets: []
# host is required when enabling TLS in the ingress
# host: server.myapp.example

environment:
ENDORSER_MULTIKEY: ""
Expand Down

0 comments on commit 9e4ce3c

Please sign in to comment.