Fix Clamp CSITs helm charts 74/142574/1
authorFrancescoFioraEst <francesco.fiora@est.tech>
Fri, 21 Nov 2025 14:08:44 +0000 (14:08 +0000)
committerFrancesco Fiora <francesco.fiora@est.tech>
Fri, 28 Nov 2025 08:34:04 +0000 (08:34 +0000)
Fix Clamp CSITs helm charts.
Removing duplication of SimulatorParticipantParameters.yaml file
using env parameters.

Issue-ID: POLICY-5514
Change-Id: I0999856044b796b32a2fe97b4f4ab6bdfbf44164
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
14 files changed:
compose/compose.common.yml
compose/config/clamp/SimulatorParticipant2Parameters.yaml [deleted file]
compose/config/clamp/SimulatorParticipant3Parameters.yaml [deleted file]
compose/config/clamp/SimulatorParticipantParameters.yaml
csit/resources/scripts/config_setup.sh
csit/resources/tests/clamp-common.robot
csit/resources/tests/clamp-db-restore.robot
csit/resources/tests/data/script/execute-queryk8.sh [new file with mode: 0755]
helm/policy/Chart.yaml
helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml
helm/policy/components/policy-clamp-ac-sim-ppnt/values.yaml
helm/policy/values.yaml
helm/robot/templates/test-job.yaml
helm/robot/values.yaml

index 8836f86..1a7b5f9 100644 (file)
@@ -54,6 +54,10 @@ services:
       OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
       OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
       SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
+      applicationName: sim-ppnt-1
+      groupId: policy-clamp-ac-sim-ppnt-1
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
       JAVA_TOOL_OPTIONS: >-
         -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml"
         -Dotel.java.global-autoconfigure.enabled=true
@@ -83,6 +87,10 @@ services:
       OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
       OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
       SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c91
+      applicationName: sim-ppnt-2
+      groupId: policy-clamp-ac-sim-ppnt-2
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
       JAVA_TOOL_OPTIONS: >-
         -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml"
         -Dotel.java.global-autoconfigure.enabled=true
@@ -90,7 +98,7 @@ services:
     ports:
       - ${SIM_PARTICIPANT2_PORT}:6969
     volumes:
-      - ./config/clamp/SimulatorParticipant2Parameters.yaml:/opt/app/policy/clamp/etc/SimulatorParticipantParameters.yaml:ro
+      - ./config/clamp/SimulatorParticipantParameters.yaml:/opt/app/policy/clamp/etc/SimulatorParticipantParameters.yaml:ro
       - ./config/clamp/logback-ppnt.xml:/opt/app/policy/clamp/etc/logback.xml:ro
       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
     entrypoint: /opt/app/policy/bin/wait_for_port.sh
@@ -112,6 +120,10 @@ services:
       OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf
       OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
       SPRING_PROFILES_ACTIVE: ${PPNT_PROFILE:-default}
+      participantId: 101c62b3-8918-41b9-a747-d21eb79c6c92
+      applicationName: sim-ppnt-3
+      groupId: policy-clamp-ac-sim-ppnt-3
+      supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement3
       JAVA_TOOL_OPTIONS: >-
         -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml"
         -Dotel.java.global-autoconfigure.enabled=true
@@ -119,7 +131,7 @@ services:
     ports:
       - ${SIM_PARTICIPANT3_PORT}:6969
     volumes:
-      - ./config/clamp/SimulatorParticipant3Parameters.yaml:/opt/app/policy/clamp/etc/SimulatorParticipantParameters.yaml:ro
+      - ./config/clamp/SimulatorParticipantParameters.yaml:/opt/app/policy/clamp/etc/SimulatorParticipantParameters.yaml:ro
       - ./config/clamp/logback-ppnt.xml:/opt/app/policy/clamp/etc/logback.xml:ro
       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
     entrypoint: /opt/app/policy/bin/wait_for_port.sh
