From 4505fcea32c2ef43efcd68e84885fe156bc68dfe Mon Sep 17 00:00:00 2001 From: Jelto Wodstrcil Date: Tue, 29 Jan 2019 09:58:23 +0100 Subject: [PATCH] make nodePort configurable with helm --- contrib/helm/clair/templates/service.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/helm/clair/templates/service.yaml b/contrib/helm/clair/templates/service.yaml index c50b177a..f70b831a 100644 --- a/contrib/helm/clair/templates/service.yaml +++ b/contrib/helm/clair/templates/service.yaml @@ -14,9 +14,15 @@ spec: port: {{ .Values.service.externalApiPort }} targetPort: {{ .Values.service.internalApiPort }} protocol: TCP +{{- if and (.Values.service.apiNodePort) (eq .Values.service.type "NodePort") }} + nodePort: {{ .Values.service.apiNodePort }} +{{- end }} - name: "{{ .Chart.Name }}-health" port: {{ .Values.service.externalHealthPort }} targetPort: {{ .Values.service.internalHealthPort }} protocol: TCP +{{- if and (.Values.service.healthNodePort) (eq .Values.service.type "NodePort") }} + nodePort: {{ .Values.service.healthNodePort }} +{{- end }} selector: app: {{ template "clair.fullname" . }}