Browse Source

Template variable for container port (#251)

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Anand Francis Joseph 1 year ago
parent
commit
d7927a27b4
2 changed files with 3 additions and 1 deletions
  1. 1 1
      helm-guestbook/templates/deployment.yaml
  2. 2 0
      helm-guestbook/values.yaml

+ 1 - 1
helm-guestbook/templates/deployment.yaml

@@ -26,7 +26,7 @@ spec:
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
           ports:
             - name: http
             - name: http
-              containerPort: 80
+              containerPort: {{ .Values.containerPort }}
               protocol: TCP
               protocol: TCP
           livenessProbe:
           livenessProbe:
             httpGet:
             httpGet:

+ 2 - 0
helm-guestbook/values.yaml

@@ -9,6 +9,8 @@ image:
   tag: 0.1
   tag: 0.1
   pullPolicy: IfNotPresent
   pullPolicy: IfNotPresent
 
 
+containerPort: 80
+
 service:
 service:
   type: ClusterIP
   type: ClusterIP
   port: 80
   port: 80