diff options
Diffstat (limited to 'kubernetes/aai/components/aai-schema-service')
4 files changed, 64 insertions, 27 deletions
diff --git a/kubernetes/aai/components/aai-schema-service/Chart.yaml b/kubernetes/aai/components/aai-schema-service/Chart.yaml index 4d8fea753b..47064859d5 100644 --- a/kubernetes/aai/components/aai-schema-service/Chart.yaml +++ b/kubernetes/aai/components/aai-schema-service/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP AAI Schema Service name: aai-schema-service -version: 14.0.0 +version: 14.0.2 dependencies: - name: common diff --git a/kubernetes/aai/components/aai-schema-service/templates/deployment.yaml b/kubernetes/aai/components/aai-schema-service/templates/deployment.yaml index 0ecc2b2d80..d4041bed57 100644 --- a/kubernetes/aai/components/aai-schema-service/templates/deployment.yaml +++ b/kubernetes/aai/components/aai-schema-service/templates/deployment.yaml @@ -35,6 +35,7 @@ metadata: heritage: {{ .Release.Service }} spec: replicas: {{ .Values.replicaCount }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} strategy: type: {{ .Values.updateStrategy.type }} {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }} @@ -69,6 +70,14 @@ spec: value: {{ .Values.securityContext.user_id | quote }} - name: LOCAL_GROUP_ID value: {{ .Values.securityContext.group_id | quote }} + {{- if .Values.profiling.enabled }} + - name: PRE_JVM_ARGS + value: '{{ join " " .Values.profiling.args }}' + {{- end }} + {{- if .Values.debug.enabled }} + - name: POST_JAVA_OPTS + value: {{ .Values.debug.args | quote }} + {{- end }} volumeMounts: - mountPath: /opt/app/aai-schema-service/resources/etc/appprops/aaiconfig.properties name: aaiconfig-conf @@ -88,22 +97,28 @@ spec: name: springapp-conf subPath: application.properties ports: - - containerPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - - containerPort: {{ .Values.service.internalPort2 }} - name: {{ .Values.service.portName2 }} - # disable liveness probe when breakpoints set in debugger - # so K8s doesn't restart unresponsive container - {{ if .Values.liveness.enabled }} + - containerPort: {{ .Values.service.appPort }} + name: {{ .Values.service.appPortName }} + {{- if .Values.debug.enabled }} + - containerPort: {{ .Values.service.debugPort }} + name: {{ .Values.service.debugPortName }} + {{- end }} + {{- if .Values.profiling.enabled }} + - containerPort: {{ .Values.service.profilingPort }} + name: {{ .Values.service.profilingPortName }} + {{- end }} + # 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 }} + port: {{ .Values.service.appPort }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end }} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.service.appPort }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: {{ include "common.resources" . | nindent 10 }} diff --git a/kubernetes/aai/components/aai-schema-service/templates/service.yaml b/kubernetes/aai/components/aai-schema-service/templates/service.yaml index 79f01d6638..412b62c6fe 100644 --- a/kubernetes/aai/components/aai-schema-service/templates/service.yaml +++ b/kubernetes/aai/components/aai-schema-service/templates/service.yaml @@ -29,21 +29,21 @@ spec: type: {{ .Values.service.type }} ports: {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.internalPort }} + - port: {{ .Values.service.appPort }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - targetPort: {{ .Values.service.portName }} - - port: {{ .Values.service.internalPort2 }} + name: {{ .Values.service.appPortName }} + targetPort: {{ .Values.service.appPortName }} + - port: {{ .Values.service.debugPort }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} - name: {{ .Values.service.portName2 }} - targetPort: {{ .Values.service.portName2 }} + name: {{ .Values.service.debugPortName }} + targetPort: {{ .Values.service.debugPortName }} {{- else -}} - - port: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - targetPort: {{ .Values.service.portName }} - - port: {{ .Values.service.internalPort2 }} - name: {{ .Values.service.portName2 }} - targetPort: {{ .Values.service.portName2 }} + - port: {{ .Values.service.appPort }} + name: {{ .Values.service.appPortName }} + targetPort: {{ .Values.service.appPortName }} + - port: {{ .Values.service.debugPort }} + name: {{ .Values.service.debugPortName }} + targetPort: {{ .Values.service.debugPortName }} {{- end }} selector: app: {{ include "common.name" . }} diff --git a/kubernetes/aai/components/aai-schema-service/values.yaml b/kubernetes/aai/components/aai-schema-service/values.yaml index d55be5369c..12dfaea091 100644 --- a/kubernetes/aai/components/aai-schema-service/values.yaml +++ b/kubernetes/aai/components/aai-schema-service/values.yaml @@ -60,13 +60,33 @@ global: # global defaults label: v12 # application image -image: onap/aai-schema-service:1.12.4 +image: onap/aai-schema-service:1.12.5 pullPolicy: Always restartPolicy: Always flavorOverride: small # default number of instances replicaCount: 1 +# 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" + +# number of ReplicaSets that should be retained for the Deployment +revisionHistoryLimit: 2 + updateStrategy: type: RollingUpdate maxUnavailable: 0 @@ -90,10 +110,12 @@ readiness: service: type: ClusterIP - portName: http - internalPort: 8452 - portName2: tcp-5005 - internalPort2: 5005 + appPortName: http + appPort: 8452 + debugPortName: tcp-5005 + debugPort: 5005 + profilingPortName: jmx-9999 + profilingPort: 9999 ingress: enabled: false |