From: waynedunican Date: Fri, 15 Nov 2024 14:05:53 +0000 (+0000) Subject: Bring up second instance of apex for S3Ps X-Git-Tag: 4.1.0~21^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F139537%2F1;p=policy%2Fdocker.git Bring up second instance of apex for S3Ps Issue-ID: POLICY-5150 Change-Id: I43abad64831646965502719696fb62914c099a95 Signed-off-by: waynedunican --- diff --git a/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfigSampleGroup.json b/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfigSampleGroup.json new file mode 100644 index 00000000..8d197f67 --- /dev/null +++ b/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfigSampleGroup.json @@ -0,0 +1,50 @@ +{ + "name": "OnapPfParameterGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "${RESTSERVER_USER}", + "password": "${RESTSERVER_PASSWORD}", + "https": false, + "prometheus": true + }, + "pdpStatusParameters": { + "pdpGroup": "sampleGroup", + "timeIntervalMs": 20000, + "pdpType": "apex", + "description": "Pdp Heartbeat", + "supportedPolicyTypes": [ + { + "name": "onap.policies.native.Apex", + "version": "1.0.0" + }, + { + "name": "onap.policies.controlloop.operational.common.Apex", + "version": "1.0.0" + } + ] + }, + "topicParameterGroup": { + "topicSources": [ + { + "topic": "policy-pdp-pap", + "servers": [ + "{{ .Values.global.kafkaServer }}:9092" + ], + "useHttps": false, + "topicCommInfrastructure": "kafka", + "fetchTimeout": 15000 + } + ], + "topicSinks": [ + { + "topic": "policy-pdp-pap", + "servers": [ + "{{ .Values.global.kafkaServer }}:9092" + ], + "useHttps": false, + "topicCommInfrastructure": "kafka" + } + ] + } +} \ No newline at end of file diff --git a/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml b/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml index 305d1c8e..e817024e 100755 --- a/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml +++ b/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml @@ -105,6 +105,46 @@ spec: {{- end -}} {{- if .Values.affinity }} affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + - name: {{ .Chart.Name }}-sg + image: {{ .Values.global.repository }}/{{ .Values.global.image.apex }} + imagePullPolicy: {{ .Values.global.pullPolicy }} + command: ["sh","-c"] + args: ["/opt/app/policy/apex-pdp/bin/apexOnapPf.sh -c /home/apexuser/config/OnapPfConfigSampleGroup.json"] + ports: + - containerPort: {{ .Values.service.externalPortSvc2 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.externalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{- end }} + readinessProbe: + tcpSocket: + port: {{ .Values.service.externalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + env: + - name: REPLICAS + value: "{{ .Values.replicaCount }}" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /var/log/onap + name: policy-logs + - mountPath: /home/apexuser/config + name: apexconfig + resources: +{{ toYaml .Values.resources.small | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} serviceAccountName: {{ .Chart.Name }}-read diff --git a/helm/policy/components/policy-apex-pdp/values.yaml b/helm/policy/components/policy-apex-pdp/values.yaml index add48dc8..668bcd2a 100755 --- a/helm/policy/components/policy-apex-pdp/values.yaml +++ b/helm/policy/components/policy-apex-pdp/values.yaml @@ -65,6 +65,7 @@ service: name: policy-apex-pdp portName: http externalPort: 6969 + externalPortSvc2: 6970 internalPort: 6969 nodePort: 37