aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2025-02-10 07:58:46 +0000
committerGerrit Code Review <gerrit@onap.org>2025-02-10 07:58:46 +0000
commitd2b2fd0afd97799ae0340420afae3279cd680bb0 (patch)
tree8506927719a3d986b27f349b26adab9e9105193e
parent345a183046800fc631e4d309d80632c5c00121d1 (diff)
parentcda490ba0cd7a415d3d32b17e0169c2905dee83c (diff)
Merge "Integrate Scalability Changes in SDC"HEADmaster
-rw-r--r--kubernetes/sdc/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-be/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-fe/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/combined-liveness.sh28
-rw-r--r--kubernetes/sdc/components/sdc-fe/templates/autoscaling.yaml32
-rw-r--r--kubernetes/sdc/components/sdc-fe/templates/configmap.yaml9
-rw-r--r--kubernetes/sdc/components/sdc-fe/values.yaml22
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/autoscaling.yaml32
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml9
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/servicemonitor.yaml19
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/values.yaml25
-rw-r--r--kubernetes/sdc/components/sdc-wfd-be/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-wfd-be/templates/autoscaling.yaml32
-rw-r--r--kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml9
-rw-r--r--kubernetes/sdc/components/sdc-wfd-be/values.yaml18
-rw-r--r--kubernetes/sdc/components/sdc-wfd-fe/Chart.yaml2
-rw-r--r--kubernetes/sdc/components/sdc-wfd-fe/templates/autoscaling.yaml32
-rw-r--r--kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml9
-rw-r--r--kubernetes/sdc/components/sdc-wfd-fe/values.yaml18
20 files changed, 298 insertions, 8 deletions
diff --git a/kubernetes/sdc/Chart.yaml b/kubernetes/sdc/Chart.yaml
index e455d793e6..54b71b4794 100644
--- a/kubernetes/sdc/Chart.yaml
+++ b/kubernetes/sdc/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: Service Design and Creation Umbrella Helm charts
name: sdc
-version: 13.0.3
+version: 13.0.4
dependencies:
- name: common
diff --git a/kubernetes/sdc/components/sdc-be/Chart.yaml b/kubernetes/sdc/components/sdc-be/Chart.yaml
index a17a9d3b00..bb385a058e 100644
--- a/kubernetes/sdc/components/sdc-be/Chart.yaml
+++ b/kubernetes/sdc/components/sdc-be/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: ONAP Service Design and Creation Backend API
name: sdc-be
-version: 13.0.2
+version: 13.0.3
dependencies:
- name: common
diff --git a/kubernetes/sdc/components/sdc-fe/Chart.yaml b/kubernetes/sdc/components/sdc-fe/Chart.yaml
index 83197f3406..3f8ae42a3b 100644
--- a/kubernetes/sdc/components/sdc-fe/Chart.yaml
+++ b/kubernetes/sdc/components/sdc-fe/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: ONAP Service Design and Creation Front End
name: sdc-fe
-version: 13.0.2
+version: 13.0.3
dependencies:
- name: repositoryGenerator
diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/combined-liveness.sh b/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/combined-liveness.sh
new file mode 100644
index 0000000000..28ad30aef5
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/combined-liveness.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# Variables
+
+INTERNAL_PORT=8181
+HEALTHCHECK_URL="http://localhost:8181/sdc1/rest/healthCheck"
+
+# 1. TCP Socket Check for Internal Port
+
+nc -z localhost $INTERNAL_PORT
+TCP_STATUS=$?
+
+if [ $TCP_STATUS -ne 0 ]; then
+ echo "TCP check failed: Internal port $INTERNAL_PORT is not open."
+ exit 1
+fi
+
+# 2. Cassandra Health Check from API Response using jq
+
+CASSANDRA_STATUS=$(curl -s $HEALTHCHECK_URL | jq -r '.componentsInfo[] | select(.healthCheckComponent == "CASSANDRA") | .healthCheckStatus')
+
+if [ "$CASSANDRA_STATUS" != "UP" ]; then
+ echo "Cassandra API check failed: HealthCheck status is $CASSANDRA_STATUS, not UP."
+ exit 1
+fi
+
+echo "Liveness check passed: Internal port $INTERNAL_PORT is open, and Cassandra is healthy."
+exit 0
diff --git a/kubernetes/sdc/components/sdc-fe/templates/autoscaling.yaml b/kubernetes/sdc/components/sdc-fe/templates/autoscaling.yaml
new file mode 100644
index 0000000000..b7f265319b
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-fe/templates/autoscaling.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "common.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml b/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml
index 948a3fee99..1d4243e6fa 100644
--- a/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml
+++ b/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml
@@ -40,3 +40,12 @@ metadata:
heritage: {{ .Release.Service }}
data:
{{ tpl (.Files.Glob "resources/config/plugins/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-readiness-liveness-probe
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+data:
+{{ tpl (.Files.Glob "resources/config/readyProbe/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/sdc/components/sdc-fe/values.yaml b/kubernetes/sdc/components/sdc-fe/values.yaml
index 0079f83e6b..72c048cd48 100644
--- a/kubernetes/sdc/components/sdc-fe/values.yaml
+++ b/kubernetes/sdc/components/sdc-fe/values.yaml
@@ -57,7 +57,7 @@ affinity: {}
liveness:
initialDelaySeconds: 1
periodSeconds: 10
- timeoutSeconds: 15
+ timeoutSeconds: 30
successThreshold: 1
failureThreshold: 3
# necessary to disable liveness probe when setting breakpoints
@@ -67,7 +67,7 @@ liveness:
readiness:
initialDelaySeconds: 1
periodSeconds: 10
- timeoutSeconds: 15
+ timeoutSeconds: 30
successThreshold: 1
failureThreshold: 3
@@ -146,3 +146,21 @@ serviceAccount:
log:
path: /var/log/onap
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+autoscaling:
+ enabled: true
+ minReplicas: 1
+ maxReplicas: 3
+ targetCPUUtilizationPercentage: 75
+
+# number of ReplicaSets that should be retained for the Deployment
+revisionHistoryLimit: 1
+
+# the minimum number of seconds that a newly created Pod should be ready
+minReadySeconds: 30
+updateStrategy:
+ type: RollingUpdate
+ # The number of pods that can be unavailable during the update process
+ maxUnavailable: 0
+ # The number of pods that can be created above the desired amount of pods during an update
+ maxSurge: 1
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml b/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml
index afcbef20b1..a41f386b8d 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: ONAP Service Design and Creation Onboarding API
name: sdc-onboarding-be
-version: 13.0.2
+version: 13.0.3
dependencies:
- name: repositoryGenerator
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/autoscaling.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/autoscaling.yaml
new file mode 100644
index 0000000000..b7f265319b
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/autoscaling.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "common.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
index 47ae2bbfdd..744869736c 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
@@ -21,7 +21,16 @@ kind: Deployment
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
selector: {{- include "common.selectors" . | nindent 4 }}
+ {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+ minReadySeconds: {{ .Values.minReadySeconds }}
+ strategy:
+ type: {{ .Values.updateStrategy.type }}
+ rollingUpdate:
+ maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+ maxSurge: {{ .Values.updateStrategy.maxSurge }}
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/servicemonitor.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/servicemonitor.yaml
new file mode 100644
index 0000000000..937f5ef974
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/servicemonitor.yaml
@@ -0,0 +1,19 @@
+{{/*
+# Copyright © 2024 Deutsche Telekom AG
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{- if .Values.metrics.serviceMonitor.enabled }}
+{{ include "common.serviceMonitor" . }}
+{{- end }}
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
index a928e103d9..07e3bead35 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
@@ -210,3 +210,28 @@ permittedAncestors: ""
JETTY_BASE: "/app/jetty"
http_option: http_option
+autoscaling:
+ enabled: true
+ minReplicas: 1
+ maxReplicas: 3
+ targetCPUUtilizationPercentage: 75
+
+# number of ReplicaSets that should be retained for the Deployment
+revisionHistoryLimit: 1
+
+# the minimum number of seconds that a newly created Pod should be ready
+minReadySeconds: 30
+updateStrategy:
+ type: RollingUpdate
+ # The number of pods that can be unavailable during the update process
+ maxUnavailable: 0
+ # The number of pods that can be created above the desired amount of pods during an update
+ maxSurge: 1
+
+metrics:
+ serviceMonitor:
+ enabled: true
+ targetPort: 8081
+ path: /onboarding-api/v1.0/actuator/prometheus
+ basicAuth:
+ enabled: false
diff --git a/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml b/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml
index 8a1a8b34b9..ea2d0f2443 100644
--- a/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-be/Chart.yaml
@@ -17,7 +17,7 @@
apiVersion: v2
description: ONAP Service Design and Creation Workflow Designer backend
name: sdc-wfd-be
-version: 13.0.0
+version: 13.0.1
dependencies:
- name: repositoryGenerator
diff --git a/kubernetes/sdc/components/sdc-wfd-be/templates/autoscaling.yaml b/kubernetes/sdc/components/sdc-wfd-be/templates/autoscaling.yaml
new file mode 100644
index 0000000000..b7f265319b
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-wfd-be/templates/autoscaling.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "common.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml b/kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml
index 59ebb02675..cbbfe21a6d 100644
--- a/kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-be/templates/deployment.yaml
@@ -21,7 +21,16 @@ kind: Deployment
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
selector: {{- include "common.selectors" . | nindent 4 }}
+ {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+ minReadySeconds: {{ .Values.minReadySeconds }}
+ strategy:
+ type: {{ .Values.updateStrategy.type }}
+ rollingUpdate:
+ maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+ maxSurge: {{ .Values.updateStrategy.maxSurge }}
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
diff --git a/kubernetes/sdc/components/sdc-wfd-be/values.yaml b/kubernetes/sdc/components/sdc-wfd-be/values.yaml
index cc85176748..4d39ce02d5 100644
--- a/kubernetes/sdc/components/sdc-wfd-be/values.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-be/values.yaml
@@ -153,3 +153,21 @@ serviceAccount:
wait_for_job_container:
containers:
- '{{ include "common.name" . }}-job'
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 3
+ targetCPUUtilizationPercentage: 75
+
+# number of ReplicaSets that should be retained for the Deployment
+revisionHistoryLimit: 1
+
+# the minimum number of seconds that a newly created Pod should be ready
+minReadySeconds: 30
+updateStrategy:
+ type: RollingUpdate
+ # The number of pods that can be unavailable during the update process
+ maxUnavailable: 0
+ # The number of pods that can be created above the desired amount of pods during an update
+ maxSurge: 1
diff --git a/kubernetes/sdc/components/sdc-wfd-fe/Chart.yaml b/kubernetes/sdc/components/sdc-wfd-fe/Chart.yaml
index 79ff34a906..6aeee841e1 100644
--- a/kubernetes/sdc/components/sdc-wfd-fe/Chart.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-fe/Chart.yaml
@@ -17,7 +17,7 @@
apiVersion: v2
description: ONAP Service Design and Creation Workflow Designer frontend
name: sdc-wfd-fe
-version: 13.0.0
+version: 13.0.1
dependencies:
- name: repositoryGenerator
diff --git a/kubernetes/sdc/components/sdc-wfd-fe/templates/autoscaling.yaml b/kubernetes/sdc/components/sdc-wfd-fe/templates/autoscaling.yaml
new file mode 100644
index 0000000000..b7f265319b
--- /dev/null
+++ b/kubernetes/sdc/components/sdc-wfd-fe/templates/autoscaling.yaml
@@ -0,0 +1,32 @@
+{{- if .Values.autoscaling.enabled }}
+apiVersion: autoscaling/v2
+kind: HorizontalPodAutoscaler
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+spec:
+ scaleTargetRef:
+ apiVersion: apps/v1
+ kind: Deployment
+ name: {{ include "common.fullname" . }}
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
+ metrics:
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: cpu
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
+ {{- end }}
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ - type: Resource
+ resource:
+ name: memory
+ target:
+ type: Utilization
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
+ {{- end }}
+{{- end }}
diff --git a/kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml b/kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml
index ad031dabf9..fcf1398d02 100644
--- a/kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-fe/templates/deployment.yaml
@@ -19,7 +19,16 @@ kind: Deployment
metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
selector: {{- include "common.selectors" . | nindent 4 }}
+ {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+ minReadySeconds: {{ .Values.minReadySeconds }}
+ strategy:
+ type: {{ .Values.updateStrategy.type }}
+ rollingUpdate:
+ maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+ maxSurge: {{ .Values.updateStrategy.maxSurge }}
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
diff --git a/kubernetes/sdc/components/sdc-wfd-fe/values.yaml b/kubernetes/sdc/components/sdc-wfd-fe/values.yaml
index e33cf4827d..e82e1d9a9b 100644
--- a/kubernetes/sdc/components/sdc-wfd-fe/values.yaml
+++ b/kubernetes/sdc/components/sdc-wfd-fe/values.yaml
@@ -138,3 +138,21 @@ serviceAccount:
log:
path: /var/log/onap
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 3
+ targetCPUUtilizationPercentage: 75
+
+# number of ReplicaSets that should be retained for the Deployment
+revisionHistoryLimit: 1
+
+# the minimum number of seconds that a newly created Pod should be ready
+minReadySeconds: 30
+updateStrategy:
+ type: RollingUpdate
+ # The number of pods that can be unavailable during the update process
+ maxUnavailable: 0
+ # The number of pods that can be created above the desired amount of pods during an update
+ maxSurge: 1