From 7057670c9ded2ebe08448006796b38668b249bc5 Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Wed, 26 Jun 2024 11:30:49 +1200 Subject: [PATCH] chore: add configurable nodeport for configuring access to pass through in kind --- charts/auditlogger/templates/service.yaml | 2 ++ charts/auditlogger/values.yaml | 1 + charts/snoopdb/templates/service.yaml | 2 ++ charts/snoopdb/values.yaml | 1 + 4 files changed, 6 insertions(+) diff --git a/charts/auditlogger/templates/service.yaml b/charts/auditlogger/templates/service.yaml index 6e4087d0b..8cb5208d8 100644 --- a/charts/auditlogger/templates/service.yaml +++ b/charts/auditlogger/templates/service.yaml @@ -13,6 +13,8 @@ spec: - port: 9900 targetPort: http protocol: TCP + {{- if (and .Values.service.nodePort (eq .Values.service.type "NodePort")) }} + nodePort: {{ .Values.service.nodePort }}{{- end}} name: http selector: {{- include "auditlogger.selectorLabels" . | nindent 4 }} diff --git a/charts/auditlogger/values.yaml b/charts/auditlogger/values.yaml index 9d9921914..70e886deb 100644 --- a/charts/auditlogger/values.yaml +++ b/charts/auditlogger/values.yaml @@ -52,6 +52,7 @@ service: # "WE disable this for now as we work on vcluster" # 2023-09-18: Adding this back so this can work on non-vcluster environments, like kind+knative+apisnoop clusterIP: 10.96.96.96 + # nodePort: 30990 resources: {} diff --git a/charts/snoopdb/templates/service.yaml b/charts/snoopdb/templates/service.yaml index 7d9a25ea6..b1fe9eeec 100644 --- a/charts/snoopdb/templates/service.yaml +++ b/charts/snoopdb/templates/service.yaml @@ -9,6 +9,8 @@ spec: ports: - port: {{ .Values.service.port }} targetPort: {{ .Values.service.port }} + {{- if (and .Values.service.nodePort (eq .Values.service.type "NodePort")) }} + nodePort: {{ .Values.service.nodePort }}{{- end}} protocol: TCP name: postgres selector: diff --git a/charts/snoopdb/values.yaml b/charts/snoopdb/values.yaml index f200c702f..e48a4a3bd 100644 --- a/charts/snoopdb/values.yaml +++ b/charts/snoopdb/values.yaml @@ -48,6 +48,7 @@ securityContext: service: type: ClusterIP port: 5432 + # nodePort: 30432 resources: {}