aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/so/components/so-admin-cockpit
diff options
context:
space:
mode:
authorAndreas Geissler <andreas-geissler@telekom.de>2023-02-23 09:17:36 +0100
committerAndreas Geissler <andreas-geissler@telekom.de>2023-03-06 09:12:17 +0100
commitad61ccf6cccbe9a9637ef97eb98cee8dd70dce11 (patch)
treeec44004f8807bcb7229b1452a78bd31d2ff78c16 /kubernetes/so/components/so-admin-cockpit
parent5583c3cd4f0b6d6be561af051c9f0466502c10fe (diff)
[SO] Cleanup of SO charts
Remove AAF and TLS related chart entries Use OOM templates for deployment and service definitions Remove so-appc-orchestrator, as it is not supported anymore Issue-ID: OOM-3106 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de> Change-Id: I6256aa0fbbe172752cc3d8f83edde0880de7f629
Diffstat (limited to 'kubernetes/so/components/so-admin-cockpit')
-rw-r--r--kubernetes/so/components/so-admin-cockpit/Chart.yaml3
-rw-r--r--kubernetes/so/components/so-admin-cockpit/resources/config/overrides/override.yaml10
-rw-r--r--kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml38
-rw-r--r--kubernetes/so/components/so-admin-cockpit/templates/ingress.yaml16
-rw-r--r--kubernetes/so/components/so-admin-cockpit/templates/service.yaml31
-rw-r--r--kubernetes/so/components/so-admin-cockpit/values.yaml95
6 files changed, 67 insertions, 126 deletions
diff --git a/kubernetes/so/components/so-admin-cockpit/Chart.yaml b/kubernetes/so/components/so-admin-cockpit/Chart.yaml
index 89534e746c..31974724ae 100644
--- a/kubernetes/so/components/so-admin-cockpit/Chart.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/Chart.yaml
@@ -33,9 +33,6 @@ dependencies:
- name: repositoryGenerator
version: ~12.x-0
repository: '@local'
- - name: soHelpers
- version: ~12.x-0
- repository: 'file://../soHelpers'
- name: serviceAccount
version: ~12.x-0
repository: '@local'
diff --git a/kubernetes/so/components/so-admin-cockpit/resources/config/overrides/override.yaml b/kubernetes/so/components/so-admin-cockpit/resources/config/overrides/override.yaml
index dc9a4f2dad..7657415f98 100644
--- a/kubernetes/so/components/so-admin-cockpit/resources/config/overrides/override.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/resources/config/overrides/override.yaml
@@ -3,21 +3,11 @@ server:
forward-headers-strategy: none
{{- end }}
port: {{ index .Values.containerPort }}
- {{- if .Values.global.aafEnabled }}
- ssl:
- keyStore: ${KEYSTORE}
- keyStorePassword: ${KEYSTORE_PASSWORD}
- trustStore: ${TRUSTSTORE}
- trustStorePassword: ${TRUSTSTORE_PASSWORD}
- {{- else }}
ssl:
enabled: false
- {{- end }}
tomcat:
max-threads: 50
- {{- if not .Values.global.aafEnabled }}
ssl-enable: false
- {{- end }}
camunda:
rest:
api:
diff --git a/kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml b/kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml
index da9efff02a..f5fa5ce6b3 100644
--- a/kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/templates/deployment.yaml
@@ -21,18 +21,10 @@
*/}}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- selector:
- matchLabels:
- app: {{ include "common.name" . }}
- replicas: {{ index .Values.replicaCount }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
+ replicas: {{ .Values.replicaCount }}
minReadySeconds: {{ index .Values.minReadySeconds }}
strategy:
type: {{ index .Values.updateStrategy.type }}
@@ -40,12 +32,9 @@ spec:
maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
maxSurge: {{ index .Values.updateStrategy.maxSurge }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- initContainers: {{ include "so.certificate.container_importer" . | nindent 6 }}
+ initContainers:
- name: so-chown
image: {{ include "repositoryGenerator.image.busybox" . }}
volumeMounts:
@@ -64,14 +53,6 @@ spec:
- -c
- |
export SO_COCKPIT_PASSWORD=`htpasswd -bnBC 10 "" $SO_COCKPIT_PASS | tr -d ':\n' | sed 's/\$2y/\$2a/'`
- {{- if .Values.global.aafEnabled }}
- export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/org.onap.so.cred.props | xargs -0)
- export $(cat {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
- export KEYSTORE=file://$cadi_keystore
- export KEYSTORE_PASSWORD=$cadi_keystore_password_p12
- export TRUSTSTORE=file://$cadi_truststore
- export TRUSTSTORE_PASSWORD=$cadi_truststore_password
- {{- end }}
/app/start-app.sh
env:
- name: DB_HOST
@@ -95,7 +76,7 @@ spec:
- configMapRef:
name: {{ include "common.fullname" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
+ volumeMounts:
- name: logs
mountPath: /app/logs
- name: config
@@ -114,12 +95,9 @@ spec:
successThreshold: {{ index .Values.livenessProbe.successThreshold}}
failureThreshold: {{ index .Values.livenessProbe.failureThreshold}}
- ports:
- - containerPort: {{ index .Values.containerPort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- protocol: TCP
+ ports: {{ include "common.containerPorts" . | nindent 10 }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
- volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
+ volumes:
- name: logs
emptyDir: {}
- name: config
diff --git a/kubernetes/so/components/so-admin-cockpit/templates/ingress.yaml b/kubernetes/so/components/so-admin-cockpit/templates/ingress.yaml
index 8f87c68f1e..65f46c48c1 100644
--- a/kubernetes/so/components/so-admin-cockpit/templates/ingress.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/templates/ingress.yaml
@@ -1 +1,17 @@
+{{/*
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+*/}}
+
{{ include "common.ingress" . }}
diff --git a/kubernetes/so/components/so-admin-cockpit/templates/service.yaml b/kubernetes/so/components/so-admin-cockpit/templates/service.yaml
index b23e5ab99e..03b8df3e10 100644
--- a/kubernetes/so/components/so-admin-cockpit/templates/service.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/templates/service.yaml
@@ -19,32 +19,5 @@
# ============LICENSE_END=========================================================
# @author: gareth.roper@ericsson.com
*/}}
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "common.servicename" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
-spec:
- {{if .Values.global.aafEnabled -}}
- type: {{ .Values.service.type }}
- {{- else -}}
- type: ClusterIP
- {{- end }}
- ports:
- {{if and (eq .Values.service.type "NodePort") (.Values.global.aafEnabled) -}}
- - port: {{ .Values.service.internalPort }}
- nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- {{- else -}}
- - port: {{ .Values.service.externalPort }}
- targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- {{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+
+{{ include "common.service" . }}
diff --git a/kubernetes/so/components/so-admin-cockpit/values.yaml b/kubernetes/so/components/so-admin-cockpit/values.yaml
index 7e4a654acb..a825e16d49 100644
--- a/kubernetes/so/components/so-admin-cockpit/values.yaml
+++ b/kubernetes/so/components/so-admin-cockpit/values.yaml
@@ -27,17 +27,9 @@ global:
nodePortPrefixExt: 304
repository: nexus3.onap.org:10001
readinessImage: onap/oom/readiness:3.0.1
- aafAgentImage: onap/aaf/aaf_agent:2.1.20
envsubstImage: dibi/envsubst
- aafEnabled: true
persistence:
mountPath: /dockerdata-nfs
- security:
- aaf:
- enabled: true
- aaf:
- auth:
- header: Basic c29Ac28ub25hcC5vcmc6ZGVtbzEyMzQ1Ngo=
mariadbGalera:
serviceName: mariadb-galera
servicePort: '3306'
@@ -93,12 +85,6 @@ app: so-admin-cockpit
# soHelpers part
#################################################################
soHelpers:
- nameOverride: so-cockpit-cert-init
- certInitializer:
- nameOverride: so-cockpit-cert-init
- credsPath: /opt/app/osaaf/local
- cadi:
- apiEnforcement: org.onap.so.monitoringPerm
containerPort: *containerPort
server:
@@ -108,54 +94,55 @@ server:
# soMonitoringCredsExternalSecret: some secret
service:
-#Since this is a feature for monitoring the service type is changed to internal, users can change it to NodePort on need basis...
- type: NodePort
- nodePort: 24
- internalPort: *containerPort
- externalPort: *containerPort
- portName: http
+ type: NodePort
+ ports:
+ - port: *containerPort
+ name: http
+ nodePort: 24
+
updateStrategy:
- type: RollingUpdate
- maxUnavailable: 1
- maxSurge: 1
+ type: RollingUpdate
+ maxUnavailable: 1
+ maxSurge: 1
# Resource Limit flavor -By Default using small
flavor: small
#Segregation for different environment (Small or large)
resources:
- small:
- requests:
- memory: 1Gi
- cpu: 10m
- limits:
- memory: 4Gi
- cpu: 1
- large:
- requests:
- memory: 2Gi
- cpu: 20m
- limits:
- memory: 8Gi
- cpu: 2
+ small:
+ requests:
+ memory: 1Gi
+ cpu: 10m
+ limits:
+ memory: 4Gi
+ cpu: 1
+ large:
+ requests:
+ memory: 2Gi
+ cpu: 20m
+ limits:
+ memory: 8Gi
+ cpu: 2
+ unlimited: {}
readinessProbe:
- port: 9091
- initialDelaySeconds: 20
- periodSeconds: 10
- timeoutSeconds: 10
+ port: 9091
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ timeoutSeconds: 10
livenessProbe:
- port: 9091
- initialDelaySeconds: 40
- periodSeconds: 10
- timeoutSeconds: 10
- successThreshold: 1
- failureThreshold: 3
+ port: 9091
+ initialDelaySeconds: 40
+ periodSeconds: 10
+ timeoutSeconds: 10
+ successThreshold: 1
+ failureThreshold: 3
ingress:
- enabled: false
- service:
- - baseaddr: "so-admin-cockpit-ui"
- name: "so-admin-cockpit"
- port: 9091
- config:
- ssl: "none"
+ enabled: false
+ service:
+ - baseaddr: "so-admin-cockpit-ui"
+ name: "so-admin-cockpit"
+ port: 9091
+ config:
+ ssl: "none"
nodeSelector: {}
tolerations: []
affinity: {}