From bb9d5380d9303e49a14e3db3222a2b2d2f851fd7 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Tue, 8 Jul 2025 18:28:45 +0200 Subject: [PATCH] CPS local Helm charts - added helm chart - added required services (cps, dmi etc) - added headless service to access hazelcast service - added README Issue-Id: CPS-2783 Change-Id: I11f0b07b80625a80b414490d630407a262495867 Signed-off-by: leventecsanyi Signed-off-by: mpriyank --- cps-charts/.helmignore | 23 ++++ cps-charts/Chart.yaml | 12 ++ cps-charts/README.md | 67 ++++++++++ cps-charts/config/postgres-init.sql | 1 + cps-charts/templates/_helpers.tpl | 7 ++ cps-charts/templates/cps-deployment.yaml | 75 +++++++++++ cps-charts/templates/cps-hazelcast-service.yaml | 14 +++ cps-charts/templates/cps-service.yaml | 13 ++ cps-charts/templates/dmi-stub-deployment.yaml | 33 +++++ cps-charts/templates/dmi-stub-service.yaml | 19 +++ cps-charts/templates/kafka-deployment.yaml | 58 +++++++++ cps-charts/templates/kafka-service.yaml | 17 +++ cps-charts/templates/postgres-init-configmap.yaml | 7 ++ cps-charts/templates/postgresql-deployment.yaml | 52 ++++++++ cps-charts/templates/postgresql-service.yaml | 12 ++ cps-charts/templates/zookeeper-deployment.yaml | 49 ++++++++ cps-charts/templates/zookeeper-service.yaml | 17 +++ cps-charts/values.yaml | 146 ++++++++++++++++++++++ 18 files changed, 622 insertions(+) create mode 100644 cps-charts/.helmignore create mode 100644 cps-charts/Chart.yaml create mode 100644 cps-charts/README.md create mode 100644 cps-charts/config/postgres-init.sql create mode 100644 cps-charts/templates/_helpers.tpl create mode 100644 cps-charts/templates/cps-deployment.yaml create mode 100644 cps-charts/templates/cps-hazelcast-service.yaml create mode 100644 cps-charts/templates/cps-service.yaml create mode 100644 cps-charts/templates/dmi-stub-deployment.yaml create mode 100644 cps-charts/templates/dmi-stub-service.yaml create mode 100644 cps-charts/templates/kafka-deployment.yaml create mode 100644 cps-charts/templates/kafka-service.yaml create mode 100644 cps-charts/templates/postgres-init-configmap.yaml create mode 100644 cps-charts/templates/postgresql-deployment.yaml create mode 100644 cps-charts/templates/postgresql-service.yaml create mode 100644 cps-charts/templates/zookeeper-deployment.yaml create mode 100644 cps-charts/templates/zookeeper-service.yaml create mode 100644 cps-charts/values.yaml diff --git a/cps-charts/.helmignore b/cps-charts/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/cps-charts/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/cps-charts/Chart.yaml b/cps-charts/Chart.yaml new file mode 100644 index 0000000000..4078b2c3a9 --- /dev/null +++ b/cps-charts/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +name: cps-and-ncmp +description: Helm chart for CPS and NCMP for testing purposes +version: 0.1.0 +type: application +appVersion: "1.0.0" +home: "https://docs.onap.org/projects/onap-cps/en/latest/index.html" +sources: + - "https://gerrit.onap.org/r/admin/repos/cps,general" +maintainers: + - name: "CPS Team" + email: "cpsteam@est.tech" diff --git a/cps-charts/README.md b/cps-charts/README.md new file mode 100644 index 0000000000..c2955cc593 --- /dev/null +++ b/cps-charts/README.md @@ -0,0 +1,67 @@ + +# CPS and NCMP Helm Chart +This Helm chart deploys the **CPS** and **NCMP** ecosystem along with PostgreSQL, Kafka, Zookeeper, and the DMI Stub service. +--- +## Prerequisites +- Kubernetes cluster (tested on K8s 1.24+) +- Helm 3.x +- Access to the necessary Docker image registry (e.g., `nexus3.onap.org`) +--- +## Installation +To install the chart into the **default namespace**: +```bash +helm install cps-and-ncmp ./ +``` +Replace with the path to this Helm chart. +You can verify the deployment using: +```bash +kubectl get all -l app.kubernetes.io/instance=cps-and-ncmp +``` +--- +## Uninstallation +To uninstall the chart and delete all related resources: +```bash +helm uninstall cps-and-ncmp +``` +--- +## Port Forwarding +You can access the services locally using kubectl port-forward. +--- +## CPS and NCMP (API) Service +```bash +kubectl port-forward service/cps-and-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/dmi-stub 8092:8092 +``` +Access the DMI stub API at: +http://localhost:8092 +--- +## Default Credentials +### PostgreSQL +Database: cpsdb +Username: cps +Password: cps +### DMI Stub +Username: cpsuser +Password: cpsr0cks! +--- +## Configuration +This chart includes default settings suitable for local development and testing. You can customize values using a custom values.yaml file or by passing --set parameters at install time. +Example: +```bash +helm install cps-and-ncmp ./ --set cps.replicas=1 +``` +--- +## Chart Components +This Helm chart deploys the following components: +- postgresql: CPS database +- cps-and-ncmp: CPS and NCMP backend services +- kafka: Kafka message broker +- zookeeper: Zookeeper coordination service for Kafka +- dmi-stub: Stub service for NCMP device interactions +--- diff --git a/cps-charts/config/postgres-init.sql b/cps-charts/config/postgres-init.sql new file mode 100644 index 0000000000..7fa24d2b97 --- /dev/null +++ b/cps-charts/config/postgres-init.sql @@ -0,0 +1 @@ +ALTER SYSTEM SET shared_buffers = '512MB'; \ No newline at end of file diff --git a/cps-charts/templates/_helpers.tpl b/cps-charts/templates/_helpers.tpl new file mode 100644 index 0000000000..377d136b6b --- /dev/null +++ b/cps-charts/templates/_helpers.tpl @@ -0,0 +1,7 @@ +{{- define "cps-and-ncmp.name" -}} +{{ .Chart.Name }} +{{- end }} + +{{- define "cps-and-ncmp.fullname" -}} +{{ .Release.Name }}-{{ .Chart.Name }} +{{- end }} diff --git a/cps-charts/templates/cps-deployment.yaml b/cps-charts/templates/cps-deployment.yaml new file mode 100644 index 0000000000..a09fa7fa41 --- /dev/null +++ b/cps-charts/templates/cps-deployment.yaml @@ -0,0 +1,75 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-cps +spec: + replicas: {{ .Values.cps.replicas }} + selector: + matchLabels: + app: {{ include "cps-and-ncmp.name" . }} + component: cps + template: + metadata: + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: cps + spec: + containers: + - name: cps + image: "{{ .Values.cps.image.repository }}:{{ .Values.cps.image.tag }}" + ports: + - containerPort: 8080 + - containerPort: 5701 + env: + - name: DB_HOST + value: "{{ .Values.cps.env.DB_HOST }}" + - name: DB_USERNAME + value: "{{ .Values.cps.env.DB_USERNAME }}" + - name: DB_PASSWORD + value: "{{ .Values.cps.env.DB_PASSWORD }}" + - name: DMI_USERNAME + value: "{{ .Values.cps.env.DMI_USERNAME }}" + - name: DMI_PASSWORD + value: "{{ .Values.cps.env.DMI_PASSWORD }}" + - name: KAFKA_BOOTSTRAP_SERVER + value: "{{ .Values.cps.env.KAFKA_BOOTSTRAP_SERVER }}" + - name: notification.enabled + value: "{{ .Values.cps.env.notification_enabled }}" + - name: ONAP_TRACING_ENABLED + value: "{{ .Values.cps.env.ONAP_TRACING_ENABLED }}" + - name: ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT + value: "{{ .Values.cps.env.ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT }}" + - name: ONAP_OTEL_EXPORTER_ENDPOINT + value: "{{ .Values.cps.env.ONAP_OTEL_EXPORTER_ENDPOINT }}" + - name: POLICY_SERVICE_ENABLED + value: "{{ .Values.cps.env.POLICY_SERVICE_ENABLED }}" + - name: POLICY_SERVICE_DEFAULT_DECISION + value: "{{ .Values.cps.env.POLICY_SERVICE_DEFAULT_DECISION }}" + - name: CPS_MONITORING_MICROMETER_JVM_EXTRAS + value: "{{ .Values.cps.env.CPS_MONITORING_MICROMETER_JVM_EXTRAS }}" + - name: JAVA_TOOL_OPTIONS + value: "{{ .Values.cps.env.JAVA_TOOL_OPTIONS }}" + - name: HAZELCAST_MODE_KUBERNETES_ENABLED + value: "{{ .Values.cps.env.HAZELCAST_MODE_KUBERNETES_ENABLED }}" + - name: CPS_NCMP_SERVICE_NAME + value: {{ include "cps-and-ncmp.name" . }}-cps-hazelcast + resources: + limits: + cpu: {{ .Values.cps.resources.limits.cpu }} + memory: {{ .Values.cps.resources.limits.memory }} + readinessProbe: + httpGet: + path: /actuator/health/readiness + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + livenessProbe: + httpGet: + path: /actuator/health/liveness + port: 8080 + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 diff --git a/cps-charts/templates/cps-hazelcast-service.yaml b/cps-charts/templates/cps-hazelcast-service.yaml new file mode 100644 index 0000000000..310f869493 --- /dev/null +++ b/cps-charts/templates/cps-hazelcast-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.name" . }}-cps-hazelcast +spec: + clusterIP: None + selector: + app: {{ include "cps-and-ncmp.name" . }} + component: cps + ports: + - port: 5701 + targetPort: 5701 + protocol: TCP + name: hazelcast-port diff --git a/cps-charts/templates/cps-service.yaml b/cps-charts/templates/cps-service.yaml new file mode 100644 index 0000000000..c19df5cb11 --- /dev/null +++ b/cps-charts/templates/cps-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-cps +spec: + type: {{ .Values.cps.service.type | default "ClusterIP" }} + selector: + app: {{ include "cps-and-ncmp.name" . }} + component: cps + ports: + - port: {{ .Values.cps.servicePort }} + targetPort: 8080 + nodePort: {{ .Values.cps.service.nodePort | default nil }} diff --git a/cps-charts/templates/dmi-stub-deployment.yaml b/cps-charts/templates/dmi-stub-deployment.yaml new file mode 100644 index 0000000000..f0a59a9c0f --- /dev/null +++ b/cps-charts/templates/dmi-stub-deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-dmi-stub + labels: + app: {{ include "cps-and-ncmp.name" . }} +spec: + replicas: {{ .Values.dmiStub.replicaCount }} + selector: + matchLabels: + app: {{ include "cps-and-ncmp.name" . }} + component: dmi-stub + template: + metadata: + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: dmi-stub + spec: + containers: + - name: dmi-stub + image: "{{ .Values.dmiStub.image.repository }}:{{ .Values.dmiStub.image.tag }}" + imagePullPolicy: {{ .Values.dmiStub.image.pullPolicy }} + ports: + - containerPort: {{ .Values.dmiStub.containerPort }} + env: + {{- range $key, $value := .Values.dmiStub.env }} + - name: {{ $key }} + value: "{{ $value }}" + {{- end }} + resources: + {{- toYaml .Values.dmiStub.resources | nindent 12 }} + livenessProbe: + {{- toYaml .Values.dmiStub.livenessProbe | nindent 12 }} diff --git a/cps-charts/templates/dmi-stub-service.yaml b/cps-charts/templates/dmi-stub-service.yaml new file mode 100644 index 0000000000..bc8b0b64d8 --- /dev/null +++ b/cps-charts/templates/dmi-stub-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-dmi-stub + labels: + app: {{ include "cps-and-ncmp.name" . }} +spec: + type: {{ .Values.dmiStub.service.type }} + ports: + - port: {{ .Values.dmiStub.service.port }} + targetPort: {{ .Values.dmiStub.containerPort }} + protocol: TCP + name: http + {{- if and (eq .Values.dmiStub.service.type "NodePort") .Values.dmiStub.service.nodePort }} + nodePort: {{ .Values.dmiStub.service.nodePort }} + {{- end }} + selector: + app: {{ include "cps-and-ncmp.name" . }} + component: dmi-stub diff --git a/cps-charts/templates/kafka-deployment.yaml b/cps-charts/templates/kafka-deployment.yaml new file mode 100644 index 0000000000..eb7e97e17b --- /dev/null +++ b/cps-charts/templates/kafka-deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-kafka + labels: + app: kafka +spec: + replicas: {{ .Values.kafka.replicaCount }} + selector: + matchLabels: + app: kafka + template: + metadata: + labels: + app: kafka + spec: + containers: + - name: kafka + image: "{{ .Values.kafka.image.repository }}:{{ .Values.kafka.image.tag }}" + imagePullPolicy: {{ .Values.kafka.image.pullPolicy }} + ports: + - containerPort: {{ .Values.kafka.service.ports.internal }} + name: internal + - containerPort: {{ .Values.kafka.service.ports.external }} + name: external + env: + - name: KAFKA_BROKER_ID + value: "{{ .Values.kafka.brokerId }}" + - name: KAFKA_ZOOKEEPER_CONNECT + value: "{{ .Values.kafka.zookeeperConnect }}:2181" + - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP + value: "{{ .Values.kafka.listenerSecurityProtocolMap }}" + - name: KAFKA_LISTENERS + value: "{{ .Values.kafka.listeners }}" + - name: KAFKA_ADVERTISED_LISTENERS + value: "{{ .Values.kafka.advertisedListeners }}" + - name: KAFKA_INTER_BROKER_LISTENER_NAME + value: "{{ .Values.kafka.interBrokerListenerName }}" + - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR + value: "{{ .Values.kafka.offsetsTopicReplicationFactor }}" + resources: + limits: + cpu: "{{ .Values.kafka.resources.limits.cpu }}" + memory: "{{ .Values.kafka.resources.limits.memory }}" + requests: + cpu: "{{ .Values.kafka.resources.requests.cpu }}" + memory: "{{ .Values.kafka.resources.requests.memory }}" + readinessProbe: + exec: + command: + - kafka-topics + - --bootstrap-server + - localhost:{{ .Values.kafka.service.ports.internal }} + - --list + initialDelaySeconds: {{ .Values.kafka.healthcheck.startPeriod | default 30 }} + periodSeconds: {{ .Values.kafka.healthcheck.interval | default 10 }} + timeoutSeconds: {{ .Values.kafka.healthcheck.timeout | default 10 }} + failureThreshold: {{ .Values.kafka.healthcheck.retries | default 3 }} diff --git a/cps-charts/templates/kafka-service.yaml b/cps-charts/templates/kafka-service.yaml new file mode 100644 index 0000000000..a2cdba364c --- /dev/null +++ b/cps-charts/templates/kafka-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-kafka + labels: + app: kafka +spec: + type: {{ .Values.kafka.service.type }} + ports: + - name: internal + port: {{ .Values.kafka.service.ports.internal }} + targetPort: {{ .Values.kafka.service.ports.internal }} + - name: external + port: {{ .Values.kafka.service.ports.external }} + targetPort: {{ .Values.kafka.service.ports.external }} + selector: + app: kafka \ No newline at end of file diff --git a/cps-charts/templates/postgres-init-configmap.yaml b/cps-charts/templates/postgres-init-configmap.yaml new file mode 100644 index 0000000000..5a5344b08e --- /dev/null +++ b/cps-charts/templates/postgres-init-configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-init-sql +data: + postgres-init.sql: |- + {{ .Files.Get "config/postgres-init.sql" | indent 4 }} \ No newline at end of file diff --git a/cps-charts/templates/postgresql-deployment.yaml b/cps-charts/templates/postgresql-deployment.yaml new file mode 100644 index 0000000000..ecc2137205 --- /dev/null +++ b/cps-charts/templates/postgresql-deployment.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-postgresql +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "cps-and-ncmp.name" . }} + component: postgresql + template: + metadata: + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: postgresql + spec: + containers: + - name: postgresql + image: "{{ .Values.postgresql.image }}" + ports: + - containerPort: 5432 + env: + - name: POSTGRES_DB + value: "{{ .Values.postgresql.env.POSTGRES_DB }}" + - name: POSTGRES_USER + value: "{{ .Values.postgresql.env.POSTGRES_USER }}" + - name: POSTGRES_PASSWORD + value: "{{ .Values.postgresql.env.POSTGRES_PASSWORD }}" + volumeMounts: + - name: init-sql + mountPath: {{ .Values.postgresql.initSql.mountPath }} + resources: + requests: + cpu: {{ .Values.postgresql.resources.requests.cpu }} + memory: {{ .Values.postgresql.resources.requests.memory }} + limits: + cpu: {{ .Values.postgresql.resources.limits.cpu }} + memory: {{ .Values.postgresql.resources.limits.memory }} + readinessProbe: + exec: + command: + - sh + - -c + - pg_isready -U {{ .Values.postgresql.env.POSTGRES_USER }} -d {{ .Values.postgresql.env.POSTGRES_DB }} + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 10 + volumes: + - name: init-sql + configMap: + name: {{ .Values.postgresql.initSql.configMapName }} diff --git a/cps-charts/templates/postgresql-service.yaml b/cps-charts/templates/postgresql-service.yaml new file mode 100644 index 0000000000..1997c7d88e --- /dev/null +++ b/cps-charts/templates/postgresql-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-postgresql +spec: + type: ClusterIP + selector: + app: {{ include "cps-and-ncmp.name" . }} + component: postgresql + ports: + - port: {{ .Values.postgresql.servicePort }} + targetPort: 5432 diff --git a/cps-charts/templates/zookeeper-deployment.yaml b/cps-charts/templates/zookeeper-deployment.yaml new file mode 100644 index 0000000000..b48128dd82 --- /dev/null +++ b/cps-charts/templates/zookeeper-deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-zookeeper + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: zookeeper +spec: + replicas: 1 + selector: + matchLabels: + app: {{ include "cps-and-ncmp.name" . }} + component: zookeeper + template: + metadata: + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: zookeeper + spec: + containers: + - name: zookeeper + image: "{{ .Values.zookeeper.image.repository }}:{{ .Values.zookeeper.image.tag }}" + imagePullPolicy: {{ .Values.zookeeper.image.pullPolicy }} + ports: + - containerPort: {{ .Values.zookeeper.service.port }} + env: + - name: ZOOKEEPER_CLIENT_PORT + value: "{{ .Values.zookeeper.env.ZOOKEEPER_CLIENT_PORT }}" + readinessProbe: + exec: + command: {{ toJson .Values.zookeeper.healthcheck.command }} + initialDelaySeconds: {{ .Values.zookeeper.healthcheck.startPeriod | int }} + periodSeconds: {{ .Values.zookeeper.healthcheck.interval | int }} + timeoutSeconds: {{ .Values.zookeeper.healthcheck.timeout | int }} + failureThreshold: {{ .Values.zookeeper.healthcheck.retries | int }} + livenessProbe: + exec: + command: {{ toJson .Values.zookeeper.healthcheck.command }} + initialDelaySeconds: {{ .Values.zookeeper.healthcheck.startPeriod | int }} + periodSeconds: {{ .Values.zookeeper.healthcheck.interval | int }} + timeoutSeconds: {{ .Values.zookeeper.healthcheck.timeout | int }} + failureThreshold: {{ .Values.zookeeper.healthcheck.retries | int }} + resources: + limits: + cpu: {{ .Values.zookeeper.resources.limits.cpu }} + memory: {{ .Values.zookeeper.resources.limits.memory }} + requests: + cpu: {{ .Values.zookeeper.resources.requests.cpu }} + memory: {{ .Values.zookeeper.resources.requests.memory }} diff --git a/cps-charts/templates/zookeeper-service.yaml b/cps-charts/templates/zookeeper-service.yaml new file mode 100644 index 0000000000..ee793ea473 --- /dev/null +++ b/cps-charts/templates/zookeeper-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "cps-and-ncmp.fullname" . }}-zookeeper + labels: + app: {{ include "cps-and-ncmp.name" . }} + component: zookeeper +spec: + type: {{ .Values.zookeeper.service.type }} + ports: + - port: {{ .Values.zookeeper.service.port }} + targetPort: {{ .Values.zookeeper.service.port }} + protocol: TCP + name: client + selector: + app: {{ include "cps-and-ncmp.name" . }} + component: zookeeper diff --git a/cps-charts/values.yaml b/cps-charts/values.yaml new file mode 100644 index 0000000000..bbe8ee3290 --- /dev/null +++ b/cps-charts/values.yaml @@ -0,0 +1,146 @@ +postgresql: + image: "postgres:14.1-alpine" + resources: + requests: + cpu: "1" + memory: "1Gi" + limits: + cpu: "1" + memory: "1Gi" + servicePort: 5432 + env: + POSTGRES_DB: "cpsdb" + POSTGRES_USER: "cps" + POSTGRES_PASSWORD: "cps" + initSql: + enabled: true + configMapName: postgres-init-sql + mountPath: /docker-entrypoint-initdb.d + +cps: + image: + repository: "nexus3.onap.org:10003/onap/cps-and-ncmp" + tag: "latest" + replicas: 2 + servicePort: 8080 + service: + type: NodePort + port: 8080 + nodePort: 30080 + resources: + limits: + cpu: "1" + memory: "1Gi" + env: + DB_HOST: "cps-cps-and-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" + notification_enabled: "true" + ONAP_TRACING_ENABLED: "false" + ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT: "http://jaeger-service:14250" + ONAP_OTEL_EXPORTER_ENDPOINT: "http://jaeger-service:4317" + POLICY_SERVICE_ENABLED: "false" + POLICY_SERVICE_DEFAULT_DECISION: "deny from env" + CPS_MONITORING_MICROMETER_JVM_EXTRAS: "true" + JAVA_TOOL_OPTIONS: "-XX:InitialRAMPercentage=70.0 -XX:MaxRAMPercentage=70.0" + HAZELCAST_MODE_KUBERNETES_ENABLED: "true" + +kafka: + enabled: true + image: + repository: confluentinc/cp-kafka + tag: 7.8.0 + pullPolicy: IfNotPresent + replicaCount: 1 + service: + type: ClusterIP + ports: + external: 9092 + internal: 29092 + zookeeperConnect: "cps-cps-and-ncmp-zookeeper.default.svc.cluster.local" + brokerId: 1 + listeners: "INTERNAL://0.0.0.0:29092,EXTERNAL://0.0.0.0:9092" + advertisedListeners: "INTERNAL://localhost:29092,EXTERNAL://cps-cps-and-ncmp-kafka:9092" + interBrokerListenerName: "INTERNAL" + listenerSecurityProtocolMap: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT" + offsetsTopicReplicationFactor: 1 + resources: + limits: + cpu: "500m" + memory: "1Gi" + requests: + cpu: "250m" + memory: "512Mi" + healthcheck: + enabled: true + command: > + kafka-topics --bootstrap-server cps-cps-and-ncmp-kafka:29092 --list || exit 1 + interval: 10 + timeout: 10 + retries: 3 + startPeriod: 30 + +zookeeper: + enabled: true + image: + repository: confluentinc/cp-zookeeper + tag: 7.8.0 + pullPolicy: IfNotPresent + service: + type: ClusterIP + port: 2181 + resources: + limits: + cpu: "500m" + memory: "1Gi" + requests: + cpu: "250m" + memory: "512Mi" + env: + ZOOKEEPER_CLIENT_PORT: 2181 + healthcheck: + enabled: true + command: ["sh", "-c", "nc -z localhost 2181 || exit 1"] + interval: 10s + timeout: 10s + retries: 3 + startPeriod: 30s + +dmiStub: + enabled: true + image: + repository: nexus3.onap.org:10003/onap/dmi-stub + tag: "1.8.0-SNAPSHOT" + pullPolicy: IfNotPresent + replicaCount: 1 + service: + type: NodePort + port: 8092 + nodePort: 30092 + containerPort: 8092 + env: + KAFKA_BOOTSTRAP_SERVER: "cps-and-ncmp-kafka:29092" + NCMP_CONSUMER_GROUP_ID: "ncmp-group" + NCMP_ASYNC_M2M_TOPIC: "ncmp-async-m2m" + MODULE_INITIAL_PROCESSING_DELAY_MS: "180000" + MODULE_REFERENCES_DELAY_MS: "100" + MODULE_RESOURCES_DELAY_MS: "1000" + READ_DATA_FOR_CM_HANDLE_DELAY_MS: "300" + WRITE_DATA_FOR_CM_HANDLE_DELAY_MS: "670" + resources: + limits: + cpu: "500m" + memory: "512Mi" + requests: + cpu: "100m" + memory: "128Mi" + livenessProbe: + httpGet: + path: /actuator/health/readiness + port: 8092 + initialDelaySeconds: 30 + periodSeconds: 10 + failureThreshold: 3 -- 2.16.6