diff --git a/compose/config/clamp/SimulatorParticipant2Parameters.yaml b/compose/config/clamp/SimulatorParticipant2Parameters.yaml
deleted file mode 100644 (file)
index d286027..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-spring:
-  application:
-    name: sim-ppnt-2
-  security:
-    user:
-      name: participantUser
-      password: zb!XztG34
-  autoconfigure:
-    exclude:
-      - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-      - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
-
-security:
-  enable-csrf: false
-participant:
-  intermediaryParameters:
-    reportingTimeIntervalMs: 120000
-    description: Participant Description
-    participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c91}
-    topics:
-      operationTopic: policy-acruntime-participant
-      syncTopic: acm-ppnt-sync
-    clampAutomationCompositionTopics:
-      topicSources:
-        - topic: ${participant.intermediaryParameters.topics.operationTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-          allowTracing: true
-          additionalProps:
-            group.id: policy-clamp-ac-sim-ppnt-2
-        - topic: ${participant.intermediaryParameters.topics.syncTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-          allowTracing: true
-      topicSinks:
-        - topic: ${participant.intermediaryParameters.topics.operationTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          useHttps: false
-          allowTracing: true
-    participantSupportedElementTypes:
-      -
-        typeName: ${supportedElementTypeName:org.onap.policy.clamp.acm.SimAutomationCompositionElement2}
-        typeVersion: ${supportedElementTypeVersion:1.0.0}
-
-management:
-  tracing:
-    propagation:
-      produce: B3
-    sampling:
-      probability: 1.0
-  endpoints:
-    web:
-      base-path: /
-      exposure:
-        include: health, metrics, prometheus
-server:
-  port: 6969
-  ssl:
-    enabled: false
-  servlet:
-    context-path: /onap/policy/simparticipant
-
-tracing:
-  enabled: true
-  exporter:
-    endpoint: http://jaeger:4318/v1/traces
-    protocol: http
-  sampler:
-    jaeger-remote:
-      endpoint: http://jaeger:14250
-
-# legacy config
----
-
-spring:
-  config:
-    activate:
-      on-profile: legacy
-participant:
-  intermediaryParameters:
-    reportingTimeIntervalMs: 120000
-    participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c91}
-    clampAutomationCompositionTopics:
-      topicSources:
-        - topic: policy-acruntime-participant
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-      topicSinks:
-        - topic: policy-acruntime-participant
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          useHttps: false
diff --git a/compose/config/clamp/SimulatorParticipant3Parameters.yaml b/compose/config/clamp/SimulatorParticipant3Parameters.yaml
deleted file mode 100644 (file)
index 80ce735..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-spring:
-  application:
-    name: sim-ppnt-3
-  security:
-    user:
-      name: participantUser
-      password: zb!XztG34
-  autoconfigure:
-    exclude:
-      - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
-      - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-      - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
-
-security:
-  enable-csrf: false
-participant:
-  intermediaryParameters:
-    reportingTimeIntervalMs: 120000
-    description: Participant Description
-    participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c92}
-    topics:
-      operationTopic: policy-acruntime-participant
-      syncTopic: acm-ppnt-sync
-    clampAutomationCompositionTopics:
-      topicSources:
-        - topic: ${participant.intermediaryParameters.topics.operationTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-          allowTracing: true
-          additionalProps:
-            group.id: policy-clamp-ac-sim-ppnt-3
-        - topic: ${participant.intermediaryParameters.topics.syncTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-          allowTracing: true
-      topicSinks:
-        - topic: ${participant.intermediaryParameters.topics.operationTopic}
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          useHttps: false
-          allowTracing: true
-    participantSupportedElementTypes:
-      -
-        typeName: ${supportedElementTypeName:org.onap.policy.clamp.acm.SimAutomationCompositionElement3}
-        typeVersion: ${supportedElementTypeVersion:1.0.0}
-
-management:
-  tracing:
-    propagation:
-      produce: B3
-    sampling:
-      probability: 1.0
-  endpoints:
-    web:
-      base-path: /
-      exposure:
-        include: health, metrics, prometheus
-server:
-  port: 6969
-  ssl:
-    enabled: false
-  servlet:
-    context-path: /onap/policy/simparticipant
-
-tracing:
-  enabled: true
-  exporter:
-    endpoint: http://jaeger:4318/v1/traces
-    protocol: http
-  sampler:
-    jaeger-remote:
-      endpoint: http://jaeger:14250
-
-# legacy config
----
-
-spring:
-  config:
-    activate:
-      on-profile: legacy
-participant:
-  intermediaryParameters:
-    reportingTimeIntervalMs: 120000
-    participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c91}
-    clampAutomationCompositionTopics:
-      topicSources:
-        - topic: policy-acruntime-participant
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          fetchTimeout: 15000
-          useHttps: false
-      topicSinks:
-        - topic: policy-acruntime-participant
-          servers:
-            - ${topicServer:kafka:9092}
-          topicCommInfrastructure: kafka
-          useHttps: false
index 86e0431..b02c864 100644 (file)
@@ -1,6 +1,6 @@
 spring:
   application:
-    name: sim-ppnt-1
+    name: ${applicationName}
   security:
     user:
       name: participantUser
@@ -18,7 +18,7 @@ participant:
   intermediaryParameters:
     reportingTimeIntervalMs: 120000
     description: Participant Description
-    participantId: ${participantId:101c62b3-8918-41b9-a747-d21eb79c6c90}
+    participantId: ${participantId}
     topics:
       operationTopic: policy-acruntime-participant
       syncTopic: acm-ppnt-sync
@@ -26,16 +26,16 @@ participant:
       topicSources:
         - topic: ${participant.intermediaryParameters.topics.operationTopic}
           servers:
-            - ${topicServer:kafka:9092}
+            - kafka:9092
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
           allowTracing: true
           additionalProps:
-            group.id: policy-clamp-ac-sim-ppnt-1
+            group.id: ${groupId}
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
-            - ${topicServer:kafka:9092}
+            - kafka:9092
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
@@ -43,13 +43,13 @@ participant:
       topicSinks:
         - topic: ${participant.intermediaryParameters.topics.operationTopic}
           servers:
-            - ${topicServer:kafka:9092}
+            - kafka:9092
           topicCommInfrastructure: kafka
           useHttps: false
           allowTracing: true
     participantSupportedElementTypes:
       -
-        typeName: ${supportedElementTypeName:org.onap.policy.clamp.acm.SimAutomationCompositionElement}
+        typeName: ${supportedElementTypeName}
         typeVersion: ${supportedElementTypeVersion:1.0.0}
 
 management:
@@ -102,13 +102,13 @@ participant:
       topicSources:
         - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:kafka:9092}
+            - kafka:9092
           topicCommInfrastructure: kafka
           fetchTimeout: 15000
           useHttps: false
       topicSinks:
         - topic: policy-acruntime-participant
           servers:
-            - ${topicServer:kafka:9092}
+            - kafka:9092
           topicCommInfrastructure: kafka
           useHttps: false
index 6060968..eef2d62 100755 (executable)
@@ -37,7 +37,9 @@ export POLICY_OPA_CONTAINER="policy-opa-pdp"
 export POLICY_DISTRIBUTION_CONTAINER="policy-distribution"
 export POLICY_K8S_PPNT_CONTAINER="policy-clamp-ac-k8s-ppnt"
 export POLICY_HTTP_PPNT_CONTAINER="policy-clamp-ac-http-ppnt"
-export POLICY_SIM_PPNT_CONTAINER="policy-clamp-ac-sim-ppnt"
+export POLICY_SIM_PPNT_CONTAINER1="policy-clamp-ac-sim-ppnt-1"
+export POLICY_SIM_PPNT_CONTAINER2="policy-clamp-ac-sim-ppnt-2"
+export POLICY_SIM_PPNT_CONTAINER3="policy-clamp-ac-sim-ppnt-3"
 export POLICY_PF_PPNT_CONTAINER="policy-clamp-ac-pf-ppnt"
 export JAEGER_CONTAINER="jaeger"
 
@@ -57,10 +59,11 @@ function set_project_config() {
     clamp | policy-clamp)
         export ROBOT_FILE=$POLICY_CLAMP_ROBOT
         export READINESS_CONTAINERS=($POLICY_CLAMP_CONTAINER,$POLICY_APEX_CONTAINER,$POLICY_PF_PPNT_CONTAINER,$POLICY_K8S_PPNT_CONTAINER,
-            $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER,$JAEGER_CONTAINER)
+            $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER1,$POLICY_SIM_PPNT_CONTAINER2,$POLICY_SIM_PPNT_CONTAINER3,$JAEGER_CONTAINER)
         export SET_VALUES="--set $POLICY_CLAMP_CONTAINER.enabled=true --set $POLICY_APEX_CONTAINER.enabled=true
             --set $POLICY_PF_PPNT_CONTAINER.enabled=true --set $POLICY_K8S_PPNT_CONTAINER.enabled=true
