Add kafka support in K8s CSIT 60/137060/4
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>
Sun, 21 Jan 2024 14:24:03 +0000 (14:24 +0000)
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>
Mon, 22 Jan 2024 14:55:45 +0000 (14:55 +0000)
Issue-ID: POLICY-4402
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I29ef966ed5eb70997574269ff6180f68d754383b

66 files changed:
compose/docker-compose.postgres.yml
compose/export-ports.sh
csit/resources/Dockerfile
csit/resources/scripts/setup-apex-pdp-large.sh
csit/resources/scripts/setup-apex-pdp-medium.sh
csit/resources/scripts/setup-apex-pdp.sh
csit/resources/scripts/setup-drools-applications.sh
csit/resources/scripts/setup-xacml-pdp.sh
csit/resources/tests/apex-pdp-test.robot
csit/resources/tests/apex-slas-10.robot
csit/resources/tests/apex-slas-3.robot
csit/resources/tests/apex-slas.robot
csit/resources/tests/common-library.robot
csit/resources/tests/data/AcK8s.json
csit/resources/tests/data/acelement-usecase.yaml
csit/resources/tests/drools-applications-test.robot
csit/resources/tests/kafka_consumer.py
csit/resources/tests/kafka_producer.py
csit/resources/tests/make_topics.py
csit/resources/tests/policy-clamp-test.robot
csit/run-k8s-csit.sh
helm/cp-kafka/kafka.yaml [new file with mode: 0644]
helm/cp-kafka/zookeeper.yaml [new file with mode: 0644]
helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json
helm/policy/components/policy-apex-pdp/templates/secrets.yaml
helm/policy/components/policy-apex-pdp/templates/statefulset.yaml
helm/policy/components/policy-apex-pdp/values.yaml
helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml
helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/secret.yaml
helm/policy/components/policy-clamp-ac-a1pms-ppnt/values.yaml
helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml
helm/policy/components/policy-clamp-ac-http-ppnt/templates/secrets.yaml
helm/policy/components/policy-clamp-ac-http-ppnt/values.yaml
helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml
helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/secret.yaml
helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml
helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml
helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/secret.yaml
helm/policy/components/policy-clamp-ac-kserve-ppnt/values.yaml
helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml
helm/policy/components/policy-clamp-ac-pf-ppnt/templates/secrets.yaml
helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml
helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
helm/policy/components/policy-clamp-runtime-acm/templates/secret.yaml
helm/policy/components/policy-clamp-runtime-acm/values.yaml
helm/policy/components/policy-drools-pdp/resources/configmaps/base.conf
helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-kafka.conf [moved from helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-dmaap.conf with 86% similarity]
helm/policy/components/policy-drools-pdp/resources/configmaps/noop.pre.sh
helm/policy/components/policy-drools-pdp/resources/secrets/credentials.conf
helm/policy/components/policy-drools-pdp/templates/statefulset.yaml
helm/policy/components/policy-drools-pdp/values.yaml
helm/policy/components/policy-models-simulator/resources/config/simParameters.json
helm/policy/components/policy-models-simulator/values.yaml
helm/policy/components/policy-pap/resources/config/papParameters.yaml
helm/policy/components/policy-pap/templates/deployment.yaml
helm/policy/components/policy-pap/templates/secrets.yaml
helm/policy/components/policy-pap/values.yaml
helm/policy/components/policy-xacml-pdp/resources/config/config.json
helm/policy/components/policy-xacml-pdp/values.yaml
helm/policy/values.yaml

index 1f32dba..9c09b66 100644 (file)
@@ -73,7 +73,7 @@ services:
       - 6670
       - 6680
     ports:
-      - ${SIMULATOR_PORT}:3904
+      - ${SIMULATOR_PORT}:6666
   api:
     image: ${CONTAINER_LOCATION}onap/policy-api:${POLICY_API_VERSION}
     container_name: policy-api
index 1648863..a3422da 100755 (executable)
@@ -44,6 +44,6 @@ export SIM_PARTICIPANT_PORT=30011
 export DROOLS_APPS_PORT=30009
 export DROOLS_APPS_TELEMETRY_PORT=30219
 export SIMULATOR_PORT=30904
-export KAFKA_PORT=9092
+export KAFKA_PORT=29092
 export PROMETHEUS_PORT=30259
 export GRAFANA_PORT=30269
index 50bf4d1..9a43663 100644 (file)
@@ -4,6 +4,7 @@ ARG ROBOT_FILE=${ROBOT_FILE}
 ENV ROBOT_WORKSPACE=/opt/robotworkspace ROBOT_FILE=$ROBOT_FILE
 RUN python3 -m pip install --upgrade pip && \
     python3 -m pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.6.0.*' --pre && \
+    python3 -m pip install --upgrade confluent-kafka && \
     python3 -m pip freeze
 RUN mkdir -p ${ROBOT_WORKSPACE}
 COPY ${CSIT_SCRIPT} tests/ ${ROBOT_WORKSPACE}/
index 1f55861..aeb4456 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 export PROJECT="apex-pdp"
+export KAFKA_IP="localhost:${KAFKA_PORT}"
 source "${SCRIPTS}"/node-templates.sh
 
 source "${WORKSPACE}"/compose/start-multiple-pdp.sh 10
@@ -49,4 +50,4 @@ export SUITES="apex-slas-10.robot"
 
 ROBOT_VARIABLES="-v POLICY_PAP_IP:localhost:${PAP_PORT} -v POLICY_API_IP:localhost:${API_PORT}
 -v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT} -v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}
--v APEX_IP:localhost:${APEX_PORT} -v APEX_EVENTS_IP:localhost:${APEX_PORT}"
+-v APEX_IP:localhost:${APEX_PORT} -v APEX_EVENTS_IP:localhost:${APEX_PORT -v KAFKA_IP:${KAFKA_IP}}"
index e7e0725..5d1dbb2 100644 (file)
@@ -18,6 +18,7 @@
 #
 
 export PROJECT="apex-pdp"
+export KAFKA_IP="localhost:${KAFKA_PORT}"
 source "${SCRIPTS}"/node-templates.sh
 
 source "${WORKSPACE}"/compose/start-multiple-pdp.sh 3
@@ -49,4 +50,4 @@ export SUITES="apex-slas-3.robot"
 
 ROBOT_VARIABLES="-v POLICY_PAP_IP:localhost:${PAP_PORT} -v POLICY_API_IP:localhost:${API_PORT}
 -v PROMETHEUS_IP:localhost:${PROMETHEUS_PORT} -v DATA:${DATA} -v NODETEMPLATES:${NODETEMPLATES}
