POLICY_HTTP_PPNT_CONTAINER="policy-clamp-ac-http-ppnt"
POLICY_SIM_PPNT_CONTAINER="policy-clamp-ac-sim-ppnt"
POLICY_PF_PPNT_CONTAINER="policy-clamp-ac-pf-ppnt"
+JAEGER_CONTAINER="jaeger"
KAFKA_CONTAINER="kafka-deployment"
ZK_CONTAINER="zookeeper-deployment"
KAFKA_DIR=${WORKSPACE}/helm/cp-kafka
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)
+ 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)
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_CONTAINER.enabled=true
+ --set $JAEGER_CONTAINER.enabled=true"
install_chartmuseum
;;
version: ~11.x-0
repository: 'file://components/policy-clamp-ac-a1pms-ppnt'
condition: policy-clamp-ac-a1pms-ppnt.enabled
+ - name: jaeger-all-in-one
+ version: 0.1.12
+ repository: https://raw.githubusercontent.com/hansehe/jaeger-all-in-one/master/helm/charts
+ alias: jaeger
+ condition: jaeger.enabled
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: {{ .Values.applicationName }}
security:
user:
name: participantUser
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
fetchTimeout: 15000
+ allowTracing: {{ include "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-a1pms-ppnt
- topic: ${participant.intermediaryParameters.topics.syncTopic}
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
fetchTimeout: 15000
+ allowTracing: {{ include "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" . }}
topicSinks:
- topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
+ allowTracing: {{ include "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement
typeVersion: 1.0.1
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
ssl:
enabled: false
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-a1pms-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
+
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/A1pmsParticipantParameters.yaml"
+fi
+
+echo "Policy clamp A1 Pms participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-a1pms-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-a1pms-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============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.
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
heritage: Helm
data:
-{{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/*.{xml,yaml,sh}").AsConfig . | indent 2 }}
\ No newline at end of file
{{/*
# ============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.
imagePullPolicy: {{ .Values.global.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/a1pms-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/A1pmsParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-a1pms-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-a1pms-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-a1pms-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-a1pms-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 8086
name: a1pms-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-a1pms-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/a1pms-participant.sh
+ name: ac-a1pms-ppnt-config
+ subPath: a1pms-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
nameOverride: policy-clamp-ac-a1pms-ppnt
roles:
- create
+
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: a1pms-ppnt
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: {{ .Values.applicationName }}
autoconfigure:
exclude: >
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-http-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-http-ppnt
- topic: ${participant.intermediaryParameters.topics.syncTopic}
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-http-ppnt.jaeger-enabled" . }}
topicSinks:
- topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-http-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement
typeVersion: 1.0.0
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
ssl:
enabled: false
+
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-http-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/HttpParticipantParameters.yaml"
+fi
+
+echo "Policy clamp HTTP participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-http-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-http-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-http-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============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.
release: release
heritage: Helm
data:
-{{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*.{xml,yaml,sh}").AsConfig . | indent 2 }}
{{/*
# ============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.
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/http-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/HttpParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-http-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-http-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-http-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-http-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 8084
name: http-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-http-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/http-participant.sh
+ name: ac-http-ppnt-config
+ subPath: http-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
roles:
- read
+
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: http-ppnt
\ No newline at end of file
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: k8s-ppnt
autoconfigure:
exclude: >
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-k8s-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-k8s-ppnt
-
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-k8s-ppnt.jaeger-enabled" . }}
topicSinks:
-
topic: ${participant.intermediaryParameters.topics.operationTopic}
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-k8s-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement
typeVersion: 1.0.0
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
enabled: false
# Permitted list of helm repositories. Values are updated from values.yaml
+
+
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-k8s-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/KubernetesParticipantParameters.yaml"
+fi
+
+echo "Policy clamp Kubernetes participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-k8s-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-k8s-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-k8s-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============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.
imagePullPolicy: {{ .Values.global.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/kubernetes-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/KubernetesParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-k8s-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-k8s-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-k8s-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-k8s-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 8083
name: http-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-k8s-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/kubernetes-participant.sh
+ name: ac-k8s-ppnt-config
+ subPath: kubernetes-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
protocols:
- http
- https
+
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: k8s-ppnt
\ No newline at end of file
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: kserve-ppnt
cloud:
kubernetes:
enabled: false
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
fetchTimeout: 15000
+ allowTracing: {{ include "policy-clamp-ac-kserve-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-kserve-ppnt
- topic: ${participant.intermediaryParameters.topics.syncTopic}
servers:
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
+ allowTracing: {{ include "policy-clamp-ac-kserve-ppnt.jaeger-enabled" . }}
fetchTimeout: 15000
topicSinks:
- topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
+ allowTracing: {{ include "policy-clamp-ac-kserve-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.KserveAutomationCompositionElement
grace-period: 10
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
enabled: false
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-kserve-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/KserveParticipantParameters.yaml"
+fi
+
+echo "Policy clamp Kserve participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-kserve-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-kserve-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-kserve-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============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.
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
heritage: Helm
data:
-{{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/*.{xml,yaml,sh}").AsConfig . | indent 2 }}
\ No newline at end of file
{{/*
# ============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.
imagePullPolicy: {{ .Values.global.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/kserve-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/KserveParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-kserve-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-kserve-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-kserve-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-kserve-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 8087
name: kserve-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-kserve-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/kserve-participant.sh
+ name: ac-kserve-ppnt-config
+ subPath: kserve-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
nameOverride: policy-clamp-ac-kserve-ppnt
roles:
- create
+
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: kserve-ppnt
\ No newline at end of file
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: pf-ppnt
autoconfigure:
exclude: >
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-pf-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-pf-ppnt
-
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-pf-ppnt.jaeger-enabled" . }}
topicSinks:
-
topic: ${participant.intermediaryParameters.topics.operationTopic}
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-pf-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
typeVersion: 1.0.0
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
context-path: /onap/policyparticipant
ssl:
enabled: false
+
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-pf-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/PolicyParticipantParameters.yaml"
+fi
+
+echo "Policy clamp policy participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-pf-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-pf-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-pf-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============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.
release: RELEASE
heritage: Helm
data:
-{{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*.{xml,yaml,sh}").AsConfig . | indent 2 }}
{{/*
# ============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.
imagePullPolicy: {{ .Values.global.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/policy-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/PolicyParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-pf-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-pf-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-pf-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-pf-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 6969
name: http-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-pf-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/policy-participant.sh
+ name: ac-pf-ppnt-config
+ subPath: policy-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
roles:
- read
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: policy-ppnt
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: sim-ppnt
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-sim-ppnt.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-ac-sim-ppnt
- topic: ${participant.intermediaryParameters.topics.syncTopic}
topicCommInfrastructure: kafka
fetchTimeout: 15000
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-sim-ppnt.jaeger-enabled" . }}
topicSinks:
- topic: ${participant.intermediaryParameters.topics.operationTopic}
servers:
- "{{ .Values.global.kafkaServer }}:9092"
topicCommInfrastructure: kafka
useHttps: false
+ allowTracing: {{ include "policy-clamp-ac-sim-ppnt.jaeger-enabled" . }}
participantSupportedElementTypes:
-
typeName: org.onap.policy.clamp.acm.SimAutomationCompositionElement
typeVersion: 1.0.0
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
context-path: /onap/policy/simparticipant
ssl:
enabled: false
+
+tracing:
+ enabled: {{ .Values.jaeger.enabled }}
+ exporter:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ include "policy-clamp-ac-sim-ppnt.exporter-port" . }}
+ protocol: {{ .Values.jaeger.collector.protocol }}
+ sampler:
+ jaeger-remote:
+ endpoint: {{ .Values.jaeger.collector.host }}:{{ .Values.jaeger.collector.portJaegerGrpc }}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/SimulatorParticipantParameters.yaml"
+fi
+
+echo "Policy clamp Simulator participant 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/
+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}" \
+ -Dotel.java.global-autoconfigure.enabled=true \
+ -jar /app/app.jar \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-ac-sim-ppnt.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-ac-sim-ppnt.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-ac-sim-ppnt.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
release: release
heritage: Helm
data:
-{{ tpl (.Files.Glob "resources/config/*.{xml,yaml}").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*.{xml,yaml,sh}").AsConfig . | indent 2 }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command: ["/opt/app/policy/clamp/bin/sim-participant.sh"]
args: ["/opt/app/policy/clamp/etc/mounted/SimulatorParticipantParameters.yaml"]
+ {{- $jaegerEnabled := tpl "policy-clamp-ac-sim-ppnt.jaeger-enabled" . | trimSuffix "\n" -}}
+ {{- if $jaegerEnabled }}
+ env:
+ - name: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-ac-sim-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ value: {{ include "policy-clamp-ac-sim-ppnt.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_ENDPOINT
+ value: {{ printf "%s:%s" (.Values.jaeger.collector.host) (include "policy-clamp-ac-sim-ppnt.exporter-port" .) }}
+ {{- end }}
ports:
- containerPort: 6969
name: http-api
readOnly: true
- mountPath: /opt/app/policy/clamp/etc/mounted
name: ac-sim-ppnt-config-processed
+ - mountPath: /opt/app/policy/clamp/bin/sim-participant.sh
+ name: ac-sim-ppnt-config
+ subPath: sim-participant.sh
resources:
{{ toYaml .Values.resources.small | indent 12 }}
{{- if .Values.nodeSelector }}
roles:
- read
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: sim-ppnt
+
# ============LICENSE_END=========================================================
spring:
+ application:
+ name: {{ .Values.applicationName }}
security:
user:
name: ${RUNTIME_USER}
topicCommInfrastructure: kafka
useHttps: false
fetchTimeout: 15000
+ allowTracing: {{ include "policy-clamp-runtime-acm.jaeger-enabled" . }}
additionalProps:
group.id: policy-clamp-runtime-acm
topicSinks:
- {{ .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 }}
management:
+ tracing:
+ propagation:
+ produce: [{{ .Values.jaeger.producer.type }}]
+ sampling:
+ probability: {{ .Values.jaeger.sampling.probability }}
endpoints:
web:
base-path: /
exposure:
include: health, metrics, prometheus
+
+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 }}
\ No newline at end of file
--- /dev/null
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============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/
+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 \
+ -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 \
+ --spring.config.location="${CONFIG_FILE}"
--- /dev/null
+{{/*
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+*/}}
+
+{{/*
+This helper defines which exporter port must be used depending on protocol
+*/}}
+{{- define "policy-clamp-runtime-acm.exporter-port" }}
+ {{- $jaegerExporterPort := .Values.jaeger.collector.portOtlpGrpc -}}
+ {{- if .Values.jaeger.collector.protocol -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $jaegerExporterPort = .Values.jaeger.collector.portOtlpHttp -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerExporterPort -}}
+{{- end -}}
+
+{{/*
+This helper defines whether Jaeger is enabled or not.
+*/}}
+{{- define "policy-clamp-runtime-acm.jaeger-enabled" }}
+ {{- $jaegerEnabled := "false" -}}
+ {{- if .Values.jaeger -}}
+ {{- if .Values.jaeger.enabled -}}
+ {{- $jaegerEnabled = .Values.jaeger.enabled -}}
+ {{- end -}}
+ {{- end -}}
+ {{- $jaegerEnabled -}}
+{{- end -}}
+
+{{/*
+This helper defines whether jaeger is using http or grpc protocol
+*/}}
+{{- define "policy-clamp-runtime-acm.jaeger-protocol" }}
+ {{- $protocol := "grpc" -}}
+ {{- if eq .Values.jaeger.collector.protocol "http" -}}
+ {{- $protocol = "http/protobuf" -}}
+ {{- end -}}
+ {{- $protocol -}}
+{{- end -}}
\ No newline at end of file
{{/*
# ============LICENSE_START=======================================================
-# Copyright (C) 2022 Nordix Foundation. All rights reserved.
+# Copyright (C) 2022-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.
{{- end }}
{{- end }}
data:
-{{ tpl (.Files.Glob "resources/config/*.{json,xml,yaml}").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/*.{json,xml,yaml,sh}").AsConfig . | indent 2 }}
{{/*
# ============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.
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: OTEL_SERVICE_NAME
+ value: {{ .Values.applicationName }}
+ - name: OTEL_EXPORTER_OTLP_PROTOCOL
+ value: {{ include "policy-clamp-runtime-acm.jaeger-protocol" . }}
+ - name: OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
+ 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" .) }}
+ {{- end }}
ports:
- containerPort: {{ .Values.service.ports.port }}
name: http-api
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 }}
customNaming:
toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement
toscaCompositionName: org.onap.policy.clamp.acm.AutomationComposition
+
+
+jaeger:
+ service:
+ name: jaeger
+ enabled: true
+ sampling:
+ probability: "1.0"
+ producer:
+ type: B3,W3C,B3_MULTI
+ collector:
+ protocol: grpc
+ host: "http://jaeger"
+ portOtlpGrpc: 4317
+ portOtlpHttp: 4318
+ portJaegerGrpc: 14250
+
+applicationName: acm-r
\ No newline at end of file
policy-clamp-ac-k8s-ppnt:
enabled: false
policy-clamp-runtime-acm:
- enabled: false
+ enabled: true
policy-apex-pdp:
enabled: false
policy-clamp-ac-pf-ppnt:
enabled: false
policy-clamp-ac-a1pms-ppnt:
enabled: false
-
+jaeger:
+ enabled: false
+ fullnameOverride: jaeger
+ enableHttpOpenTelemetryCollector: true
#################################################################
# DB configuration defaults.
#################################################################