-            --set $POLICY_HTTP_PPNT_CONTAINER.enabled=true --set $POLICY_SIM_PPNT_CONTAINER.enabled=true
+            --set $POLICY_HTTP_PPNT_CONTAINER.enabled=true --set $POLICY_SIM_PPNT_CONTAINER1.enabled=true
+            --set $POLICY_SIM_PPNT_CONTAINER2.enabled=true --set $POLICY_SIM_PPNT_CONTAINER3.enabled=true
             --set $JAEGER_CONTAINER.enabled=true"
         install_chartmuseum
         ;;
@@ -103,12 +106,13 @@ function set_project_config() {
         export READINESS_CONTAINERS=($POLICY_APEX_CONTAINER,$POLICY_API_CONTAINER,$POLICY_PAP_CONTAINER,
                     $POLICY_DISTRIBUTION_CONTAINER,$POLICY_DROOLS_CONTAINER,$POLICY_XACML_CONTAINER,$POLICY_OPA_CONTAINER,
                     $POLICY_CLAMP_CONTAINER,$POLICY_PF_PPNT_CONTAINER,$POLICY_K8S_PPNT_CONTAINER,
-                    $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER)
+                    $POLICY_HTTP_PPNT_CONTAINER,$POLICY_SIM_PPNT_CONTAINER1,$POLICY_SIM_PPNT_CONTAINER2,$POLICY_SIM_PPNT_CONTAINER3)
         export SET_VALUES="--set $POLICY_APEX_CONTAINER.enabled=true --set $POLICY_XACML_CONTAINER.enabled=true
             --set $POLICY_OPA_CONTAINER.enabled=true --set $POLICY_DISTRIBUTION_CONTAINER.enabled=true --set $POLICY_DROOLS_CONTAINER.enabled=true
             --set $POLICY_CLAMP_CONTAINER.enabled=true --set $POLICY_PF_PPNT_CONTAINER.enabled=true
             --set $POLICY_K8S_PPNT_CONTAINER.enabled=true --set $POLICY_HTTP_PPNT_CONTAINER.enabled=true
