diff options
3 files changed, 91 insertions, 0 deletions
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 @@ -107,6 +107,46 @@ spec: 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 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 |