aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/aai/components')
-rw-r--r--kubernetes/aai/components/aai-resources/templates/deployment.yaml15
-rw-r--r--kubernetes/aai/components/aai-resources/values.yaml21
-rw-r--r--kubernetes/aai/components/aai-traversal/templates/deployment.yaml16
-rw-r--r--kubernetes/aai/components/aai-traversal/values.yaml17
4 files changed, 69 insertions, 0 deletions
diff --git a/kubernetes/aai/components/aai-resources/templates/deployment.yaml b/kubernetes/aai/components/aai-resources/templates/deployment.yaml
index 626dc71506..54097faf6d 100644
--- a/kubernetes/aai/components/aai-resources/templates/deployment.yaml
+++ b/kubernetes/aai/components/aai-resources/templates/deployment.yaml
@@ -141,6 +141,14 @@ spec:
value: {{ $value | quote}}
{{- end }}
{{- end }}
+ {{- if .Values.config.profiling.enabled }}
+ - name: PRE_JVM_ARGS
+ value: '{{ join " " .Values.config.profiling.args }}'
+ {{- end }}
+ {{- if .Values.config.debug.enabled }}
+ - name: POST_JVM_ARGS
+ value: {{ .Values.config.debug.args | quote }}
+ {{- end }}
- name: LOCAL_USER_ID
value: {{ .Values.global.config.userId | quote }}
- name: LOCAL_GROUP_ID
@@ -184,10 +192,17 @@ spec:
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.portName }}
+ {{- if .Values.config.debug.enabled }}
- containerPort: {{ .Values.service.internalPort2 }}
name: {{ .Values.service.portName2 }}
+ {{- end }}
- containerPort: {{ .Values.service.internalPort3 }}
name: {{ .Values.service.portName3 }}
+ {{- if .Values.config.profiling.enabled }}
+ - containerPort: {{ .Values.service.internalPort4 }}
+ name: {{ .Values.service.portName4 }}
+ {{- end }}
+
lifecycle:
# wait for active requests (long-running tasks) to be finished
# Before the SIGTERM is invoked, Kubernetes exposes a preStop hook in the Pod.
diff --git a/kubernetes/aai/components/aai-resources/values.yaml b/kubernetes/aai/components/aai-resources/values.yaml
index e8bbb37140..cf8d17ba2b 100644
--- a/kubernetes/aai/components/aai-resources/values.yaml
+++ b/kubernetes/aai/components/aai-resources/values.yaml
@@ -193,6 +193,27 @@ config:
MAX_HEAP_SIZE: "1024m"
MAX_METASPACE_SIZE: "512m"
+ # adds jvm args for remote debugging the application
+ debug:
+ enabled: false
+ args: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
+
+ # adds jvm args for remote profiling the application
+ # port-forward, i.e:
+ # $ PODNAME=traversal
+ # $ kubectl -n ${NAMESPACE:=onap} port-forward pod/$(kubectl -n ${NAMESPACE:=onap}
+ # get pods | awk '{print $1}' | grep -m1 -e "$PODNAME") 9999:9999
+ 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"
+
nodeSelector: {}
affinity: {}
diff --git a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
index 9a61841e67..8f52fe26df 100644
--- a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
+++ b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
@@ -160,6 +160,14 @@ spec:
value: {{ $value | quote}}
{{- end }}
{{- end }}
+ {{- if .Values.config.profiling.enabled }}
+ - name: PRE_JVM_ARGS
+ value: '{{ join " " .Values.config.profiling.args }}'
+ {{- end }}
+ {{- if .Values.config.debug.enabled }}
+ - name: POST_JVM_ARGS
+ value: {{ .Values.config.debug.args | quote }}
+ {{- end }}
- name: DISABLE_UPDATE_QUERY
value: {{ .Values.config.disableUpdateQuery | quote }}
- name: LOCAL_USER_ID
@@ -207,10 +215,18 @@ spec:
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.portName }}
+
+ {{- if .Values.config.debug.enabled }}
- containerPort: {{ .Values.service.internalPort2 }}
name: {{ .Values.service.portName2 }}
+ {{- end }}
- containerPort: {{ .Values.service.internalPort3 }}
name: {{ .Values.service.portName3 }}
+ {{- if .Values.config.profiling.enabled }}
+ - containerPort: {{ .Values.service.internalPort4 }}
+ name: {{ .Values.service.portName4 }}
+ {{- end }}
+
lifecycle:
# wait for active requests (long-running tasks) to be finished
# Before the SIGTERM is invoked, Kubernetes exposes a preStop hook in the Pod.
diff --git a/kubernetes/aai/components/aai-traversal/values.yaml b/kubernetes/aai/components/aai-traversal/values.yaml
index 08b956d8e1..a1c383e522 100644
--- a/kubernetes/aai/components/aai-traversal/values.yaml
+++ b/kubernetes/aai/components/aai-traversal/values.yaml
@@ -183,6 +183,23 @@ config:
MAX_HEAP_SIZE: "1024m"
MAX_METASPACE_SIZE: "512m"
+ # adds jvm args for remote debugging the application
+ debug:
+ enabled: false
+ args: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
+
+ # 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"
+
# Disables the updateQueryData script to run as part of traversal
disableUpdateQuery: true