--v APEX_IP:localhost:${APEX_PORT} -v APEX_EVENTS_IP:localhost:${APEX_PORT}"
+-v APEX_IP:localhost:${APEX_PORT} -v APEX_EVENTS_IP:localhost:${APEX_PORT} -v KAFKA_IP:${KAFKA_IP}"
index 198a601..1f04fc8 100755 (executable)
@@ -26,7 +26,7 @@ source "${SCRIPTS}"/setup-pap.sh
 # wait for the app to start up
 bash "${SCRIPTS}"/wait_for_rest.sh localhost ${APEX_PORT}
 
-export KAFKA_IP="kafka:${KAFKA_PORT}"
+export KAFKA_IP="localhost:${KAFKA_PORT}"
 export SUITES="apex-pdp-test.robot
 apex-slas.robot"
 
index 369874b..94272e3 100755 (executable)
@@ -26,6 +26,7 @@ sleep 10
 unset http_proxy https_proxy
 
 export SUITES="drools-applications-test.robot"
+export KAFKA_IP="localhost:${KAFKA_PORT}"
 
 # wait for the app to start up
 "${SCRIPTS}"/wait_for_rest.sh localhost ${DROOLS_APPS_PORT}
@@ -35,4 +36,4 @@ sleep 15
 
 ROBOT_VARIABLES="-v DATA:${DATA} -v DROOLS_IP:localhost:${DROOLS_APPS_PORT}
 -v DROOLS_IP_2:localhost:${DROOLS_APPS_TELEMETRY_PORT} -v POLICY_API_IP:localhost:${API_PORT}
--v POLICY_PAP_IP:localhost:${PAP_PORT} -v KAFKA_IP:localhost:${KAFKA_PORT}"
+-v POLICY_PAP_IP:localhost:${PAP_PORT} -v KAFKA_IP:${KAFKA_IP}"
index 4511d91..79a53be 100755 (executable)
@@ -26,10 +26,11 @@ sleep 10
 unset http_proxy https_proxy
 
 export SUITES="xacml-pdp-test.robot"
+export KAFKA_IP="localhost:${KAFKA_PORT}"
 
 # wait for the app to start up
 "${SCRIPTS}"/wait_for_rest.sh localhost "${XACML_PORT}"
 
 ROBOT_VARIABLES="-v DATA:${DATA} -v POLICY_PDPX_IP:localhost:${XACML_PORT}
 -v POLICY_API_IP:localhost:${API_PORT} -v POLICY_PAP_IP:localhost:${PAP_PORT}
--v KAFKA_IP:localhost:${KAFKA_PORT}"
+-v KAFKA_IP:${KAFKA_IP}"
index 37bcff6..42be441 100644 (file)
@@ -80,7 +80,7 @@ TriggerAndVerifyTestPnfPolicy
     [Documentation]    Send TestPnf policy trigger event to Kafka and read notifications to verify policy execution
     [Arguments]    ${topic}
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForPnfPolicy.json
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}    ${KAFKA_IP}
     Run Keyword    CheckLogMessage    ${topic}    ACTIVE    VES event has been received. Going to fetch details from AAI.
     Run Keyword    CheckLogMessage    ${topic}    SUCCESS    Received response from AAI successfully. Hostname in AAI matches with the one in Ves event. Going to make the update-config request to CDS.
     Run Keyword    CheckLogMessage    ${topic}    FINAL_SUCCESS    Successfully processed the VES event. Hostname is updated.
@@ -89,7 +89,7 @@ TriggerAndVerifyTestVnfPolicy
     [Documentation]    Send TestVnf policy trigger event to Kafka and read notifications to verify policy execution
     [Arguments]    ${topic}
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForVnfPolicy.json
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}    ${KAFKA_IP}
     Run Keyword    CheckLogMessage    ${topic}    ACTIVE    VES event has been received. Going to fetch VNF details from AAI.
     Run Keyword    CheckLogMessage    ${topic}    SUCCESS    VNF details are received from AAI successfully. Sending ConfigModify request to CDS.
     Run Keyword    CheckLogMessage    ${topic}    SUCCESS    ConfigModify request is successful. Sending restart request to CDS.
index 833bb83..5377977 100644 (file)
@@ -28,7 +28,7 @@ ValidatePolicyExecutionAndEventRateLowComplexity
     GetKafkaTopic     apex-cl-mgt2
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForVnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  100
 
@@ -58,7 +58,7 @@ ValidatePolicyExecutionAndEventRateModerateComplexity
     GetKafkaTopic     apex-cl-mgt
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForPnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  10
 
index c37c1cd..048e2e7 100644 (file)
@@ -26,7 +26,7 @@ ValidatePolicyExecutionAndEventRateLowComplexity
     GetKafkaTopic     apex-cl-mgt
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForPnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  30
 
@@ -42,7 +42,7 @@ ValidatePolicyExecutionAndEventRateHighComplexity
     GetKafkaTopic     apex-cl-mgt2
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForVnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  0.6
 
index 4191bb2..69b2452 100644 (file)
@@ -26,7 +26,7 @@ ValidatePolicyExecutionAndEventRateLowComplexity
     GetKafkaTopic     apex-cl-mgt
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForPnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  10
 
@@ -53,7 +53,7 @@ ValidatePolicyExecutionAndEventRateHighComplexity
     GetKafkaTopic     apex-cl-mgt2
     ${data}=    Get Binary File     ${CURDIR}/data/VesEventForVnfPolicy.json
     ${eventStartTime}=  Get Current Date
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_policy_example_output    ${data}    ${KAFKA_IP}
     ${eventEndTime}=  Get Current Date
     ValidateEventExecution    ${eventStartTime}  ${eventEndTime}  0.2
 
index 8693be1..bc14089 100644 (file)
@@ -133,10 +133,10 @@ ValidateResponseTime
 
 CheckKafkaTopic
     [Arguments]    ${topic}    ${expected_status}
-    ${resp}=    Run Process    ${CURDIR}/kafka_consumer.py    ${topic}    60    ${expected_status}
+    ${resp}=    Run Process    ${CURDIR}/kafka_consumer.py    ${topic}    60    ${expected_status}    ${KAFKA_IP}
     Should Contain    ${resp.stdout}    ${expected_status}
     [Return]    ${resp.stdout}
 
 GetKafkaTopic
     [Arguments]    ${topic}
-    ${resp}=    Run Process    ${CURDIR}/make_topics.py    ${topic}
\ No newline at end of file
+    ${resp}=    Run Process    ${CURDIR}/make_topics.py    ${topic}    ${KAFKA_IP}
\ No newline at end of file
index f9ef5b0..3a7e3a3 100644 (file)
                 },
                 "httpMethod": "POST",
                 "path": "/onap/policy/clamp/acelement/v2/activate",
