- addressed review on pod and service names: https://gerrit.onap.org/r/c/cps/+/142226
- pod and service names was repeating itself before this changets made:
before: they were cps-cps-and-ncmp-cps, cps-cps-and-ncmp-dmi-stub,
cps-cps-and-ncmp-postgresql, and cps-cps-and-ncmp-zookeeper
after: cps-ncmp, cps-ncmp-dmi-stub, cps-ncmp-postgresql, cps-ncmp-zookeeper
- changed imagePullPolicy from Always to IfNotPresent for cps-and-ncmp
Issue-ID: CPS-2967
Change-Id: I64b9d34b1a8359a5d26d209c57912d6ef408b8df
Signed-off-by: halil.cakal <halil.cakal@est.tech>
apiVersion: v2
-name: cps-and-ncmp
+name: ncmp
description: Helm chart for CPS and NCMP for testing purposes
version: 0.1.0
type: application
Replace <chart-directory> with the path to this Helm chart.
You can verify the deployment using:
```bash
-kubectl get all -l app=cps-and-ncmp
+kubectl get all -l app=ncmp
```
---
## Uninstallation
---
## CPS and NCMP (API) Service
```bash
-kubectl port-forward service/cps-cps-and-ncmp-cps 8080:8080
+kubectl port-forward service/cps-ncmp 8080:8080
```
Once port forwarding is active, you can access the CPS/NCMP API at:
http://localhost:8080
---
## DMI Stub Service
```bash
-kubectl port-forward service/cps-cps-and-ncmp-dmi-stub 8092:8092
+kubectl port-forward service/cps-ncmp-dmi-stub 8092:8092
```
Access the DMI stub API at:
http://localhost:8092
apiVersion: apps/v1
kind: Deployment
metadata:
- name: {{ include "cps-and-ncmp.fullname" . }}-cps
+ name: {{ include "cps-and-ncmp.fullname" . }}
labels:
app: {{ include "cps-and-ncmp.name" . }}
component: cps-and-ncmp
value: "{{ $envValue }}"
{{- end }}
- name: CPS_NCMP_SERVICE_NAME
- value: {{ include "cps-and-ncmp.name" . }}-cps-hazelcast
+ value: cps-{{ include "cps-and-ncmp.name" . }}-hazelcast
resources:
requests:
cpu: {{ .Values.cps.resources.requests.cpu }}
apiVersion: v1
kind: Service
metadata:
- name: {{ include "cps-and-ncmp.name" . }}-cps-hazelcast
+ name: cps-{{ include "cps-and-ncmp.name" . }}-hazelcast
labels:
app: {{ include "cps-and-ncmp.name" . }}
component: cps-and-ncmp
apiVersion: v1
kind: Service
metadata:
- name: {{ include "cps-and-ncmp.fullname" . }}-cps
+ name: {{ include "cps-and-ncmp.fullname" . }}
labels:
app: {{ include "cps-and-ncmp.name" . }}
component: cps-and-ncmp
image:
repository: "nexus3.onap.org:10003/onap/cps-and-ncmp"
tag: "latest"
- pullPolicy: Always
+ pullPolicy: IfNotPresent
replicas: 2
servicePort: 8080
service:
cpu: "6000m"
memory: "5Gi"
env:
- DB_HOST: "cps-cps-and-ncmp-postgresql"
+ DB_HOST: "cps-ncmp-postgresql"
DB_USERNAME: "cps"
DB_PASSWORD: "cps"
DMI_USERNAME: "cpsuser"
DMI_PASSWORD: "cpsr0cks!"
- KAFKA_BOOTSTRAP_SERVER: "cps-cps-and-ncmp-kafka.default.svc.cluster.local:9092"
+ KAFKA_BOOTSTRAP_SERVER: "cps-ncmp-kafka.default.svc.cluster.local:9092"
notification_enabled: "true"
ONAP_TRACING_ENABLED: "false"
ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT: "http://jaeger-service:14250"
external: 9093
nodePorts:
external: 30093
- zookeeperConnect: "cps-cps-and-ncmp-zookeeper.default.svc.cluster.local"
+ zookeeperConnect: "cps-ncmp-zookeeper.default.svc.cluster.local"
brokerId: 1
listeners: "INTERNAL://0.0.0.0:29092,EXTERNAL://0.0.0.0:9092,NODEPORT://0.0.0.0:9093"
- advertisedListeners: "INTERNAL://localhost:29092,EXTERNAL://cps-cps-and-ncmp-kafka:9092,NODEPORT://localhost:30093"
+ advertisedListeners: "INTERNAL://localhost:29092,EXTERNAL://cps-ncmp-kafka:9092,NODEPORT://localhost:30093"
interBrokerListenerName: "INTERNAL"
listenerSecurityProtocolMap: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,NODEPORT:PLAINTEXT"
offsetsTopicReplicationFactor: 1
healthcheck:
enabled: true
command: >
- kafka-topics --bootstrap-server cps-cps-and-ncmp-kafka:29092 --list || exit 1
+ kafka-topics --bootstrap-server cps-ncmp-kafka:29092 --list || exit 1
interval: 10
timeout: 10
retries: 3
nodePort: 30092
containerPort: 8092
env:
- KAFKA_BOOTSTRAP_SERVER: "cps-cps-and-ncmp-kafka.default.svc.cluster.local:9092"
+ KAFKA_BOOTSTRAP_SERVER: "cps-ncmp-kafka.default.svc.cluster.local:9092"
NCMP_CONSUMER_GROUP_ID: "ncmp-group"
NCMP_ASYNC_M2M_TOPIC: "ncmp-async-m2m"
MODULE_INITIAL_PROCESSING_DELAY_MS: 180000
# Wait for pods and services until becomes ready
echo "Waiting for cps and ncmp pods to be ready..."
- kubectl wait --for=condition=available deploy -l app=cps-and-ncmp --timeout=300s
+ kubectl wait --for=condition=available deploy -l app=ncmp --timeout=300s
else
echo "Error: Unsupported deployment type: $deploymentType"
readonly DOCKER_SERVICES_TO_BE_LOGGED=("cps-and-ncmp" "ncmp-dmi-plugin-demo-and-csit-stub" "dbpostgresql")
# Kubernetes services
-readonly K8S_SERVICES_TO_BE_LOGGED=("cps-cps-and-ncmp-cps" "cps-cps-and-ncmp-dmi-stub" "cps-cps-and-ncmp-postgresql")
+readonly K8S_SERVICES_TO_BE_LOGGED=("cps-ncmp" "cps-ncmp-dmi-stub" "cps-ncmp-postgresql")
readonly K8S_APP_LABEL="app=cps-and-ncmp"
# The default deployment type is dockerHosts
},
"k8sHosts": {
"ncmpBaseUrl": "http://localhost:30080",
- "dmiStubUrl": "http://cps-cps-and-ncmp-dmi-stub:8092",
+ "dmiStubUrl": "http://cps-ncmp-dmi-stub:8092",
"kafkaBootstrapServer": "localhost:30093"
},
"scenarios": {
},
"k8sHosts": {
"ncmpBaseUrl": "http://localhost:30080",
- "dmiStubUrl": "http://cps-cps-and-ncmp-dmi-stub:8092",
+ "dmiStubUrl": "http://cps-ncmp-dmi-stub:8092",
"kafkaBootstrapServer": "localhost:30093"
},
"scenarios": {