From: FrancescoFioraEst Date: Fri, 6 Feb 2026 13:13:29 +0000 (+0000) Subject: Remove duplication of logback.xml in integration test for ACM runtime X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F143136%2F1;p=policy%2Fdocker.git Remove duplication of logback.xml in integration test for ACM runtime Issue-ID: POLICY-5512 Change-Id: I7e16efaddeb037bfdbcd452a52158702048f6051 Signed-off-by: FrancescoFioraEst --- diff --git a/compose/compose.acm.scale.yml b/compose/compose.acm.scale.yml index 3820c43e..2b1d1bd0 100644 --- a/compose/compose.acm.scale.yml +++ b/compose/compose.acm.scale.yml @@ -43,6 +43,7 @@ services: environment: RUNTIME_USER: runtimeUser RUNTIME_PASSWORD: zb!XztG34 + TIMEZONE: UTC SQL_HOST: postgres SQL_PORT: 5432 SQL_USER: policy_user @@ -56,22 +57,18 @@ services: 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 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false - volumes: - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro healthcheck: test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1" interval: 30s timeout: 10s retries: 5 start_period: 60s - entrypoint: java -jar /app/app.jar policy-clamp-ac-http-ppnt-replica: image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION} diff --git a/compose/compose.yaml b/compose/compose.yaml index f162e860..d19912b3 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -229,6 +229,7 @@ services: environment: RUNTIME_USER: runtimeUser RUNTIME_PASSWORD: zb!XztG34 + TIMEZONE: UTC SQL_HOST: postgres SQL_PORT: 5432 SQL_USER: policy_user @@ -242,7 +243,6 @@ services: 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 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 @@ -251,15 +251,12 @@ services: -Dcom.sun.management.jmxremote.local.only=false -Dotel.java.global-autoconfigure.enabled=true SPRING_PROFILES_ACTIVE: ${CLAMP_PROFILE:-default} - volumes: - - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro healthcheck: test: "curl --fail --silent http://localhost:6969/onap/policy/clamp/acm/actuator/health/readiness | grep UP || exit 1" interval: 30s timeout: 10s retries: 5 start_period: 60s - entrypoint: java -jar /app/app.jar policy-clamp-ac-http-ppnt: image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-http-ppnt:${POLICY_CLAMP_PPNT_VERSION} diff --git a/compose/config/clamp/logback.xml b/compose/config/clamp/logback.xml deleted file mode 100644 index d5833334..00000000 --- a/compose/config/clamp/logback.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${logDir}/${errorLog}.log - - ${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - ${errorPattern} - - - - - - - - - ${logDir}/${debugLog}.log - - ${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${debugPattern} - - - - - - - - - ${logDir}/${networkLog}.log - - ${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${networkPattern} - - - - - - - - - ${logDir}/${metricLog}.log - - ${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${metricPattern} - - - - - - - - - ${logDir}/${transactionLog}.log - - ${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - ${transactionPattern} - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/csit/resources/tests/data/AcK8s.json b/csit/resources/tests/data/AcK8s.json index c8f1a838..7ee83437 100644 --- a/csit/resources/tests/data/AcK8s.json +++ b/csit/resources/tests/data/AcK8s.json @@ -1114,7 +1114,8 @@ "acelement.elementId.name": "onap.policy.clamp.ac.starter", "service.nodeport": 30800 } - } + }, + "deployTimeoutMs": "100000" } }, "709c62b3-8918-41b9-a747-d21eb79c6c22": { @@ -1141,7 +1142,8 @@ "acelement.elementId.name": "onap.policy.clamp.ac.bridge", "service.nodeport": 30801 } - } + }, + "deployTimeoutMs": "100000" } }, "709c62b3-8918-41b9-a747-d21eb79c6c23": { @@ -1168,7 +1170,8 @@ "acelement.elementId.name": "onap.policy.clamp.ac.sink", "service.nodeport": 30802 } - } + }, + "deployTimeoutMs": "100000" } }, "709c62b3-8918-41b9-a747-d21eb79c6c24": { 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 deleted file mode 100755 index bc16e64e..00000000 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acm-runtime.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env sh -# -# ============LICENSE_START======================================================= -# 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. -# 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========================================================= -# - -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/ -fi - -$JAVA_HOME/bin/java \ - -Dlogging.config="${POLICY_HOME}/etc/logback.xml" \ - -Dcom.sun.management.jmxremote.rmi.port=9090 \ - -Dcom.sun.management.jmxremote=true \ - -Dcom.sun.management.jmxremote.port=9090 \ - -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 \ - -jar /app/app.jar diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/logback.xml b/helm/policy/components/policy-clamp-runtime-acm/resources/config/logback.xml deleted file mode 100644 index a98cb57f..00000000 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/logback.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - /var/log/onap/policy/policy-clamp-runtime-acm/error.log - - /var/log/onap/policy/policy-clamp-runtime-acm/error.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - /var/log/onap/policy/policy-clamp-runtime-acm/debug.log - - /var/log/onap/policy/policy-clamp-runtime-acm/debug.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - /var/log/onap/policy/policy-clamp-runtime-acm/network.log - - /var/log/onap/policy/policy-clamp-runtime-acm/network.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/helm/policy/components/policy-clamp-runtime-acm/templates/configmap.yaml b/helm/policy/components/policy-clamp-runtime-acm/templates/configmap.yaml index 43f6e270..298cb070 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/templates/configmap.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/templates/configmap.yaml @@ -27,11 +27,3 @@ metadata: app: {{ .Chart.Name }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} heritage: Helm -{{- with .Files.Glob "resources/config/*store" }} -binaryData: -{{- range $path, $bytes := . }} - {{ base $path }}: {{ $.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{ tpl (.Files.Glob "resources/config/*.{json,xml,yaml,sh}").AsConfig . | indent 2 }} 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 78d0a4a1..f34bf437 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml @@ -37,52 +37,10 @@ spec: app.kubernetes.io/managed-by: Helm name: {{ .Chart.Name }} spec: - initContainers: - - command: - - /app/ready.py - args: - - --job-name - - policy-pg-init - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: {{ .Values.global.repository }}/{{ .Values.global.image.readiness }} - imagePullPolicy: {{ .Values.pullPolicy }} - name: {{ .Chart.Name }}-readiness - - command: - - sh - args: - - -c - - "cd /config-input && for PFILE in `ls -1`; do envsubst <${PFILE} >/config/${PFILE}; done" - env: - - name: SQL_USER - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-db-secret - key: login - - - name: SQL_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-db-secret - key: password - - volumeMounts: - - mountPath: /config-input - name: ac-runtime-config - - mountPath: /config - name: ac-runtime-config-processed - image: docker.io/dibi/envsubst:1 - imagePullPolicy: {{ .Values.pullPolicy }} - name: {{ .Chart.Name }}-update-config containers: - name: {{ .Chart.Name }} image: {{ .Values.global.repository }}/{{ .Values.global.image.runtimeacm }} imagePullPolicy: {{ .Values.global.pullPolicy }} - command: ["/opt/app/policy/clamp/bin/acm-runtime.sh"] env: - name: RUNTIME_USER valueFrom: @@ -94,6 +52,8 @@ spec: secretKeyRef: name: {{ .Chart.Name }}-runtime-secret key: password + - name: TIMEZONE + value: UTC - name: SQL_HOST value: {{ .Values.db.service.name }} - name: SQL_PORT @@ -166,11 +126,6 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/policy/clamp/etc/mounted - name: ac-runtime-config-processed - - mountPath: /opt/app/policy/clamp/bin/acm-runtime.sh - name: ac-runtime-config - subPath: acm-runtime.sh resources: {{ toYaml .Values.resources.small | indent 12 }} {{- if .Values.nodeSelector }} @@ -186,12 +141,5 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: ac-runtime-config - configMap: - name: {{ .Chart.Name }}-configmap - defaultMode: 0755 - - name: ac-runtime-config-processed - emptyDir: - medium: Memory imagePullSecrets: - name: "default-docker-registry-key"