-            --set $POLICY_SIM_PPNT_CONTAINER.enabled=true"
+            --set $POLICY_K8S_PPNT_CONTAINER.enabled=true --set $POLICY_SIM_PPNT_CONTAINER1.enabled=true
+            --set $POLICY_SIM_PPNT_CONTAINER2.enabled=true --set $POLICY_SIM_PPNT_CONTAINER3.enabled=true"
         ;;
     esac
 }
index 2e10e73..1cb0874 100644 (file)
@@ -10,6 +10,14 @@ Resource    common-library.robot
 
 *** Keywords ***
 
+ExecuteQuery
+    [Arguments]  ${file}
+    [Documentation]    Execute Query
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${executeQueryFile}  ${CURDIR}/data/script/execute-queryk8.sh
+    ...    ELSE    set Suite variable  ${executeQueryFile}  ${CURDIR}/data/script/execute-query.sh
+    ${result}=    Run Process    ${executeQueryFile}    ${file}
+    Should Be Equal As Strings    ${result.rc}     0
+
 VerifyHealthcheckApi
     [Documentation]    Verify Healthcheck on policy-api
     ${auth}=    PolicyAdminAuth
index 10bf545..013b25e 100644 (file)
@@ -14,12 +14,9 @@ Resource    clamp-common.robot
 
 InsertDataIntoDatabase
     [Documentation]  Insert restored data into the Database.
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/compositiondefinition-from.sql
-    Should Be Equal As Strings    ${result.rc}     0
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/compositiondefinition-to.sql
-    Should Be Equal As Strings    ${result.rc}     0
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/instance.sql
-    Should Be Equal As Strings    ${result.rc}     0
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-from.sql
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-to.sql
+    ExecuteQuery    ${CURDIR}/data/query/instance.sql
 
 AcMigrationRestored
     [Documentation]  Migration of an automation composition restored.
