瀏覽代碼

Template variable for container port (#251)

Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Anand Francis Joseph 1 年之前
父節點
當前提交
d7927a27b4
共有 2 個文件被更改,包括 3 次插入1 次删除
  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 }}
           ports:
             - name: http
-              containerPort: 80
+              containerPort: {{ .Values.containerPort }}
               protocol: TCP
           livenessProbe:
             httpGet:

+ 2 - 0
helm-guestbook/values.yaml

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