aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/components/aai-traversal/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/aai/components/aai-traversal/templates')
-rw-r--r--kubernetes/aai/components/aai-traversal/templates/deployment.yaml45
-rw-r--r--kubernetes/aai/components/aai-traversal/templates/service.yaml38
2 files changed, 42 insertions, 41 deletions
diff --git a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
index 67e1b996e3..e86a25ecad 100644
--- a/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
+++ b/kubernetes/aai/components/aai-traversal/templates/deployment.yaml
@@ -1,8 +1,8 @@
{{/*
-# Copyright (c) 2017 Amdocs, Bell Canada
-# Modifications Copyright (c) 2018 AT&T
-# Modifications Copyright (c) 2020 Nokia, Orange
-# Modifications Copyright (c) 2021 Orange
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+# Modifications Copyright © 2020 Nokia, Orange
+# Modifications Copyright © 2021 Orange
# Modifications Copyright © 2023 Nordix Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,6 +36,7 @@ metadata:
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
minReadySeconds: {{ .Values.minReadySeconds }}
strategy:
type: {{ .Values.updateStrategy.type }}
@@ -178,11 +179,11 @@ spec:
- name: LOCAL_GROUP_ID
value: {{ .Values.global.config.groupId | quote }}
- name: INTERNAL_PORT_1
- value: {{ .Values.service.internalPort | quote }}
+ value: {{ .Values.service.traversalPort | quote }}
- name: INTERNAL_PORT_2
- value: {{ .Values.service.internalPort2 | quote }}
+ value: {{ .Values.service.debugPort | quote }}
- name: INTERNAL_PORT_3
- value: {{ .Values.service.internalPort3 | quote }}
+ value: {{ .Values.service.metricsPort | quote }}
- name: BOOTSTRAP_SERVERS
value: {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
- name: JAAS_CONFIG
@@ -220,20 +221,18 @@ spec:
name: {{ include "common.fullname" . }}-config
subPath: application-keycloak.properties
ports:
- - containerPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}
-
+ - containerPort: {{ .Values.service.traversalPort }}
+ name: {{ .Values.service.traversalPortName }}
{{- if .Values.config.debug.enabled }}
- - containerPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.portName2 }}
+ - containerPort: {{ .Values.service.debugPort }}
+ name: {{ .Values.service.debugPortName }}
{{- end }}
- - containerPort: {{ .Values.service.internalPort3 }}
- name: {{ .Values.service.portName3 }}
+ - containerPort: {{ .Values.service.metricsPort }}
+ name: {{ .Values.service.metricsPortName }}
{{- if .Values.config.profiling.enabled }}
- - containerPort: {{ .Values.service.internalPort4 }}
- name: {{ .Values.service.portName4 }}
+ - containerPort: {{ .Values.service.profilingPort }}
+ name: {{ .Values.service.profilingPortName }}
{{- 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.
@@ -243,16 +242,16 @@ spec:
- sh
- -c
- |
- while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1 -e $INTERNAL_PORT_2)
+ while (netstat -an | grep ESTABLISHED | grep -e $INTERNAL_PORT_1)
do sleep 10
done
- # disable liveness probe when breakpoints set in debugger
- # so K8s doesn't restart unresponsive container
- {{ if .Values.liveness.enabled }}
+ # disable liveness probe when
+ # debugging.enable=true or profiling.enabled=true
+ {{- if and .Values.liveness.enabled (not (or .Values.config.debug.enabled .Values.config.profiling.enabled)) }}
livenessProbe:
httpGet:
path: /aai/util/echo?action=checkDB
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.traversalPort }}
scheme: HTTP
httpHeaders:
- name: X-FromAppId
@@ -267,7 +266,7 @@ spec:
readinessProbe:
httpGet:
path: /aai/util/echo?action=checkDB
- port: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.traversalPort }}
scheme: HTTP
httpHeaders:
- name: X-FromAppId
diff --git a/kubernetes/aai/components/aai-traversal/templates/service.yaml b/kubernetes/aai/components/aai-traversal/templates/service.yaml
index 2fac1e5a42..49ed56306a 100644
--- a/kubernetes/aai/components/aai-traversal/templates/service.yaml
+++ b/kubernetes/aai/components/aai-traversal/templates/service.yaml
@@ -29,28 +29,30 @@ spec:
type: {{ .Values.service.type }}
ports:
{{if eq .Values.service.type "NodePort" -}}
- - port: {{ .Values.service.internalPort }}
+ - port: {{ .Values.service.traversalPort }}
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.traversalPortName }}
+ targetPort: {{ .Values.service.traversalPortName }}
+ - port: {{ .Values.service.debugPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName2 }}
- targetPort: {{ .Values.service.portName2 }}
- - port: {{ .Values.service.internalPort3 }}
+ name: {{ .Values.service.debugPortName }}
+ targetPort: {{ .Values.service.debugPortName }}
+ - port: {{ .Values.service.metricsPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }}
- name: {{ .Values.service.portName3 }}
- targetPort: {{ .Values.service.portName3 }}
+ name: {{ .Values.service.metricsPortName }}
+ targetPort: {{ .Values.service.metricsPortName }}
{{- 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.internalPort3 }}
- name: {{ .Values.service.portName3 }}
- targetPort: {{ .Values.service.portName3 }}
+ - port: {{ .Values.service.traversalPort }}
+ name: {{ .Values.service.traversalPortName }}
+ targetPort: {{ .Values.service.traversalPortName }}
+ {{- if .Values.config.debug.enabled }}
+ - port: {{ .Values.service.debugPort }}
+ name: {{ .Values.service.debugPortName }}
+ targetPort: {{ .Values.service.debugPortName }}
+ {{- end }}
+ - port: {{ .Values.service.metricsPort }}
+ name: {{ .Values.service.metricsPortName }}
+ targetPort: {{ .Values.service.metricsPortName }}
{{- end }}
selector:
app: {{ include "common.name" . }}