From 3ef2eca1d2c091ea48a49741ca15516937b27bf4 Mon Sep 17 00:00:00 2001 From: Emilien Devos Date: Tue, 19 Dec 2023 12:08:35 +0100 Subject: [PATCH] add ability to set other service type for sftp --- sftp/templates/sftp-svc.yaml | 5 ++++- sftp/values.yaml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sftp/templates/sftp-svc.yaml b/sftp/templates/sftp-svc.yaml index 47831a7..a79d474 100644 --- a/sftp/templates/sftp-svc.yaml +++ b/sftp/templates/sftp-svc.yaml @@ -6,10 +6,13 @@ metadata: {{- include "sftp.labels" . | nindent 4 }} app.georchestra.org: sftp spec: - type: ClusterIP + type: {{ .Values.sftp.service.type }} ports: - port: 22 protocol: TCP targetPort: 22 + {{- if .Values.sftp.service.nodePort }} + nodePort: {{ .Values.sftp.service.nodePort }} + {{- end }} selector: {{- include "sftp.selectorLabels" . | nindent 4 }} diff --git a/sftp/values.yaml b/sftp/values.yaml index eba340f..cf04b30 100644 --- a/sftp/values.yaml +++ b/sftp/values.yaml @@ -1,5 +1,8 @@ --- sftp: + service: + type: "ClusterIP" # or NodePort or LoadBalancer + # nodePort: 30022 # when type NodePort image: camptocamp/sftp:bullseye-k8s-georchestra imagePullPolicy: Always #lifecycle: