From 454381ee24a371d59c6795d51c95522a10de6bd0 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Fri, 21 Nov 2025 14:08:44 +0000 Subject: [PATCH] Fix Clamp CSITs helm charts 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 --- compose/compose.common.yml | 16 +++- .../clamp/SimulatorParticipant2Parameters.yaml | 106 --------------------- .../clamp/SimulatorParticipant3Parameters.yaml | 106 --------------------- .../clamp/SimulatorParticipantParameters.yaml | 18 ++-- csit/resources/scripts/config_setup.sh | 14 ++- csit/resources/tests/clamp-common.robot | 8 ++ csit/resources/tests/clamp-db-restore.robot | 18 ++-- .../resources/tests/data/script/execute-queryk8.sh | 29 ++++++ helm/policy/Chart.yaml | 13 ++- .../config/SimulatorParticipantParameters.yaml | 10 +- .../policy-clamp-ac-sim-ppnt/values.yaml | 4 +- helm/policy/values.yaml | 30 +++++- helm/robot/templates/test-job.yaml | 10 ++ helm/robot/values.yaml | 8 ++ 14 files changed, 142 insertions(+), 248 deletions(-) delete mode 100644 compose/config/clamp/SimulatorParticipant2Parameters.yaml delete mode 100644 compose/config/clamp/SimulatorParticipant3Parameters.yaml create mode 100755 csit/resources/tests/data/script/execute-queryk8.sh diff --git a/compose/compose.common.yml b/compose/compose.common.yml index 8836f86f..1a7b5f97 100644 --- a/compose/compose.common.yml +++ b/compose/compose.common.yml @@ -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 index d2860273..00000000 --- a/compose/config/clamp/SimulatorParticipant2Parameters.yaml +++ /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 index 80ce7357..00000000 --- a/compose/config/clamp/SimulatorParticipant3Parameters.yaml +++ /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 diff --git a/compose/config/clamp/SimulatorParticipantParameters.yaml b/compose/config/clamp/SimulatorParticipantParameters.yaml index 86e0431f..b02c8646 100644 --- a/compose/config/clamp/SimulatorParticipantParameters.yaml +++ b/compose/config/clamp/SimulatorParticipantParameters.yaml @@ -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 diff --git a/csit/resources/scripts/config_setup.sh b/csit/resources/scripts/config_setup.sh index 6060968a..eef2d627 100755 --- a/csit/resources/scripts/config_setup.sh +++ b/csit/resources/scripts/config_setup.sh @@ -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 } diff --git a/csit/resources/tests/clamp-common.robot b/csit/resources/tests/clamp-common.robot index 2e10e736..1cb0874a 100644 --- a/csit/resources/tests/clamp-common.robot +++ b/csit/resources/tests/clamp-common.robot @@ -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 diff --git a/csit/resources/tests/clamp-db-restore.robot b/csit/resources/tests/clamp-db-restore.robot index 10bf5453..013b25e1 100644 --- a/csit/resources/tests/clamp-db-restore.robot +++ b/csit/resources/tests/clamp-db-restore.robot @@ -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 index 00000000..3465090f --- /dev/null +++ b/csit/resources/tests/data/script/execute-queryk8.sh @@ -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 diff --git a/helm/policy/Chart.yaml b/helm/policy/Chart.yaml index d3d268ac..b31de0e4 100644 --- a/helm/policy/Chart.yaml +++ b/helm/policy/Chart.yaml @@ -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' diff --git a/helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml index 43cd7672..ee52ec87 100644 --- a/helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-sim-ppnt/resources/config/SimulatorParticipantParameters.yaml @@ -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 }}" diff --git a/helm/policy/components/policy-clamp-ac-sim-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-sim-ppnt/values.yaml index 95fe91c7..0fcf3604 100644 --- a/helm/policy/components/policy-clamp-ac-sim-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-sim-ppnt/values.yaml @@ -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 diff --git a/helm/policy/values.yaml b/helm/policy/values.yaml index a9b29584..d85f7c6b 100644 --- a/helm/policy/values.yaml +++ b/helm/policy/values.yaml @@ -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: diff --git a/helm/robot/templates/test-job.yaml b/helm/robot/templates/test-job.yaml index a540f456..45b43787 100644 --- a/helm/robot/templates/test-job.yaml +++ b/helm/robot/templates/test-job.yaml @@ -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 diff --git a/helm/robot/values.yaml b/helm/robot/values.yaml index 485a71b2..22702c99 100644 --- a/helm/robot/values.yaml +++ b/helm/robot/values.yaml @@ -68,3 +68,11 @@ affinity: {} robot: "" readiness: [] robotLogDir: "" + +db: + user: policy-user + password: policy-user + name: clampacm + service: + name: postgres-service + internalPort: 5432 -- 2.16.6