Merge "Add port variable for appc cdt"
authorBorislav Glozman <Borislav.Glozman@amdocs.com>
Sun, 3 Jun 2018 17:07:06 +0000 (17:07 +0000)
committerGerrit Code Review <gerrit@onap.org>
Sun, 3 Jun 2018 17:07:06 +0000 (17:07 +0000)
kubernetes/appc/charts/appc-cdt/templates/deployment.yaml
kubernetes/appc/templates/service.yaml
kubernetes/appc/values.yaml

index 2226b75..a2cb9fc 100644 (file)
@@ -21,6 +21,8 @@ spec:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          command:
+          - /opt/startCdt.sh
           ports:
           - containerPort: {{ .Values.service.internalPort }}
             name: {{ .Values.service.name }}
@@ -39,6 +41,11 @@ spec:
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
+          # This sets the port that CDT will use to connect to the main appc container.
+          # The 32 is the node port suffix that is used in the main appc oom templates
+          # for nodePort3.
+          - name: CDT_PORT
+            value: "{{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.nodePort3 }}"
           volumeMounts:
           - mountPath: /etc/localtime
             name: localtime
index 0ba73e3..733c4ca 100644 (file)
@@ -32,6 +32,7 @@ spec:
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
       name: "{{ .Values.service.portName }}-1830"
     - port: {{ .Values.service.externalPort3 }}
+      targetPort: {{ .Values.service.internalPort3 }}
       nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
       name: "{{ .Values.service.portName }}-9090"
     {{- else -}}
index 1bb7e23..9b7b547 100644 (file)
@@ -69,7 +69,8 @@ dgbuilder:
     dbServiceName: appc-dbhost
   service:
     name: appc-dgbuilder
-
+appc-cdt:
+  nodePort3: 32
 # default number of instances
 replicaCount: 1