From ed4ef69183ad72bb2fc33009ea389017f421522f Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Wed, 14 Jan 2026 14:58:33 +0000 Subject: [PATCH] Remove duplicate Spring config files from ACM-R in integration test Issue-ID: POLICY-5511 Change-Id: I8db5fc39ea01b63c85cfb2f0e90a8c5ddf1790b8 Signed-off-by: FrancescoFioraEst --- compose/compose.acm.scale.yml | 19 ++- compose/compose.yaml | 18 ++- compose/config/clamp/AcRuntimeParameters.yaml | 163 --------------------- compose/metrics/prometheus.yml | 2 +- csit/resources/tests/clamp-health-check.robot | 4 +- csit/resources/tests/clamp-slas.robot | 2 +- .../resources/config/acRuntimeParameters.yaml | 130 ---------------- .../resources/config/acm-runtime.sh | 34 +---- .../resources/config/db.sh | 26 ---- .../templates/deployment.yaml | 71 ++++++--- .../policy-clamp-runtime-acm/values.yaml | 10 +- helm/prometheus/resources/prometheus.yml | 4 +- 12 files changed, 89 insertions(+), 394 deletions(-) delete mode 100644 compose/config/clamp/AcRuntimeParameters.yaml delete mode 100644 helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml delete mode 100755 helm/policy/components/policy-clamp-runtime-acm/resources/config/db.sh diff --git a/compose/compose.acm.scale.yml b/compose/compose.acm.scale.yml index 46c55a39..3820c43e 100644 --- a/compose/compose.acm.scale.yml +++ b/compose/compose.acm.scale.yml @@ -41,10 +41,20 @@ services: restart: on-failure:3 environment: + RUNTIME_USER: runtimeUser + RUNTIME_PASSWORD: zb!XztG34 + SQL_HOST: postgres + SQL_PORT: 5432 + SQL_USER: policy_user + SQL_PASSWORD: policy_user + TOPIC_COMM_INFRASTRUCTURE: kafka + ALLOW_TRACING: true + PROMETHEUS_PORT: 6969 OTEL_SERVICE_NAME: acm-r OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318 + OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true JAVA_TOOL_OPTIONS: >- -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml" -Dcom.sun.management.jmxremote.rmi.port=9090 @@ -53,17 +63,10 @@ services: -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false - -Dotel.java.global-autoconfigure.enabled=true - SPRING_CONFIG_LOCATION: /opt/app/policy/clamp/etc/AcRuntimeParameters.yaml - # Tracing can be configured for grpc or http - default is http - #OTEL_EXPORTER_OTLP_PROTOCOL: grpc - #OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: grpc - #OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317 volumes: - - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/AcRuntimeParameters.yaml - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro healthcheck: - test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/health/readiness | grep UP || exit 1" + test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1" interval: 30s timeout: 10s retries: 5 diff --git a/compose/compose.yaml b/compose/compose.yaml index becc85b3..f162e860 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -227,10 +227,20 @@ services: restart: on-failure:3 environment: + RUNTIME_USER: runtimeUser + RUNTIME_PASSWORD: zb!XztG34 + SQL_HOST: postgres + SQL_PORT: 5432 + SQL_USER: policy_user + SQL_PASSWORD: policy_user + TOPIC_COMM_INFRASTRUCTURE: kafka + ALLOW_TRACING: true + PROMETHEUS_PORT: 6969 OTEL_SERVICE_NAME: acm-r OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: http/protobuf OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318 + OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED: true JAVA_TOOL_OPTIONS: >- -Dlogging.config="/opt/app/policy/clamp/etc/logback.xml" -Dcom.sun.management.jmxremote.rmi.port=9090 @@ -241,16 +251,10 @@ services: -Dcom.sun.management.jmxremote.local.only=false -Dotel.java.global-autoconfigure.enabled=true SPRING_PROFILES_ACTIVE: ${CLAMP_PROFILE:-default} - SPRING_CONFIG_LOCATION: /opt/app/policy/clamp/etc/application.yaml - # Tracing can be configured for grpc or http - default is http - #OTEL_EXPORTER_OTLP_PROTOCOL: grpc - #OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: grpc - #OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317 volumes: - - ./config/clamp/AcRuntimeParameters.yaml:/opt/app/policy/clamp/etc/application.yaml - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro healthcheck: - test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/health/readiness | grep UP || exit 1" + test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1" interval: 30s timeout: 10s retries: 5 diff --git a/compose/config/clamp/AcRuntimeParameters.yaml b/compose/config/clamp/AcRuntimeParameters.yaml deleted file mode 100644 index 76f061c1..00000000 --- a/compose/config/clamp/AcRuntimeParameters.yaml +++ /dev/null @@ -1,163 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 2024-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========================================================= - -spring: - application: - name: acm-r - security: - user: - name: runtimeUser - password: zb!XztG34 - http: - converters: - preferred-json-mapper: gson - datasource: - url: jdbc:postgresql://postgres:5432/clampacm - driverClassName: org.postgresql.Driver - username: policy_user - password: policy_user - hikari: - connectionTimeout: 30000 - idleTimeout: 600000 - maxLifetime: 1800000 - maximumPoolSize: 10 - jpa: - hibernate: - ddl-auto: none - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - properties: - hibernate: - format_sql: true - -security: - enable-csrf: false - -server: - servlet: - context-path: /onap/policy/clamp/acm - port: 6969 - ssl: - enabled: false - error: - path: /error - -runtime: - topics: - operationTopic: policy-acruntime-participant - syncTopic: acm-ppnt-sync - participantParameters: - heartBeatMs: 20000 - maxStatusWaitMs: 150000 - maxOperationWaitMs: 200000 - topicParameterGroup: - topicSources: - - - topic: ${runtime.topics.operationTopic} - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - fetchTimeout: 15000 - useHttps: false - additionalProps: - group.id: policy-clamp-runtime-acm - allowTracing: true - topicSinks: - - - topic: ${runtime.topics.operationTopic} - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - allowTracing: true - useHttps: false - - - topic: ${runtime.topics.syncTopic} - servers: - - ${topicServer:kafka:9092} - topicCommInfrastructure: kafka - useHttps: false - allowTracing: true - acmParameters: - toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement - toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition - enableEncryption: true - -management: - tracing: - propagation: - produce: B3 - sampling: - probability: 1.0 - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus - endpoint: - health: - access: unrestricted - show-details: always - probes: - enabled: true - show-components: always - -metrics: - security: - disabled: false - -# Tracing can be configured for grpc or http - default is http -tracing: - enabled: true - exporter: - endpoint: http://jaeger:4318/v1/traces - protocol: http -# protocol: grpc - sampler: - jaeger-remote: - endpoint: http://jaeger:14250 - ---- -# legacy config - -spring: - config: - activate: - on-profile: legacy -runtime: - participantParameters: - heartBeatMs: 20000 - maxStatusWaitMs: 150000 - topicParameterGroup: - 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 - acmParameters: - toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement - toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition diff --git a/compose/metrics/prometheus.yml b/compose/metrics/prometheus.yml index f164662f..cb182bea 100644 --- a/compose/metrics/prometheus.yml +++ b/compose/metrics/prometheus.yml @@ -97,7 +97,7 @@ scrape_configs: password: "zb!XztG34" - job_name: "acm-metrics" - metrics_path: "/onap/policy/clamp/acm/prometheus" + metrics_path: "/onap/policy/clamp/acm/actuator/prometheus" static_configs: - targets: - "compose-policy-clamp-runtime-acm-replica-1:6969" diff --git a/csit/resources/tests/clamp-health-check.robot b/csit/resources/tests/clamp-health-check.robot index 8e579666..cf5dde25 100644 --- a/csit/resources/tests/clamp-health-check.robot +++ b/csit/resources/tests/clamp-health-check.robot @@ -14,7 +14,7 @@ Resource clamp-common.robot HealthcheckAcm [Documentation] Healthcheck on Clamp Acm ${auth}= ClampAuth - ${resp}= MakeGetRequest ACM ${POLICY_RUNTIME_ACM_IP} onap/policy/clamp/acm/health ${auth} + ${resp}= MakeGetRequest ACM ${POLICY_RUNTIME_ACM_IP} onap/policy/clamp/acm/actuator/health ${auth} Should Be Equal As Strings ${resp.status_code} 200 HealthcheckParticipantSim @@ -38,4 +38,4 @@ RegisterParticipants ${session}= Create Session policy http://${POLICY_RUNTIME_ACM_IP} auth=${auth} ${resp}= PUT On Session policy /onap/policy/clamp/acm/v2/participants Log Received response from runtime acm ${resp.text} - Should Be Equal As Strings ${resp.status_code} 202 \ No newline at end of file + Should Be Equal As Strings ${resp.status_code} 202 diff --git a/csit/resources/tests/clamp-slas.robot b/csit/resources/tests/clamp-slas.robot index 649da1a8..a1ffd123 100644 --- a/csit/resources/tests/clamp-slas.robot +++ b/csit/resources/tests/clamp-slas.robot @@ -19,7 +19,7 @@ WaitForPrometheusServer ValidateResponseTimeForHealthcheck [Documentation] Validate component healthcheck response time - ValidateResponseTimeForClamp /health GET + ValidateResponseTimeForClamp /actuator/health GET ValidateResponseTimeQueryAcDefinition [Documentation] Validate query AC Definitions response time diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml deleted file mode 100644 index 16c8ab85..00000000 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml +++ /dev/null @@ -1,130 +0,0 @@ -# ============LICENSE_START======================================================= -# Copyright (C) 2022,2024-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========================================================= - -spring: - application: - name: {{ .Values.applicationName }} - security: - user: - name: ${RUNTIME_USER} - password: ${RUNTIME_PASSWORD} - http: - converters: - preferred-json-mapper: gson - datasource: - url: jdbc:postgresql://{{ .Values.db.service.name }}:{{ .Values.db.service.internalPort }}/clampacm - driverClassName: org.postgresql.Driver - username: ${SQL_USER} - password: ${SQL_PASSWORD} - hikari: - connectionTimeout: 30000 - idleTimeout: 600000 - maxLifetime: 1800000 - maximumPoolSize: 10 - jpa: - hibernate: - ddl-auto: none - naming: - physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl - properties: - hibernate: - format_sql: true - -security: - enable-csrf: false - -metrics: - security: - disabled: false - -server: - port: 6969 - servlet: - context-path: /onap/policy/clamp/acm - error: - path: /error - ssl: - enabled: false - -runtime: - topics: - operationTopic: policy-acruntime-participant - syncTopic: acm-ppnt-sync - participantParameters: - heartBeatMs: {{ .Values.runtime.participantParameters.heartBeatMs }} - maxStatusWaitMs: {{ .Values.runtime.participantParameters.maxStatusWaitMs }} - maxOperationWaitMs: {{ .Values.runtime.participantParameters.maxOperationWaitMs }} - topicParameterGroup: - topicSources: - - - topic: policy-acruntime-participant - servers: - - {{ .Values.global.kafkaServer }}:9092 - topicCommInfrastructure: kafka - useHttps: false - fetchTimeout: 15000 - allowTracing: {{ include "policy-clamp-runtime-acm.jaeger-enabled" . }} - additionalProps: - group.id: policy-clamp-runtime-acm - topicSinks: - - - topic: ${runtime.topics.operationTopic} - servers: - - {{ .Values.global.kafkaServer }}:9092 - topicCommInfrastructure: kafka - useHttps: false - allowTracing: {{ include "policy-clamp-runtime-acm.jaeger-enabled" . }} - - - topic: ${runtime.topics.syncTopic} - servers: - - {{ .Values.global.kafkaServer }}:9092 - topicCommInfrastructure: kafka - allowTracing: {{ include "policy-clamp-runtime-acm.jaeger-enabled" . }} - useHttps: false - acmParameters: - toscaElementName: {{ .Values.customNaming.toscaElementName }} - toscaCompositionName: {{ .Values.customNaming.toscaCompositionName }} - enableEncryption: true - -management: - tracing: - propagation: - produce: [{{ .Values.jaeger.producer.type }}] - sampling: - probability: {{ .Values.jaeger.sampling.probability }} - endpoints: - web: - base-path: / - exposure: - include: health, metrics, prometheus - endpoint: - health: - access: unrestricted - show-details: always - probes: - enabled: true - show-components: always - -tracing: - enabled: {{ .Values.jaeger.enabled }} - exporter: - endpoint: "{{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-runtime-acm.exporter-port" . }}" - protocol: {{ .Values.jaeger.collector.protocol }} - sampler: - jaeger-remote: - endpoint: "{{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}" diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acm-runtime.sh b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acm-runtime.sh index 695c08fc..bc16e64e 100755 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acm-runtime.sh +++ b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acm-runtime.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # # ============LICENSE_START======================================================= -# Copyright (C) 2024 Nordix Foundation. +# Copyright (C) 2024,2026 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. @@ -19,31 +19,6 @@ # ============LICENSE_END========================================================= # -KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}" -TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}" -KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}" -TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}" - -if [ "$#" -eq 1 ]; then - CONFIG_FILE=$1 -fi - -if [ -z "$CONFIG_FILE" ]; then - CONFIG_FILE="${POLICY_HOME}/etc/AcRuntimeParameters.yaml" -fi - -echo "Policy clamp runtime acm config file: $CONFIG_FILE" - -if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then - echo "overriding policy-truststore" - cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}" -fi - -if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then - echo "overriding policy-keystore" - cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}" -fi - if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then echo "overriding logback xml file" cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/ @@ -51,10 +26,6 @@ fi $JAVA_HOME/bin/java \ -Dlogging.config="${POLICY_HOME}/etc/logback.xml" \ - -Dserver.ssl.keyStore="${KEYSTORE}" \ - -Dserver.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \ - -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \ - -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \ -Dcom.sun.management.jmxremote.rmi.port=9090 \ -Dcom.sun.management.jmxremote=true \ -Dcom.sun.management.jmxremote.port=9090 \ @@ -62,5 +33,4 @@ $JAVA_HOME/bin/java \ -Dcom.sun.management.jmxremote.authenticate=false \ -Dcom.sun.management.jmxremote.local.only=false \ -Dotel.java.global-autoconfigure.enabled=true \ - -jar /app/app.jar \ - --spring.config.location="${CONFIG_FILE}" + -jar /app/app.jar diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/db.sh b/helm/policy/components/policy-clamp-runtime-acm/resources/config/db.sh deleted file mode 100755 index 3b8f30b7..00000000 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/db.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -{{/* -# Copyright © 2022 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. -*/}} - -mysql() { /usr/bin/mysql -h ${MYSQL_HOST} -P ${MYSQL_USER} "$@"; }; - -for db in migration pooling policyadmin policyclamp operationshistory clampacm -do - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" - mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" -done - -mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "FLUSH PRIVILEGES;" diff --git a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml index a67fdcde..78d0a4a1 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml @@ -1,6 +1,6 @@ {{/* # ============LICENSE_START======================================================= -# Copyright (C) 2022-2025 Nordix Foundation. +# Copyright (C) 2022-2026 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. @@ -70,18 +70,6 @@ spec: name: {{ .Chart.Name }}-db-secret key: password - - name: RUNTIME_USER - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-runtime-secret - key: login - - - name: RUNTIME_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-runtime-secret - key: password - volumeMounts: - mountPath: /config-input name: ac-runtime-config @@ -95,10 +83,57 @@ spec: image: {{ .Values.global.repository }}/{{ .Values.global.image.runtimeacm }} imagePullPolicy: {{ .Values.global.pullPolicy }} command: ["/opt/app/policy/clamp/bin/acm-runtime.sh"] - args: ["/opt/app/policy/clamp/etc/mounted/acRuntimeParameters.yaml"] - {{- $jaegerEnabled := tpl "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" . | trimSuffix "\n" -}} - {{- if $jaegerEnabled }} env: + - name: RUNTIME_USER + valueFrom: + secretKeyRef: + name: {{ .Chart.Name }}-runtime-secret + key: login + - name: RUNTIME_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Chart.Name }}-runtime-secret + key: password + - name: SQL_HOST + value: {{ .Values.db.service.name }} + - name: SQL_PORT + value: {{ .Values.db.service.internalPort | quote }} + - name: SQL_USER + valueFrom: + secretKeyRef: + name: {{ .Chart.Name }}-db-secret + key: login + - name: SQL_PASSWORD + valueFrom: + secretKeyRef: + name: {{ .Chart.Name }}-db-secret + key: password + - name: SERVER_PORT + value: {{ .Values.service.ports.port | quote }} + - name: TOPIC_COMM_INFRASTRUCTURE + value: kafka + - name: KAFKA_SERVER + value: "{{ .Values.global.kafkaServer }}:9092" + - name: TOSCA_ELEMENT_NAME + value: {{ .Values.customNaming.toscaElementName }} + - name: TOSCA_COMPOSITION_NAME + value: {{ .Values.customNaming.toscaCompositionName }} + - name: PROMETHEUS_PORT + value: {{ .Values.service.ports.port | quote }} + {{- $jaegerEnabled := tpl "policy-clamp-runtime-acm.jaeger-enabled" . | trimSuffix "\n" -}} + {{- if $jaegerEnabled }} + - name: ALLOW_TRACING + value: "true" + - name: JAEGER_PRODUCER_TYPE + value: {{ .Values.jaeger.producer.type | quote }} + - name: JAEGER_SAMPLING_PROBABILITY + value: {{ .Values.jaeger.sampling.probability | quote }} + - name: TRACING_EXPORTER_ENDPOINT + value: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-runtime-acm.exporter-port" . }} + - name: TRACING_EXPORTER_PROTOCOL + value: {{ .Values.jaeger.collector.protocol }} + - name: TRACING_SAMPLER_ENDPOINT + value: "{{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}" - name: OTEL_SERVICE_NAME value: {{ .Values.applicationName }} - name: OTEL_EXPORTER_OTLP_PROTOCOL @@ -107,10 +142,12 @@ spec: value: {{ include "policy-clamp-runtime-acm.jaeger-protocol" . }} - name: OTEL_EXPORTER_OTLP_ENDPOINT value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-runtime-acm.exporter-port" .) }} + - name: OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED + value: "true" {{- end }} ports: - containerPort: {{ .Values.service.ports.port }} - name: http-api + name: runtime-api # disable liveness probe when breakpoints set in debugger # so K8s doesn't restart unresponsive container {{- if eq .Values.liveness.enabled true }} diff --git a/helm/policy/components/policy-clamp-runtime-acm/values.yaml b/helm/policy/components/policy-clamp-runtime-acm/values.yaml index 8f8a4a50..8793b9fb 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/values.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022,2024-2025 OpenInfra Foundation Europe. All rights reserved. +# Copyright (C) 2022,2024-2026 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. @@ -59,20 +59,20 @@ liveness: # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true - port: http-api + port: runtime-api readiness: initialDelaySeconds: 120 periodSeconds: 10 failureThreshold: 10 - port: http-api + port: runtime-api service: type: NodePort name: policy-clamp-runtime-acm useNodePortExt: true ports: - name: http-api + name: runtime-api port: 6969 nodePort: 30442 @@ -108,7 +108,7 @@ jaeger: sampling: probability: "1.0" producer: - type: B3,W3C,B3_MULTI + type: "[B3,W3C,B3_MULTI]" collector: protocol: grpc host: "http://jaeger" diff --git a/helm/prometheus/resources/prometheus.yml b/helm/prometheus/resources/prometheus.yml index 71ecdded..91014188 100644 --- a/helm/prometheus/resources/prometheus.yml +++ b/helm/prometheus/resources/prometheus.yml @@ -1,6 +1,6 @@ # # ===========LICENSE_START==================================================== -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023,2026 OpenInfra Foundation Europe. All rights reserved. # Modifications Copyright 2025 Deutsche Telekom # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -96,7 +96,7 @@ scrape_configs: password: "zb!XztG34" - job_name: "acm-metrics" - metrics_path: "/onap/policy/clamp/acm/prometheus" + metrics_path: "/onap/policy/clamp/acm/actuator/prometheus" static_configs: - targets: - "policy-clamp-runtime-acm:6969" -- 2.16.6