Bring up second instance of apex for S3Ps
Issue-ID: POLICY-5150
Change-Id: I43abad64831646965502719696fb62914c099a95
Signed-off-by: waynedunican <wayne.dunican@est.tech>
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 0000000..8d197f6
--- /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 305d1c8..e817024 100755
--- a/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml
+++ b/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml
@@ -107,6 +107,46 @@
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
volumes:
- name: localtime
diff --git a/helm/policy/components/policy-apex-pdp/values.yaml b/helm/policy/components/policy-apex-pdp/values.yaml
index add48dc..668bcd2 100755
--- a/helm/policy/components/policy-apex-pdp/values.yaml
+++ b/helm/policy/components/policy-apex-pdp/values.yaml
@@ -65,6 +65,7 @@
name: policy-apex-pdp
portName: http
externalPort: 6969
+ externalPortSvc2: 6970
internalPort: 6969
nodePort: 37