aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components/aai-babel
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/aai/components/aai-babel')
-rw-r--r--kubernetes/aai/components/aai-babel/Chart.yaml2
-rw-r--r--kubernetes/aai/components/aai-babel/resources/config/application.properties4
-rw-r--r--kubernetes/aai/components/aai-babel/resources/config/logback.xml2
-rw-r--r--kubernetes/aai/components/aai-babel/templates/deployment.yaml30
-rw-r--r--kubernetes/aai/components/aai-babel/templates/servicemonitor.yaml3
-rw-r--r--kubernetes/aai/components/aai-babel/values.yaml42
6 files changed, 75 insertions, 8 deletions
diff --git a/kubernetes/aai/components/aai-babel/Chart.yaml b/kubernetes/aai/components/aai-babel/Chart.yaml
index 447b59f573..50a7c24ee0 100644
--- a/kubernetes/aai/components/aai-babel/Chart.yaml
+++ b/kubernetes/aai/components/aai-babel/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: Babel microservice
name: aai-babel
-version: 13.0.0
+version: 14.0.2
dependencies:
- name: common
diff --git a/kubernetes/aai/components/aai-babel/resources/config/application.properties b/kubernetes/aai/components/aai-babel/resources/config/application.properties
index 96f1a3eb89..56560d5cb2 100644
--- a/kubernetes/aai/components/aai-babel/resources/config/application.properties
+++ b/kubernetes/aai/components/aai-babel/resources/config/application.properties
@@ -1,7 +1,7 @@
{{/*
# Copyright © 2018 Amdocs, Bell Canada, AT&T
# Copyright © 2021 Orange
-# Modifications Copyright © 2023 Nordix Foundation
+# Modifications Copyright � 2023 Nordix Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,3 +23,5 @@ spring.main.allow-bean-definition-overriding=true
server.servlet.context-path=/services/babel-service
logging.config=${CONFIG_HOME}/logback.xml
tosca.mappings.config=${CONFIG_HOME}/tosca-mappings.json
+
+management.endpoints.web.exposure.include=*
diff --git a/kubernetes/aai/components/aai-babel/resources/config/logback.xml b/kubernetes/aai/components/aai-babel/resources/config/logback.xml
index 125731cf6e..686423b31f 100644
--- a/kubernetes/aai/components/aai-babel/resources/config/logback.xml
+++ b/kubernetes/aai/components/aai-babel/resources/config/logback.xml
@@ -131,7 +131,7 @@
<!-- This determines the logging level for 3rd party code -->
<!-- ============================================================================ -->
- <root level="INFO">
+ <root level={{ .Values.log.level.root | upper | quote }}>
<appender-ref ref="asyncEELF" />
<appender-ref ref="asyncEELFDebug" />
<appender-ref ref="AsyncSysOut" />
diff --git a/kubernetes/aai/components/aai-babel/templates/deployment.yaml b/kubernetes/aai/components/aai-babel/templates/deployment.yaml
index 24d34e861c..f3fc04c00c 100644
--- a/kubernetes/aai/components/aai-babel/templates/deployment.yaml
+++ b/kubernetes/aai/components/aai-babel/templates/deployment.yaml
@@ -22,7 +22,12 @@ kind: Deployment
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
selector: {{- include "common.selectors" . | nindent 4 }}
+ {{- if .Values.debug.enabled }}
+ replicas: 1
+ {{- else }}
replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
strategy:
type: {{ .Values.updateStrategy.type }}
{{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
@@ -37,10 +42,19 @@ spec:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports: {{ include "common.containerPorts" . | nindent 12 }}
- # disable liveness probe when breakpoints set in debugger
- # so K8s doesn't restart unresponsive container
- {{ if .Values.liveness.enabled }}
+ ports:
+ {{- if .Values.debug.enabled }}
+ - containerPort: {{ .Values.debug.port }}
+ name: {{ .Values.debug.portName }}
+ {{- end }}
+ {{- if .Values.profiling.enabled }}
+ - containerPort: {{ .Values.profiling.port }}
+ name: {{ .Values.profiling.portName }}
+ {{- end }}
+ {{ include "common.containerPorts" . | nindent 12 }}
+ # disable liveness probe when
+ # debugging.enabled=true or profiling.enabled=true
+ {{- if and .Values.liveness.enabled (not (or .Values.debug.enabled .Values.profiling.enabled)) }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
@@ -57,6 +71,14 @@ spec:
value: NotUsed
- name: CONFIG_HOME
value: /opt/app/babel/config
+ {{- if .Values.profiling.enabled }}
+ - name: JVM_OPTS
+ value: '{{ join " " .Values.profiling.args }}'
+ {{- end }}
+ {{- if .Values.debug.enabled }}
+ - name: JVM_OPTS
+ value: {{ .Values.debug.args | quote }}
+ {{- end }}
volumeMounts:
- mountPath: /opt/app/babel/config/application.properties
name: config
diff --git a/kubernetes/aai/components/aai-babel/templates/servicemonitor.yaml b/kubernetes/aai/components/aai-babel/templates/servicemonitor.yaml
new file mode 100644
index 0000000000..dc706029bf
--- /dev/null
+++ b/kubernetes/aai/components/aai-babel/templates/servicemonitor.yaml
@@ -0,0 +1,3 @@
+{{- if .Values.metrics.serviceMonitor.enabled }}
+{{ include "common.serviceMonitor" . }}
+{{- end }}
diff --git a/kubernetes/aai/components/aai-babel/values.yaml b/kubernetes/aai/components/aai-babel/values.yaml
index e058d82e46..54f8c5ea98 100644
--- a/kubernetes/aai/components/aai-babel/values.yaml
+++ b/kubernetes/aai/components/aai-babel/values.yaml
@@ -25,7 +25,7 @@ global: {}
#################################################################
# application image
-image: onap/babel:1.12.3
+image: onap/babel:1.13.3
flavor: small
flavorOverride: small
@@ -33,6 +33,9 @@ flavorOverride: small
# default number of instances
replicaCount: 1
+# number of ReplicaSets that should be retained for the Deployment
+revisionHistoryLimit: 2
+
updateStrategy:
type: RollingUpdate
maxUnavailable: 0
@@ -95,6 +98,41 @@ resources:
memory: "2Gi"
unlimited: {}
+tracing:
+ collector:
+ baseUrl: http://jaeger-collector.istio-system:9411
+ sampling:
+ probability: 1.0 # percentage of requests that are sampled (between 0-1/0%-100%)
+
+# adds jvm args for remote debugging the application
+debug:
+ enabled: false
+ args: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
+ port: 5005
+ portName: debug
+
+# adds jvm args for remote profiling the application
+profiling:
+ enabled: false
+ args:
+ - "-Dcom.sun.management.jmxremote"
+ - "-Dcom.sun.management.jmxremote.ssl=false"
+ - "-Dcom.sun.management.jmxremote.authenticate=false"
+ - "-Dcom.sun.management.jmxremote.local.only=false"
+ - "-Dcom.sun.management.jmxremote.port=9999"
+ - "-Dcom.sun.management.jmxremote.rmi.port=9999"
+ - "-Djava.rmi.server.hostname=127.0.0.1"
+ port: 9999
+ portName: jmx
+
+metrics:
+ serviceMonitor:
+ enabled: true
+ targetPort: 9516
+ path: /services/babel-service/actuator/prometheus
+ basicAuth:
+ enabled: false
+
#Pods Service Account
serviceAccount:
nameOverride: aai-babel
@@ -104,4 +142,6 @@ serviceAccount:
#Log configuration
log:
path: /var/log/onap
+ level:
+ root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'