-                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.startertobridge\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"STARTER\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
                 "expectedResponse": 201
               }
             ]
                 },
                 "httpMethod": "POST",
                 "path": "/onap/policy/clamp/acelement/v2/activate",
-                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"message-router:3904\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.bridgetosink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"BRIDGE\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
                 "expectedResponse": 201
               }
             ]
                 },
                 "httpMethod": "POST",
                 "path": "/onap/policy/clamp/acelement/v2/activate",
-                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"message-router\", \"listenerTopic\": \"POLICY_UPDATE_MSG\", \"publisherTopic\": \"AC_ELEMENT_MSG\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"dmaap\" } }",
+                "body": "{ \"receiverId\": { \"name\": \"onap.policy.clamp.ac.sink\", \"version\": \"1.0.0\" }, \"timerMs\": 20000, \"elementType\": \"SINK\", \"topicParameterGroup\": { \"server\": \"kafka:9092\", \"listenerTopic\": \"policy_update_msg\", \"publisherTopic\": \"ac_element_msg\", \"fetchTimeout\": 15000, \"topicCommInfrastructure\": \"kafka\" } }",
                 "expectedResponse": 201
               }
             ]
index 94deb94..937ed6e 100644 (file)
@@ -1084,14 +1084,24 @@ topology_template:
           eventInputParameters:
             DmaapConsumer:
               carrierTechnologyParameters:
-                carrierTechnology: RESTCLIENT
-                parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
+                carrierTechnology: KAFKA
+                parameterClassName: org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters
                 parameters:
-                  url: http://message-router:3904/events/AC_ELEMENT_MSG/APEX/1?timeout=30000
+                  bootstrapServers: kafka:9092
+                  groupId: clamp-grp
+                  enableAutoCommit: true
+                  autoCommitTime: 1000
+                  sessionTimeout: 30000
+                  consumerPollTime: 100
+                  consumerTopicList:
+                    - ac_element_msg
+                  keyDeserializer: org.apache.kafka.common.serialization.StringDeserializer
+                  valueDeserializer: org.apache.kafka.common.serialization.StringDeserializer
+                  kafkaProperties: [ ]
               eventProtocolParameters:
-                eventProtocol: JSON
-                parameters:
-                  pojoField: DmaapResponseEvent
+                  eventProtocol: JSON
+                  parameters:
+                    pojoField: DmaapResponseEvent
               eventName: AcElementEvent
               eventNameFilter: AcElementEvent
           eventOutputParameters:
@@ -1104,14 +1114,23 @@ topology_template:
                 eventProtocol: JSON
             DmaapReplyProducer:
               carrierTechnologyParameters:
-                carrierTechnology: RESTCLIENT
-                parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
+                carrierTechnology: KAFKA
+                parameterClassName: org.onap.policy.apex.plugins.event.carrier.kafka.KafkaCarrierTechnologyParameters
                 parameters:
-                  url: http://message-router:3904/events/POLICY_UPDATE_MSG
+                  bootstrapServers: kafka:9092
+                  acks: all
+                  retries: 0
+                  batchSize: 16384
+                  lingerTime: 1
+                  bufferMemory: 33554432
+                  producerTopic: policy_update_msg
+                  keySerializer: org.apache.kafka.common.serialization.StringSerializer
+                  valueSerializer: org.apache.kafka.common.serialization.StringSerializer
+                  kafkaProperties: [ ]
               eventProtocolParameters:
-                eventProtocol: JSON
-                parameters:
-                  pojoField: DmaapResponseStatusEvent
-              eventNameFilter: (LogEvent|DmaapResponseStatusEvent)
+                  eventProtocol: JSON
+                  parameters:
+                    pojoField: DmaapResponseStatusEvent
+              eventNameFilter: LogEvent|DmaapResponseStatusEvent
         name: onap.policies.native.apex.ac.element
         version: 1.0.0
index 4049700..a43f142 100644 (file)
@@ -170,6 +170,6 @@ PerformPostRequest
 OnSet
     [Arguments]    ${file}
     ${data}=    Get File    ${file}
-    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}
+    ${resp}=    Run Process    ${CURDIR}/kafka_producer.py    unauthenticated.dcae_cl_output    ${data}    ${KAFKA_IP}
     Log    Response from kafka ${resp.stdout}
     [Return]    ${resp.stdout}
index 595e3db..fa173f4 100755 (executable)
@@ -27,9 +27,9 @@ import sys
 import time
 
 
-def consume_kafka_topic(topic, expected_values, timeout):
+def consume_kafka_topic(topic, expected_values, timeout, bootstrap_server):
     config = {
-            'bootstrap.servers': 'localhost:29092',
+            'bootstrap.servers': bootstrap_server,
             'group.id': 'testgrp',
             'auto.offset.reset': 'earliest'
     }
@@ -63,4 +63,5 @@ if __name__ == '__main__':
     topic_name = sys.argv[1]
     timeout = int(sys.argv[2])  # timeout in seconds for verifying the kafka topic
     expected_values = sys.argv[3]
-    consume_kafka_topic(topic_name, expected_values, timeout)
+    bootstrap_server = sys.argv[4]
+    consume_kafka_topic(topic_name, expected_values, timeout, bootstrap_server)
index e6f01c2..a7d4564 100755 (executable)
@@ -24,8 +24,8 @@
 from confluent_kafka import Producer
 import sys
 
-def post_to_kafka(topic, message):
-    conf = {'bootstrap.servers': 'localhost:29092'}
+def post_to_kafka(topic, message, bootstrap_server):
+    conf = {'bootstrap.servers': bootstrap_server}
 
     producer = Producer(conf)
     try:
@@ -38,4 +38,4 @@ def post_to_kafka(topic, message):
         producer.flush()
 
 if __name__ == '__main__':