@@ -35,8 +32,7 @@ AcMigrationRestored
 
 UpdateDataDatabase
     [Documentation]  Update restored data into the Database.
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/compositiondefinition-update.sql
-    Should Be Equal As Strings    ${result.rc}     0
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-update.sql
 
 ReviewAutomationCompositionRestored
     [Documentation]  Review automation composition restored.
@@ -56,10 +52,8 @@ DeleteACDefinitionsRestored
 
 InsertDataIntoDatabase2
     [Documentation]  Insert restored data into the Database.
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/compositiondefinition-from.sql
-    Should Be Equal As Strings    ${result.rc}     0
-    ${result}=    Run Process    ${CURDIR}/data/script/execute-query.sh    ${CURDIR}/data/query/instance.sql
-    Should Be Equal As Strings    ${result.rc}     0
+    ExecuteQuery    ${CURDIR}/data/query/compositiondefinition-from.sql
+    ExecuteQuery    ${CURDIR}/data/query/instance.sql
 
 SyncParticipant
     [Documentation]  Manual sync participants.
diff --git a/csit/resources/tests/data/script/execute-queryk8.sh b/csit/resources/tests/data/script/execute-queryk8.sh
new file mode 100755 (executable)
index 0000000..3465090
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+# ============LICENSE_START====================================================
+# Copyright (C) 2025 OpenInfra Foundation Europe. 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.
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END======================================================
+
+scriptPath=$1
+
+PSQL="psql -h ${PG_HOST} -p ${PG_PORT} -U ${PG_USER} -w -d ${PG_SCHEMA}"
+${PSQL} <"${scriptPath}"
+rc=$?
+if [ ${rc} -ne 0 ]; then
+  return ${rc}
+fi
+
+exit 0
index d3d268a..b31de0e 100644 (file)
@@ -76,7 +76,18 @@ dependencies:
   - name: policy-clamp-ac-sim-ppnt
     version: ~11.x-0
     repository: 'file://components/policy-clamp-ac-sim-ppnt'
-    condition: policy-clamp-ac-sim-ppnt.enabled
+    condition: policy-clamp-ac-sim-ppnt-1.enabled
+    alias: policy-clamp-ac-sim-ppnt-1
+  - name: policy-clamp-ac-sim-ppnt
+    version: ~11.x-0
+    repository: 'file://components/policy-clamp-ac-sim-ppnt'
+    condition: policy-clamp-ac-sim-ppnt-2.enabled
+    alias: policy-clamp-ac-sim-ppnt-2
+  - name: policy-clamp-ac-sim-ppnt
+    version: ~11.x-0
+    repository: 'file://components/policy-clamp-ac-sim-ppnt'
+    condition: policy-clamp-ac-sim-ppnt-3.enabled
+    alias: policy-clamp-ac-sim-ppnt-3
   - name: policy-clamp-ac-kserve-ppnt
     version: ~11.x-0
     repository: 'file://components/policy-clamp-ac-kserve-ppnt'
index 43cd767..ee52ec8 100644 (file)
@@ -18,7 +18,7 @@
 
 spring:
   application:
-    name: sim-ppnt
+    name: {{ .Values.applicationName }}
   autoconfigure:
     exclude:
       - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
@@ -40,7 +40,7 @@ participant:
       syncTopic: acm-ppnt-sync
     reportingTimeIntervalMs: 120000
     description: Participant Description
-    participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
+    participantId: {{ .Values.participantId }}
     clampAutomationCompositionTopics:
       topicSources:
         - topic: ${participant.intermediaryParameters.topics.operationTopic}
