[AAI] Add model-loader tracing config 03/137603/7
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Thu, 28 Mar 2024 07:41:55 +0000 (08:41 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Wed, 17 Apr 2024 12:56:52 +0000 (14:56 +0200)
- mount application.properties file that is used by Spring [1]
- add tracing config to that file
- deploy model-loader version 1.13.5

[1] this is also a prerequisite for replacing the model-loader.properties file
that is loaded by the service via some custom logic.
Spring does this out of the box for application-*.properties files.
Issue-ID: AAI-3812
Change-Id: I0a101fd246b8313f90cfc3ebca5a65dae769d3d6
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
kubernetes/aai/components/aai-modelloader/resources/application.properties [new file with mode: 0644]
kubernetes/aai/components/aai-modelloader/templates/configmap.yaml
kubernetes/aai/components/aai-modelloader/templates/deployment.yaml
kubernetes/aai/components/aai-modelloader/values.yaml

diff --git a/kubernetes/aai/components/aai-modelloader/resources/application.properties b/kubernetes/aai/components/aai-modelloader/resources/application.properties
new file mode 100644 (file)
index 0000000..f910af1
--- /dev/null
@@ -0,0 +1,31 @@
+# Note that the start.sh script sets the following System Properties
+# We provide default values here for testing purposes
+AJSC_HOME=.
+CONFIG_HOME=appconfig-local
+com.att.eelf.logging.path=src/main/resources
+com.att.eelf.logging.file=logback.xml
+logback.configurationFile=${com.att.eelf.logging.path}/${com.att.eelf.logging.file}
+
+server.port=9500
+#server.ssl.key-store=
+#server.ssl.key-store-password=
+#server.ssl.keyStoreType=
+#server.ssl.keyAlias=
+
+spring.application.name=aai-model-loader
+
+spring.sleuth.enabled={{ .Values.tracing.enabled }}
+spring.zipkin.baseUrl={{ .Values.tracing.collector.baseUrl }}
+spring.sleuth.messaging.jms.enabled=false
+spring.sleuth.trace-id128=true
+spring.sleuth.sampler.probability={{ .Values.tracing.sampling.probability }}
+spring.sleuth.propagation.type=w3c,b3
+spring.sleuth.supports-join=false
+spring.sleuth.web.skip-pattern={{ join "," .Values.tracing.ignorePatterns }}
+
+server.tomcat.threads.max=200
+# The minimum number of threads always kept alive
+server.tomcat.threads.min-spare=25
+
+# Spring Boot logging
+logging.config=${logback.configurationFile}
index 534fd02..d3fd509 100644 (file)
@@ -26,6 +26,7 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/model-loader.properties").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/application.properties").AsConfig . | indent 2 }}
 ---
 apiVersion: v1
 kind: ConfigMap
index 139c254..8dee92f 100644 (file)
@@ -80,6 +80,9 @@ spec:
         - mountPath: /opt/app/model-loader/config/model-loader.properties
           subPath: model-loader.properties
           name: prop-config
+        - mountPath: /opt/app/model-loader/application.properties
+          subPath: application.properties
+          name: prop-config
         - mountPath: {{ .Values.log.path }}
           name: logs
         - mountPath: /opt/app/model-loader/logback.xml
index aa62f60..ab3d864 100644 (file)
@@ -21,7 +21,7 @@ global: # global defaults
   nodePortPrefix: 302
 
 # application image
-image: onap/model-loader:1.12.0
+image: onap/model-loader:1.13.6
 pullPolicy: Always
 restartPolicy: Always
 flavor: small
@@ -79,6 +79,15 @@ resources:
       memory: "2Gi"
   unlimited: {}
 
+tracing:
+  enabled: true
+  collector:
+    baseUrl: http://jaeger-collector.istio-system:9411
+  sampling:
+    probability: 1.0 # percentage of requests that are sampled (between 0-1/0%-100%)
+  ignorePatterns:
+    - /aai/util.*
+
 #Pods Service Account
 serviceAccount:
   nameOverride: aai-modelloader