-    post_to_kafka(sys.argv[1], sys.argv[2])
+    post_to_kafka(sys.argv[1], sys.argv[2], sys.argv[3])
index 64a230e..82b1dc3 100755 (executable)
@@ -36,6 +36,6 @@ def create_topic(bootstrap_servers, topic_name, num_partitions=2, replication_fa
 
 if __name__ == '__main__':
     topic_name = sys.argv[1]
-    bootstrap_servers = 'localhost:29092'
+    bootstrap_servers = sys.argv[2]
 
     create_topic(bootstrap_servers, topic_name)
index 10f9389..123249a 100644 (file)
@@ -85,6 +85,7 @@ DeployAutomationComposition
 QueryPolicies
      [Documentation]    Verify the new policies deployed
      ${auth}=    Create List    policyadmin    zb!XztG34
+     Sleep  10s
      Log    Creating session http://${POLICY_PAP_IP}
      ${session}=    Create Session      policy  http://${POLICY_PAP_IP}   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
@@ -97,7 +98,7 @@ QueryPolicies
 QueryPolicyTypes
      [Documentation]    Verify the new policy types created
      ${auth}=    Create List    policyadmin    zb!XztG34
-     sleep  10
+     Sleep  10s
      Log    Creating session http://${POLICY_API_IP}}:6969
      ${session}=    Create Session      policy  http://${POLICY_API_IP}   auth=${auth}
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
index 5a3ac3b..04f0a83 100755 (executable)
@@ -46,6 +46,9 @@ POLICY_DISTRIBUTION_CONTAINER="policy-distribution"
 POLICY_K8S_PPNT_CONTAINER="policy-clamp-ac-k8s-ppnt"
 POLICY_HTTP_PPNT_CONTAINER="policy-clamp-ac-http-ppnt"
 POLICY_PF_PPNT_CONTAINER="policy-clamp-ac-pf-ppnt"
+KAFKA_CONTAINER="kafka-deployment"
+ZK_CONTAINER="zookeeper-deployment"
+KAFKA_DIR=${WORKSPACE}/helm/cp-kafka
 SET_VALUES=""
 
 DISTRIBUTION_CSAR=${WORKSPACE}/csit/resources/tests/data/csar
@@ -56,6 +59,7 @@ export ROBOT_FILE=""
 export ROBOT_LOG_DIR=${WORKSPACE}/csit/archives
 export READINESS_CONTAINERS=()
 
+
 function spin_microk8s_cluster() {
     echo "Verify if Microk8s cluster is running.."
     microk8s version
@@ -88,11 +92,19 @@ function spin_microk8s_cluster() {
 
 }
 
+function install_kafka() {
+  echo "Installing Confluent kafka"
+  kubectl apply -f $KAFKA_DIR/zookeeper.yaml
+  kubectl apply -f $KAFKA_DIR/kafka.yaml
+  echo "----------------------------------------"
+}
+
 function uninstall_policy() {
     echo "Removing the policy helm deployment"
     sudo microk8s helm uninstall csit-policy
     sudo microk8s helm uninstall prometheus
     sudo microk8s helm uninstall csit-robot
+    sudo kubectl delete deploy $ZK_CONTAINER $KAFKA_CONTAINER
     rm -rf ${WORKSPACE}/helm/policy/Chart.lock
     if [ "$PROJECT" == "clamp" ] || [ "$PROJECT" == "policy-clamp" ]; then
       sudo microk8s helm uninstall policy-chartmuseum
@@ -349,6 +361,9 @@ fi
 if [ $OPERATION == "install" ]; then
     spin_microk8s_cluster
     if [ "${?}" -eq 0 ]; then
+        export KAFKA_CONTAINERS=($KAFKA_CONTAINER,$ZK_CONTAINER)
+        install_kafka
+        wait_for_pods_running default 300 $KAFKA_CONTAINERS
         set_project_config
         echo "Installing policy helm charts in the default namespace"
         source ${WORKSPACE}/compose/get-k8s-versions.sh
diff --git a/helm/cp-kafka/kafka.yaml b/helm/cp-kafka/kafka.yaml
new file mode 100644 (file)
index 0000000..cc4677d
--- /dev/null
@@ -0,0 +1,64 @@
+# Copyright © 2024 Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: kafka-deployment
+  labels:
+    app: kafka
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: kafka
+  template:
+    metadata:
+      labels:
+        app: kafka
+    spec:
+      containers:
+      - name: broker
+        image: confluentinc/cp-kafka:latest
+        ports:
+        - containerPort: 9092
+        command: ["bash", "-c", "unset KAFKA_PORT; /etc/confluent/docker/run"]
+        env:
+        - name: KAFKA_BROKER_ID
+          value: "1"
+        - name: KAFKA_ZOOKEEPER_CONNECT
+          value: 'zookeeper-service:2181'
+        - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
+          value: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
+        - name: KAFKA_ADVERTISED_LISTENERS
+          value: PLAINTEXT://:29092,PLAINTEXT_INTERNAL://kafka:9092
+        - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
+          value: "1"
+        - name: KAFKA_TRANSACTION_STATE_LOG_MIN_ISR
+          value: "1"
+        - name: KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR
+          value: "1"
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: kafka
+spec:
+  selector:
+    app: kafka
+  ports:
+    - protocol: TCP
+      port: 9092
+      targetPort: 9092
+
diff --git a/helm/cp-kafka/zookeeper.yaml b/helm/cp-kafka/zookeeper.yaml
new file mode 100644 (file)
index 0000000..707e507
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright © 2024 Nordix Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: zookeeper-deployment
+  labels:
+    app: zookeeper
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: zookeeper
+  template:
+    metadata:
+      labels:
+        app: zookeeper
+    spec:
+      containers:
+      - name: zookeeper
+        image: confluentinc/cp-zookeeper:latest
+        ports:
+        - containerPort: 2181
+        env:
+        - name: ZOOKEEPER_CLIENT_PORT
+          value: "2181"
+        - name: ZOOKEEPER_TICK_TIME
+          value: "2000"
+
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: zookeeper-service
+spec:
+  selector:
+    app: zookeeper
+  ports:
+    - protocol: TCP
+      port: 2181
+      targetPort: 2181
index e70cb3f..5365584 100755 (executable)
@@ -10,7 +10,7 @@
   },
   "pdpStatusParameters": {
     "pdpGroup": "defaultGroup",
-    "timeIntervalMs": 120000,
+    "timeIntervalMs": 20000,
     "pdpType": "apex",
     "description": "Pdp Heartbeat",
     "supportedPolicyTypes": [
   "topicParameterGroup": {
     "topicSources": [
       {
-        "topic": "POLICY-PDP-PAP",
+        "topic": "policy-pdp-pap",
         "servers": [
-          "message-router"
+          "{{ .Values.global.kafkaServer }}:9092"
         ],
         "useHttps": false,
-        "topicCommInfrastructure": "dmaap"
+        "topicCommInfrastructure": "kafka",
+        "fetchTimeout": 15000
       }
     ],
     "topicSinks": [
       {
-        "topic": "POLICY-PDP-PAP",
+        "topic": "policy-pdp-pap",
         "servers": [
-          "message-router"
+          "{{ .Values.global.kafkaServer }}:9092"
         ],
         "useHttps": false,
-        "topicCommInfrastructure": "dmaap"
+        "topicCommInfrastructure": "kafka"
       }
     ]
   }
index 6044304..4e4fffa 100755 (executable)
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: RELEASE
-    heritage: Helm
-type: Opaque
-stringData:
-  sasl.jaas.config: "MobnDove6!Qibh"
-
----
 
 apiVersion: v1
 kind: Secret
index 1d939c5..305d1c8 100755 (executable)
@@ -57,13 +57,7 @@ spec:
             secretKeyRef:
               name: {{ .Chart.Name }}-restserver-creds
               key: password
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-{{- end }}
+
         volumeMounts:
         - mountPath: /config-input
           name: apexconfig-input
index ae6ae1d..add48dc 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#   Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
@@ -96,26 +96,3 @@ serviceAccount:
   nameOverride: policy-apex-pdp
   roles:
     - read
-
-# application configuration
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      policyPdpPapTopic: policy-pdp-pap
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
index 8d98d86..17a8118 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -45,16 +45,16 @@ participant:
     participantId: 101c62b3-8918-41b9-a747-d21eb79c6c00
     clampAutomationCompositionTopics:
       topicSources:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           fetchTimeout: 15000
       topicSinks:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
     participantSupportedElementTypes:
       -
         typeName: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement
index 61b3211..e68d655 100755 (executable)
@@ -63,14 +63,6 @@ spec:
               name: {{ .Chart.Name }}-restserver-secret
               key: password
 
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-
-{{- end }}
         volumeMounts:
         - mountPath: /config-input
           name: ac-a1pms-ppnt-config
index d9ab84c..013c47b 100755 (executable)
@@ -31,18 +31,3 @@ type: Opaque
 stringData:
   login: {{ .Values.restServer.user }}
   password: {{ .Values.restServer.password }}
-
----
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    heritage: Helm
-type: Opaque
-stringData:
-    sasl.jaas.config: {{ .Values.config.jaas }}
index 21f4134..b700dd0 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2023 Nordix Foundation.
+#  Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -78,29 +78,3 @@ serviceAccount:
   nameOverride: policy-clamp-ac-a1pms-ppnt
   roles:
     - create
-
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy-acruntime-participant
-  jaas: KuldHochQipa7,
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
index a228e97..a0cf283 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation.
+#   Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -26,18 +26,6 @@ spring:
     user:
       name: ${RESTSERVER_USER}
       password: ${RESTSERVER_PASSWORD}
-{{- if .Values.config.useStrimziKafka }}
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-    bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 security:
   enable-csrf: false
@@ -49,45 +37,22 @@ participant:
     participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01
     clampAutomationCompositionTopics:
       topicSources:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
       topicSinks:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           useHttps: false
     participantSupportedElementTypes:
       -
         typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
         typeVersion: 1.0.0
-# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below
-#    clampAutomationCompositionTopics:
-#      topicSources:
-#        - topic: policy-acruntime-participant
-#          servers:
-#            - {{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          fetchTimeout: 15000
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-#      topicSinks:
-#        - topic: policy-acruntime-participant
-#          servers:
-#            - {{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
 
 management:
   endpoints:
index c8aadc8..ecdaa03 100644 (file)
@@ -60,13 +60,7 @@ spec:
             secretKeyRef:
               name: {{ .Chart.Name }}-restserver-secret
               key: password
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-{{- end }}
+
         volumeMounts:
         - mountPath: /config-input
           name: ac-http-ppnt-config
index 620849c..53d27e7 100644 (file)
 # limitations under the License.
 */}}
 
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: release
-    heritage: Helm
-type: Opaque
-stringData:
-  sasl.jaas.config: "Tokm6*DaheWaro"
-
----
 apiVersion: v1
 kind: Secret
 metadata:
index 87ca885..a4f05ea 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation.
+#   Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -88,28 +88,3 @@ serviceAccount:
   roles:
     - read
 
-config:
-  # Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy-acruntime-participant
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
-
index 5b05998..b8e210a 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2022 Nordix Foundation.
+#   Copyright (C) 2022,2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -26,18 +26,6 @@ spring:
     user:
       name: ${RESTSERVER_USER}
       password: ${RESTSERVER_PASSWORD}
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-{{- if .Values.config.useStrimziKafka }}
-    bootstrap-servers: release-{{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 security:
   enable-csrf: false
@@ -52,50 +40,24 @@ participant:
     clampAutomationCompositionTopics:
       topicSources:
         -
-          topic: POLICY-ACRUNTIME-PARTICIPANT
+          topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
       topicSinks:
         -
-          topic: POLICY-ACRUNTIME-PARTICIPANT
+          topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           useHttps: false
     participantSupportedElementTypes:
       -
         typeName: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
         typeVersion: 1.0.0
 
-# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below
-#    clampAutomationCompositionTopics:
-#      topicSources:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - release-{{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          fetchTimeout: 15000
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-#      topicSinks:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - release-{{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-
 management:
   endpoints:
     web:
index c934722..fa90535 100644 (file)
@@ -63,14 +63,7 @@ spec:
               name: {{ .Chart.Name }}-restserver-secret
               key: password
 
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
 
-{{- end }}
         volumeMounts:
         - mountPath: /config-input
           name: ac-k8s-ppnt-config
index a25390f..65e0171 100644 (file)
@@ -32,17 +32,4 @@ stringData:
   login: {{ .Values.restServer.user }}
   password: {{ .Values.restServer.password }}
 
----
 
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    heritage: Helm
-type: Opaque
-stringData:
-    sasl.jaas.config: {{ .Values.config.jaas }}
index d6d4a03..934b1bb 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2022 Nordix Foundation.
+#  Copyright (C) 2022,2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -98,29 +98,3 @@ repoList:
     protocols:
       - http
       - https
-
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy-acruntime-participant
-  jaas: KuldHochQipa7,
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
index 2585268..51eab74 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#  Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -33,18 +33,6 @@ spring:
       - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
       - io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration
       - io.kubernetes.client.spring.extended.network.config.KubernetesLoadBalancerAutoConfiguration
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-{{- if .Values.config.useStrimziKafka }}
-    bootstrap-servers: release-{{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 security:
   enable-csrf: false
@@ -56,47 +44,21 @@ participant:
     participantId: 101c62b3-8918-41b9-a747-d21eb79c6c04
     clampAutomationCompositionTopics:
       topicSources:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           fetchTimeout: 15000
       topicSinks:
-        - topic: POLICY-ACRUNTIME-PARTICIPANT
+        - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
     participantSupportedElementTypes:
       -
         typeName: org.onap.policy.clamp.acm.KserveAutomationCompositionElement
         typeVersion: 1.0.1
 
-# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below
-#    clampAutomationCompositionTopics:
-#      topicSources:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - release-{{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          fetchTimeout: 15000
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-#      topicSinks:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - release-{{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          useHttps: true
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-
 customresourcedefinition:
   group: serving.kserve.io
   version: v1beta1
index 969ac92..60d5032 100755 (executable)
@@ -63,14 +63,6 @@ spec:
               name: {{ .Chart.Name }}-restserver-secret
               key: password
 
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-
-{{- end }}
         volumeMounts:
         - mountPath: /config-input
           name: ac-kserve-ppnt-config
index d9ab84c..e410e1c 100755 (executable)
@@ -32,17 +32,3 @@ stringData:
   login: {{ .Values.restServer.user }}
   password: {{ .Values.restServer.password }}
 
----
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    heritage: Helm
-type: Opaque
-stringData:
-    sasl.jaas.config: {{ .Values.config.jaas }}
index eb4dfcf..444c5bf 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#  Copyright (C) 2023 Nordix Foundation.
+#  Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -78,29 +78,3 @@ serviceAccount:
   nameOverride: policy-clamp-ac-kserve-ppnt
   roles:
     - create
-
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy-acruntime-participant
-  jaas: KuldHochQipa7,
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
index 713105b..7d5b50d 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation.
+#   Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -26,18 +26,6 @@ spring:
     user:
       name: ${RESTSERVER_USER}
       password: ${RESTSERVER_PASSWORD}
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-{{- if .Values.config.useStrimziKafka }}
-    bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 security:
   enable-csrf: false
@@ -68,50 +56,24 @@ participant:
     clampAutomationCompositionTopics:
       topicSources:
         -
-          topic: POLICY-ACRUNTIME-PARTICIPANT
+          topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
       topicSinks:
         -
-          topic: POLICY-ACRUNTIME-PARTICIPANT
+          topic: policy-acruntime-participant
           servers:
-            - ${topicServer:message-router}
-          topicCommInfrastructure: dmaap
+            - {{ .Values.global.kafkaServer }}:9092
+          topicCommInfrastructure: kafka
           useHttps: false
     participantSupportedElementTypes:
       -
         typeName: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
         typeVersion: 1.0.0
 
-# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below
-#    clampAutomationCompositionTopics:
-#      topicSources:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - {{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          fetchTimeout: 15000
-#          useHttps: false
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-#      topicSinks:
-#        -
-#          topic: policy-acruntime-participant
-#          servers:
-#            - {{ .Values.config.kafkaBootstrap }}:9092
-#          topicCommInfrastructure: kafka
-#          useHttps: false
-#          additionalProps:
-#            security.protocol: SASL_PLAINTEXT
-#            sasl.mechanism: SCRAM-SHA-512
-#            sasl.jaas.config: ${JAASLOGIN}
-
 management:
   endpoints:
     web:
index 0924d44..bcb3dae 100644 (file)
@@ -80,13 +80,7 @@ spec:
             secretKeyRef:
               name: {{ .Chart.Name }}-restserver-secret
               key: password
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-{{- end }}
+
         volumeMounts:
         - mountPath: /config-input
           name: ac-pf-ppnt-config
index 36cd762..76d25a7 100644 (file)
@@ -48,22 +48,6 @@ stringData:
 
 ---
 
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: RELEASE
-    heritage: Helm
-type: Opaque
-stringData:
-  sasl.jaas.config: "HuveRotkMosl5!"
-
----
-
 apiVersion: v1
 kind: Secret
 metadata:
index bb7be33..af38e9c 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation.
+#   Copyright (C) 2023-2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -94,27 +94,3 @@ serviceAccount:
   roles:
     - read
 
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy-acruntime-participant
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
index dd21c64..0858af3 100755 (executable)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2022 Nordix Foundation.
+#   Copyright (C) 2022,2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -44,18 +44,6 @@ spring:
       hibernate:
         dialect: org.hibernate.dialect.MariaDB103Dialect
         format_sql: true
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-{{- if .Values.config.useStrimziKafka }}
-    bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 security:
   enable-csrf: false
@@ -80,48 +68,24 @@ runtime:
   topicParameterGroup:
     topicSources:
       -
-        topic: POLICY-ACRUNTIME-PARTICIPANT
+        topic: policy-acruntime-participant
         servers:
-          - ${topicServer:message-router}
-        topicCommInfrastructure: dmaap
+          - {{ .Values.global.kafkaServer }}:9092
+        topicCommInfrastructure: kafka
         useHttps: false
         fetchTimeout: 15000
     topicSinks:
       -
-        topic: POLICY-ACRUNTIME-PARTICIPANT
+        topic: policy-acruntime-participant
         servers:
-          - ${topicServer:message-router}
-        topicCommInfrastructure: dmaap
+          - {{ .Values.global.kafkaServer }}:9092
+        topicCommInfrastructure: kafka
         useHttps: false
   acmParameters:
     toscaElementName: {{ .Values.customNaming.toscaElementName }}
     toscaCompositionName: {{ .Values.customNaming.toscaCompositionName }}
 
-# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below
-#  topicParameterGroup:
-#    topicSources:
-#      -
-#        topic: policy-acruntime-participant
-#        servers:
-#          - {{ .Values.config.kafkaBootstrap }}:9092
-#        topicCommInfrastructure: kafka
-#        useHttps: true
-#        fetchTimeout: 15000
-#        additionalProps:
-#          security.protocol: SASL_PLAINTEXT
-#          sasl.mechanism: SCRAM-SHA-512
-#          sasl.jaas.config: ${JAASLOGIN}
-#    topicSinks:
-#      -
-#        topic: policy-acruntime-participant
-#        servers:
-#          - {{ .Values.config.kafkaBootstrap }}:9092
-#        topicCommInfrastructure: kafka
-#        useHttps: true
-#        additionalProps:
-#          security.protocol: SASL_PLAINTEXT
-#          sasl.mechanism: SCRAM-SHA-512
-#          sasl.jaas.config: ${JAASLOGIN}
+
 
 management:
   endpoints:
index bafe019..b1253a4 100644 (file)
@@ -82,14 +82,6 @@ spec:
               name: {{ .Chart.Name }}-runtime-secret
               key: password
 
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-
-{{- end }}
         volumeMounts:
         - mountPath: /config-input
           name: ac-runtime-config
index f761acd..494189c 100644 (file)
@@ -48,17 +48,3 @@ stringData:
   login: {{ .Values.db.user }}
   password: {{ .Values.db.password }}
 
----
-
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    heritage: Helm
-type: Opaque
-stringData:
-    sasl.jaas.config: {{ .Values.config.jaas }}
index 4966a9b..c447382 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2022 Nordix Foundation.
+#   Copyright (C) 2022,2024 Nordix Foundation.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -30,31 +30,6 @@ debugEnabled: false
 config:
   policyAppUserName: runtimeUser
   policyAppUserPassword: zb!XztG34
-  jaas: JuzgCumoDahj9*
-
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      acRuntimeTopic: policy.policy-acruntime-participant
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
 
 db:
   user: policy-user
index 93ae32a..c004c6f 100755 (executable)
@@ -1,5 +1,5 @@
 {{/*
-# Copyright © 2023 Nordix Foundation.
+# Copyright © 2023-2024 Nordix Foundation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -60,15 +60,15 @@ PROMETHEUS=true
 
 # PDP-D DMaaP configuration channel
 
-PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION
-PDPD_CONFIGURATION_SERVERS=message-router
+PDPD_CONFIGURATION_TOPIC=pdpd-configuration
+PDPD_CONFIGURATION_SERVERS={{ .Values.global.kafkaServer }}:9092
 PDPD_CONFIGURATION_CONSUMER_GROUP=
 PDPD_CONFIGURATION_CONSUMER_INSTANCE=
 PDPD_CONFIGURATION_PARTITION_KEY=
 
 # PAP-PDP configuration channel
 
-POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP
+POLICY_PDP_PAP_TOPIC=policy-pdp-pap
 POLICY_PDP_PAP_GROUP=defaultGroup
 POLICY_PDP_PAP_POLICYTYPES=onap.policies.controlloop.operational.common.Drools
 
@@ -89,15 +89,10 @@ GUARD_DISABLED=false
 
 # DCAE DMaaP
 
-DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT
-DCAE_SERVERS=message-router
+DCAE_TOPIC=unauthenticated.dcae_cl_output
+DCAE_SERVERS={{ .Values.global.kafkaServer }}:9092
 DCAE_CONSUMER_GROUP=dcae.policy.shared
 
-# Open DMaaP
-
-DMAAP_SERVERS=message-router
-DMAAP_HTTPS="false"
-
 # AAI
 
 AAI_HOST=aai.{{.Release.Namespace}}
@@ -1,5 +1,5 @@
 {{/*
-# Copyright 2023 Nordix Foundation. All rights reserved.
+# Copyright 2023-2024 Nordix Foundation. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,4 +14,4 @@
 # limitations under the License.
 */}}
 
-POOLING_TOPIC=POOLING
+POOLING_TOPIC=pooling
index acccc8a..0a74f6f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash -x
 # ============LICENSE_START=======================================================
-# Copyright (C) 2023 Nordix Foundation. All rights reserved.
+# Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -15,8 +15,5 @@
 # limitations under the License.
 # ============LICENSE_END=========================================================
 
-sed -i "s/^dmaap/noop/g" \
-    ${POLICY_HOME}/config/engine.properties \
-    ${POLICY_HOME}/config/feature-lifecycle.properties
 
 chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties
index 0aeaa8b..721540d 100755 (executable)
@@ -24,11 +24,11 @@ TELEMETRY_PASSWORD={{.Values.telemetry.password}}
 REPOSITORY_USERNAME={{.Values.nexus.user}}
 REPOSITORY_PASSWORD={{.Values.nexus.password}}
 
-PDPD_CONFIGURATION_API_KEY={{.Values.dmaap.brmsgw.key}}
-PDPD_CONFIGURATION_API_SECRET={{.Values.dmaap.brmsgw.secret}}
+PDPD_CONFIGURATION_API_KEY=
+PDPD_CONFIGURATION_API_SECRET=
 
-POLICY_PDP_PAP_API_KEY={{.Values.dmaap.pap.key}}
-POLICY_PDP_PAP_API_SECRET={{.Values.dmaap.pap.secret}}
+POLICY_PDP_PAP_API_KEY=
+POLICY_PDP_PAP_API_SECRET=
 
 PAP_USERNAME={{.Values.pap.user}}
 PAP_PASSWORD={{.Values.pap.password}}
index 2774c67..de14c4b 100644 (file)
@@ -104,9 +104,9 @@ spec:
             - mountPath: /tmp/policy-install/config/engine-system.properties
               name: drools-config
               subPath: engine-system.properties
-            - mountPath: /tmp/policy-install/config/feature-pooling-dmaap.conf
+            - mountPath: /tmp/policy-install/config/feature-pooling-kafka.conf
               name: drools-config
-              subPath: feature-pooling-dmaap.conf
+              subPath: feature-pooling-kafka.conf
             - mountPath: /tmp/policy-install/config/logback.xml
               name: drools-config
               subPath: logback.xml
@@ -133,8 +133,8 @@ spec:
               - key: engine-system.properties
                 path: engine-system.properties
                 mode: 0755
-              - key: feature-pooling-dmaap.conf
-                path: feature-pooling-dmaap.conf
+              - key: feature-pooling-kafka.conf
+                path: feature-pooling-kafka.conf
                 mode: 0755
               - key: logback.xml
                 path: logback.xml
index dd2ce0c..ca49da5 100644 (file)
@@ -138,14 +138,6 @@ sdnc:
   user: admin
   password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
 
-dmaap:
-  brmsgw:
-    key:
-    password:
-  pap:
-    key:
-    password:
-
 cds:
   grpc:
     user: ccsdkapps
index 41fc905..1f4b274 100644 (file)
@@ -1,16 +1,6 @@
 {
-    "dmaapProvider": {
-        "name": "DMaaP simulator",
-        "topicSweepSec": 300
-    },
     "restServers": [
-        {
-            "name": "DMaaP simulator",
-            "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1",
-            "host": "0.0.0.0",
-            "port": 3904,
-            "https": false
-        },
+
         {
             "name": "A&AI simulator",
             "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs",
             "https": false
         }
     ],
-    "topicSinks": [
-        {
-            "topic": "APPC-CL",
-            "servers": ["${HOST_NAME}"],
-            "topicCommInfrastructure": "DMAAP",
-            "useHttps": false,
-            "apiKey": "some-key",
-            "apiSecret": "some-secret"
-        },
-        {
-            "topic": "APPC-LCM-WRITE",
-            "servers": ["${HOST_NAME}"],
-            "topicCommInfrastructure": "DMAAP",
-            "useHttps": false,
-            "apiKey": "some-key",
-            "apiSecret": "some-secret"
-        }
-    ],
-    "topicSources": [
-        {
-            "topic": "APPC-CL",
-            "servers": ["${HOST_NAME}"],
-            "topicCommInfrastructure": "DMAAP",
-            "useHttps": false,
-            "apiKey": "some-key",
-            "apiSecret": "some-secret"
-        },
-        {
-            "topic": "APPC-LCM-READ",
-            "servers": ["${HOST_NAME}"],
-            "topicCommInfrastructure": "DMAAP",
-            "useHttps": false,
-            "apiKey": "some-key",
-            "apiSecret": "some-secret"
-        }
-    ],
-    "topicServers": [
-        {
-            "name": "APPC Legacy simulator",
-            "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer",
-            "sink": "APPC-CL",
-            "source": "APPC-CL"
-        },
-        {
-            "name": "APPC-LCM simulator",
-            "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer",
-            "sink": "APPC-LCM-WRITE",
-            "source": "APPC-LCM-READ"
-        }
-    ],
+
     "grpcServer": {
         "name": "CDS simulator",
         "providerClass": "org.onap.policy.simulators.CdsSimulator",
index 367a7d8..e35fe57 100644 (file)
@@ -45,9 +45,9 @@ readiness:
 service:
   type: ClusterIP
   name: message-router
-  portName: message-router
-  externalPort: 3904
-  internalPort: 3904
+  portName: simulator
+  externalPort: 6666
+  internalPort: 6666
   simulators:
     aai:
       name: aai-sim
index 411061b..83743e6 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#   Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -40,18 +40,6 @@ spring:
       naming:
         physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
         implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
-  kafka:
-    consumer:
-      group-id: {{ .Values.config.kafka.consumer.groupId }}
-{{- if .Values.config.useStrimziKafka }}
-    bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092
-    security.protocol: SASL_PLAINTEXT
-    properties.sasl:
-      mechanism: SCRAM-SHA-512
-      jaas.config: ${JAASLOGIN}
-{{ else }}
-{{ toYaml .Values.config.eventConsumption | nindent 2 }}
-{{- end }}
 
 server:
   port: 6969
@@ -64,9 +52,9 @@ pap:
   name: PapGroup
   aaf: false
   topic:
-    pdp-pap.name: POLICY-PDP-PAP
-    notification.name: POLICY-NOTIFICATION
-    heartbeat.name: POLICY-HEARTBEAT
+    pdp-pap.name: policy-pdp-pap
+    notification.name: policy-notification
+    heartbeat.name: policy-heartbeat
   pdpParameters:
     heartBeatMs: 120000
     updateParameters:
@@ -80,28 +68,28 @@ pap:
     topicSources:
     - topic: ${pap.topic.pdp-pap.name}
       servers:
-      - message-router
-      topicCommInfrastructure: dmaap
+      - {{ .Values.global.kafkaServer }}:9092
+      topicCommInfrastructure: kafka
       useHttps: false
       fetchTimeout: 15000
     - topic: ${pap.topic.heartbeat.name}
       effectiveTopic: ${pap.topic.pdp-pap.name}
       consumerGroup: policy-pap
       servers:
-      - message-router
-      topicCommInfrastructure: dmaap
+      - {{ .Values.global.kafkaServer }}:9092
+      topicCommInfrastructure: kafka
       useHttps: false
       fetchTimeout: 15000
     topicSinks:
     - topic: ${pap.topic.pdp-pap.name}
       servers:
-      - message-router
-      topicCommInfrastructure: dmaap
+      - {{ .Values.global.kafkaServer }}:9092
+      topicCommInfrastructure: kafka
       useHttps: false
     - topic: ${pap.topic.notification.name}
       servers:
-      - message-router
-      topicCommInfrastructure: dmaap
+      - {{ .Values.global.kafkaServer }}:9092
+      topicCommInfrastructure: kafka
       useHttps: false
   healthCheckRestClientParameters:
   - clientName: api
index 91158a5..ad7c632 100755 (executable)
@@ -104,13 +104,7 @@ spec:
             secretKeyRef:
               name: {{ .Chart.Name }}-distribution-secret
               key: password
-{{- if .Values.config.useStrimziKafka }}
-        - name: JAASLOGIN
-          valueFrom:
-            secretKeyRef:
-              name: {{ .Chart.Name }}-policy-kafka-user
-              key: sasl.jaas.config
-{{- end }}
+
         volumeMounts:
         - mountPath: /config-input
           name: papconfig
index 7958a11..ff96d99 100755 (executable)
@@ -65,22 +65,6 @@ stringData:
 
 ---
 
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Chart.Name }}-policy-kafka-user
-  namespace: default
-  labels:
-    app: {{ .Chart.Name }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: RELEASE
-    heritage: Helm
-type: Opaque
-stringData:
-  sasl.jaas.config: "Zule4]TateGila"
-
----
-
 apiVersion: v1
 kind: Secret
 metadata:
index df8f108..5efc0b0 100755 (executable)
@@ -108,25 +108,3 @@ serviceAccount:
   roles:
     - read
 
-# application configuration
-config:
-# Event consumption (kafka) properties
-  useStrimziKafka: true
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  kafka:
-    consumer:
-      groupId: policy-group
-  app:
-    listener:
-      policyPdpPapTopic: policy-pdp-pap
-# If targeting a custom kafka cluster, ie useStrimziKakfa: false
-# uncomment below config and target your kafka bootstrap servers,
-# along with any other security config.
-#
-# eventConsumption:
-#   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
-#   spring.kafka.security.protocol: PLAINTEXT
-#   spring.kafka.consumer.group-id: policy-group
-#
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
index af0970c..a5da890 100755 (executable)
     },
     "topicParameterGroup": {
         "topicSources" : [{
-            "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "message-router" ],
+            "topic" : "policy-pdp-pap",
+            "servers" : [ "{{ .Values.global.kafkaServer }}:9092" ],
             "useHttps" : false,
             "fetchTimeout" : 15000,
-            "topicCommInfrastructure" : "dmaap"
+            "topicCommInfrastructure" : "kafka"
         }],
         "topicSinks" : [{
-            "topic" : "POLICY-PDP-PAP",
-            "servers" : [ "message-router" ],
+            "topic" : "policy-pdp-pap",
+            "servers" : [ "{{ .Values.global.kafkaServer }}:9092" ],
             "useHttps" : false,
-            "topicCommInfrastructure" : "dmaap"
+            "topicCommInfrastructure" : "kafka"
         }]
     }
 }
index 5bf9d09..4766256 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START=======================================================
-#   Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#   Copyright (C) 2023-2024 Nordix Foundation. All rights reserved.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
index f4d7212..c48e71b 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright © 2022-2023 Nordix Foundation
+# Copyright © 2022-2024 Nordix Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -27,9 +27,7 @@ global:
       name: &mariadb-galera mariadb-galera
       internalPort: 3306
   prometheusEnabled: false
-  kafkaBootstrap: strimzi-kafka-bootstrap
-  policyKafkaUser: policy-kafka-user
-
+  kafkaServer: kafka
   repository: nexus3.onap.org:10001
   pullPolicy: IfNotPresent
   dockerRepository: docker.io
@@ -89,7 +87,7 @@ mariadb:
   image: mariadb:10.5.8
 
 dbmigrator:
-  image: onap/policy-db-migrator:3.0.1-SNAPSHOT
+  image: onap/policy-db-migrator:3.1.1-SNAPSHOT
   schema: policyadmin
   policy_home: "/opt/app/policy"