@@ -51,7 +51,7 @@ participant:
           useHttps: false
           allowTracing: {{ include "policy-clamp-ac-sim-ppnt.jaeger-enabled" . }}
           additionalProps:
-            group.id: policy-clamp-ac-sim-ppnt
+            group.id: {{ .Values.groupId }}
         - topic: ${participant.intermediaryParameters.topics.syncTopic}
           servers:
             - "{{ .Values.global.kafkaServer }}:9092"
@@ -68,7 +68,7 @@ participant:
           allowTracing: {{ include "policy-clamp-ac-sim-ppnt.jaeger-enabled" . }}
     participantSupportedElementTypes:
       -
-        typeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+        typeName: {{ .Values.supportedElementTypeName }}
         typeVersion: 1.0.0
 
 management:
@@ -96,4 +96,4 @@ tracing:
     protocol: {{ .Values.jaeger.collector.protocol }}
   sampler:
     jaeger-remote:
-      endpoint: "{{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}"
\ No newline at end of file
+      endpoint: "{{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}"
index 95fe91c..0fcf360 100644 (file)
@@ -103,4 +103,6 @@ jaeger:
     portJaegerGrpc: 14250
 
 applicationName: sim-ppnt
-
+participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
+groupId: policy-clamp-ac-sim-ppnt
+supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
index a9b2958..d85f7c6 100644 (file)
@@ -76,8 +76,36 @@ policy-distribution:
   enabled: false
 policy-clamp-ac-http-ppnt:
   enabled: false
-policy-clamp-ac-sim-ppnt:
+policy-clamp-ac-sim-ppnt-1:
   enabled: false
+  applicationName: sim-ppnt-1
+  participantId: 101c62b3-8918-41b9-a747-d21eb79c6c90
+  groupId: policy-clamp-ac-sim-ppnt-1
+  service:
+    name: policy-clamp-ac-sim-ppnt-1
+  serviceAccount:
+    nameOverride: policy-clamp-ac-sim-ppnt-1
+  supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
+policy-clamp-ac-sim-ppnt-2:
+  enabled: false
+  applicationName: sim-ppnt-2
+  participantId: 101c62b3-8918-41b9-a747-d21eb79c6c91
+  groupId: policy-clamp-ac-sim-ppnt-2
+  service:
+    name: policy-clamp-ac-sim-ppnt-2
+  serviceAccount:
+    nameOverride: policy-clamp-ac-sim-ppnt-2
+  supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement2
+policy-clamp-ac-sim-ppnt-3:
+  enabled: false
+  applicationName: sim-ppnt-3
+  participantId: 101c62b3-8918-41b9-a747-d21eb79c6c92
+  groupId: policy-clamp-ac-sim-ppnt-3
+  service:
+    name: policy-clamp-ac-sim-ppnt-3
+  serviceAccount:
+    nameOverride: policy-clamp-ac-sim-ppnt-3
+  supportedElementTypeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement3
 policy-clamp-ac-kserve-ppnt:
   enabled: false
 policy-clamp-ac-a1pms-ppnt:
index a540f45..45b4378 100644 (file)
@@ -48,6 +48,16 @@ spec:
           image: {{ .Values.imageCredentials.csitTestImage.name }}
           imagePullPolicy: Never
           env:
+            - name: PG_USER
+              value: {{ .Values.db.user }}
+            - name: PGPASSWORD
+              value: {{ .Values.db.password }}
+            - name: PG_HOST
+              value: {{ .Values.db.service.name }}
+            - name: PG_PORT
+              value: {{ .Values.db.service.internalPort | quote }}
+            - name: PG_SCHEMA
+              value: {{ .Values.db.name }}
             - name: ROBOT_FILE
               value: {{ .Values.robot }}
             - name: TEST_ENV
index 485a71b..22702c9 100644 (file)
@@ -68,3 +68,11 @@ affinity: {}
 robot: ""
 readiness: []
 robotLogDir: ""
+
+db:
+  user: policy-user
+  password: policy-user
+  name: clampacm
+  service:
+    name: postgres-service
+    internalPort: 5432