diff --git a/charts/tdw-server/templates/server/ingress.yaml b/charts/tdw-server/templates/server/ingress.yaml index 6d8205f..e4a79f3 100644 --- a/charts/tdw-server/templates/server/ingress.yaml +++ b/charts/tdw-server/templates/server/ingress.yaml @@ -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: diff --git a/charts/tdw-server/values.yaml b/charts/tdw-server/values.yaml index 2ceec0c..9f07095 100644 --- a/charts/tdw-server/values.yaml +++ b/charts/tdw-server/values.yaml @@ -1,11 +1,11 @@ --- nameOverride: "tdw-server" fullnameOverride: "tdw-server" -ingressSuffix: "" selectorLabels: {} ingress: + tls: false labels: [] annotations: [] @@ -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: ""