From d7927a27b4533926b7d86b5f249cd9ebe7625e90 Mon Sep 17 00:00:00 2001 From: Anand Francis Joseph Date: Wed, 15 Nov 2023 19:30:20 +0530 Subject: [PATCH] Template variable for container port (#251) Signed-off-by: Anand Francis Joseph --- helm-guestbook/templates/deployment.yaml | 2 +- helm-guestbook/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helm-guestbook/templates/deployment.yaml b/helm-guestbook/templates/deployment.yaml index 980df25..ab4b098 100644 --- a/helm-guestbook/templates/deployment.yaml +++ b/helm-guestbook/templates/deployment.yaml @@ -26,7 +26,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http - containerPort: 80 + containerPort: {{ .Values.containerPort }} protocol: TCP livenessProbe: httpGet: diff --git a/helm-guestbook/values.yaml b/helm-guestbook/values.yaml index 3666712..642921f 100644 --- a/helm-guestbook/values.yaml +++ b/helm-guestbook/values.yaml @@ -9,6 +9,8 @@ image: tag: 0.1 pullPolicy: IfNotPresent +containerPort: 80 + service: type: ClusterIP port: 80