aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/components/sdc-onboarding-be
diff options
context:
space:
mode:
authorJack Lucas <jflos@sonoris.net>2022-01-31 14:59:24 +0000
committerGerrit Code Review <gerrit@onap.org>2022-01-31 14:59:24 +0000
commit0eec968ce240c0f029de5c3d3f8b3e8037ee74ce (patch)
tree44ed2213ea1877c2da51b2698ff9a00d5cc78147 /kubernetes/sdc/components/sdc-onboarding-be
parent85a13b2a91f3ba076a8ce28d9d7877354c6c0439 (diff)
parent2b764d035310d91744b4c22ace83593b9a561116 (diff)
Merge "[SDC] Service Mesh Compliance for SDC"
Diffstat (limited to 'kubernetes/sdc/components/sdc-onboarding-be')
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml36
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml8
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/templates/service.yaml8
-rw-r--r--kubernetes/sdc/components/sdc-onboarding-be/values.yaml7
4 files changed, 39 insertions, 20 deletions
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
index d6b8a4e026..8180cc79f1 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/deployment.yaml
@@ -1,6 +1,7 @@
{{/*
# Copyright © 2017 Amdocs, AT&T, Bell Canada
# Modifications Copyright © 2018 ZTE
+# Modifications Copyright © 2021 Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -80,9 +81,9 @@ spec:
chmod 0755 /config-output/${PFILE}
done
volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
- - name: {{ include "common.fullname" . }}-environments
+ - name: sdc-environments-input
mountPath: /config-input/
- - name: sdc-environments-output
+ - name: sdc-environments
mountPath: /config-output/
resources:
limits:
@@ -104,7 +105,7 @@ spec:
securityContext:
runAsUser: 0
volumeMounts:
- - name: {{ include "common.fullname" . }}-cert-storage
+ - name: cert-storage
mountPath: "/onboard/cert"
resources:
limits:
@@ -172,22 +173,24 @@ spec:
- name: SDC_CERT_DIR
value: {{ .Values.cert.certDir }}
volumeMounts:
- - name: sdc-environments-output
+ - name: sdc-environments
mountPath: /app/jetty/chef-solo/environments/
- - name: sdc-environments-output
+ {{- if .Values.global.aafEnabled }}
+ - name: sdc-environments
mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12
subPath: org.onap.sdc.p12
- - name: sdc-environments-output
+ - name: sdc-environments
mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks
subPath: org.onap.sdc.trust.jks
- - name: {{ include "common.fullname" . }}-localtime
+ {{- end }}
+ - name: localtime
mountPath: /etc/localtime
readOnly: true
- name: logs
mountPath: /var/log/onap
- - name: {{ include "common.fullname" . }}-cert-storage
+ - name: cert-storage
mountPath: "{{ .Values.cert.certDir }}"
- - name: {{ include "common.fullname" . }}-logback
+ - name: logback
mountPath: /tmp/logback.xml
subPath: logback.xml
lifecycle:
@@ -198,22 +201,25 @@ spec:
{{ include "common.log.sidecar" . | nindent 8 }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
- - name: {{ include "common.fullname" . }}-localtime
+ - name: localtime
hostPath:
path: /etc/localtime
+
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- - name: {{ include "common.fullname" . }}-logback
+ - name: logback
configMap:
name : {{ include "common.fullname" . }}-logging-configmap
- - name: {{ include "common.fullname" . }}-environments
+ - name: sdc-environments
+ {{- if .Values.global.aafEnabled }}
+ emptyDir: { medium: "Memory" }
+ - name: sdc-environments-input
+ {{- end }}
configMap:
name: {{ include "common.release" . }}-sdc-environments-configmap
defaultMode: 0755
- - name: sdc-environments-output
- emptyDir: { medium: "Memory" }
- name: logs
emptyDir: {}
- - name: {{ include "common.fullname" . }}-cert-storage
+ - name: cert-storage
persistentVolumeClaim:
claimName: {{ include "common.fullname" . }}-cert
imagePullSecrets:
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml
index d92b42a09c..bfc1ef8e7b 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/job.yaml
@@ -62,6 +62,13 @@ spec:
- name: {{ include "common.name" . }}-job
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.onboardingInitImage }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{- if include "common.onServiceMesh" . }}
+ args:
+ - echo "waiting 10s for istio side cars to be up"; sleep 10s; /home/sdc/startup.sh
+ command:
+ - /bin/sh
+ - -c
+ {{- end }}
volumeMounts:
- name: {{ include "common.fullname" . }}-environments
mountPath: /home/sdc/chef-solo/environments/
@@ -90,6 +97,7 @@ spec:
requests:
cpu: 200m
memory: 200Mi
+ {{ include "common.waitForJobContainer" . | indent 6 | trim }}
volumes:
- name: {{ include "common.fullname" . }}-environments
configMap:
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/templates/service.yaml b/kubernetes/sdc/components/sdc-onboarding-be/templates/service.yaml
index 2ee87eeb33..ece5a439a3 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/templates/service.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/templates/service.yaml
@@ -31,18 +31,18 @@ spec:
{{if eq .Values.service.type "NodePort" -}}
- port: {{ .Values.service.externalPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.portName | default "http" }}
+ name: {{ .Values.service.portName | default "http" }}s
- port: {{ .Values.service.externalPort2 }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.portName | default "http" }}2
+ name: {{ .Values.service.portName | default "http" }}}
{{- else -}}
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.portName | default "http" }}
+ name: {{ .Values.service.portName | default "http" }}s
- port: {{ .Values.service.externalPort2 }}
targetPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.portName | default "http" }}2
+ name: {{ .Values.service.portName | default "http" }}
{{- end}}
selector:
app: {{ include "common.name" . }}
diff --git a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
index 3ed98fef3f..f96d59b71a 100644
--- a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
+++ b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml
@@ -109,9 +109,10 @@ startup:
service:
type: ClusterIP
name: sdc-onboarding-be
- portName: sdc-onboarding-be
+ portName: http
internalPort: 8445
externalPort: 8445
+
internalPort2: 8081
externalPort2: 8081
@@ -182,6 +183,10 @@ serviceAccount:
roles:
- read
+wait_for_job_container:
+ containers:
+ - '{{ include "common.name" . }}-job'
+
#Log configuration
log:
path: /var/log/onap