summaryrefslogtreecommitdiffstats
path: root/kubernetes/common
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common')
-rwxr-xr-xkubernetes/common/cert-wrapper/resources/import-custom-certs.sh18
-rw-r--r--kubernetes/common/certInitializer/templates/_certInitializer.yaml2
-rw-r--r--kubernetes/common/common/templates/_aafconfig.tpl2
-rw-r--r--kubernetes/common/common/templates/_log.tpl2
-rw-r--r--kubernetes/common/common/values.yaml1
5 files changed, 16 insertions, 9 deletions
diff --git a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
index 7e2fa91363..87e584c78e 100755
--- a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
+++ b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh
@@ -26,14 +26,20 @@ mkdir -p $WORK_DIR
# Decrypt and move relevant files to WORK_DIR
for f in $CERTS_DIR/*; do
- if [[ $AAF_ENABLED == false ]] && [[ $f == *$ONAP_TRUSTSTORE* ]]; then
+ export canonical_name_nob64=$(echo $f | sed 's/.*\/\([^\/]*\)/\1/')
+ export canonical_name_b64=$(echo $f | sed 's/.*\/\([^\/]*\)\(\.b64\)/\1/')
+ if [ "$AAF_ENABLED" == "false" ] && [ "$canonical_name_b64" == "$ONAP_TRUSTSTORE" ]; then
# Dont use onap truststore when aaf is disabled
continue
fi
- if [[ $f == *.sh ]]; then
+ if [ "$AAF_ENABLED" == "false" ] && [ "$canonical_name_nob64" == "$ONAP_TRUSTSTORE" ]; then
+ # Dont use onap truststore when aaf is disabled
+ continue
+ fi
+ if [ ${f: -3} == ".sh" ]; then
continue
fi
- if [[ $f == *.b64 ]]
+ if [ ${f: -4} == ".b64" ]
then
base64 -d $f > $WORK_DIR/`basename $f .b64`
else
@@ -42,7 +48,7 @@ for f in $CERTS_DIR/*; do
done
# Prepare truststore output file
-if [[ $AAF_ENABLED == true ]]
+if [ "$AAF_ENABLED" == "true" ]
then
mv $WORK_DIR/$ONAP_TRUSTSTORE $WORK_DIR/$TRUSTSTORE_OUTPUT_FILENAME
else
@@ -52,10 +58,10 @@ fi
# Import Custom Certificates
for f in $WORK_DIR/*; do
- if [[ $f == *.pem ]]; then
+ if [ ${f: -4} == ".pem" ]; then
echo "importing certificate: $f"
keytool -import -file $f -alias `basename $f` -keystore $WORK_DIR/$TRUSTSTORE_OUTPUT_FILENAME -storepass $TRUSTSTORE_PASSWORD -noprompt
- if [[ $? != 0 ]]; then
+ if [ $? != 0 ]; then
echo "failed importing certificate: $f"
exit 1
fi
diff --git a/kubernetes/common/certInitializer/templates/_certInitializer.yaml b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
index c1459bf438..5a8e84cd8c 100644
--- a/kubernetes/common/certInitializer/templates/_certInitializer.yaml
+++ b/kubernetes/common/certInitializer/templates/_certInitializer.yaml
@@ -121,7 +121,7 @@
securityContext:
runAsUser: 0
command:
- - /bin/bash
+ - /bin/sh
- -c
- /root/import-custom-certs.sh
env:
diff --git a/kubernetes/common/common/templates/_aafconfig.tpl b/kubernetes/common/common/templates/_aafconfig.tpl
index b1021ab9d7..930959337a 100644
--- a/kubernetes/common/common/templates/_aafconfig.tpl
+++ b/kubernetes/common/common/templates/_aafconfig.tpl
@@ -59,7 +59,7 @@
{{- $aafRoot := default $dot.Values.aafConfig .aafRoot -}}
{{- if $dot.Values.global.aafEnabled -}}
- name: {{ include "common.name" $dot }}-aaf-readiness
- image: "{{ include "common.repository" $dot }}/{{ $dot.Values.global.readinessImage }}"
+ image: {{ include "common.repository" $dot }}/{{ $dot.Values.global.readinessImage }}
imagePullPolicy: {{ $dot.Values.global.pullPolicy | default $dot.Values.pullPolicy }}
command:
- /app/ready.py
diff --git a/kubernetes/common/common/templates/_log.tpl b/kubernetes/common/common/templates/_log.tpl
index 3ae536aff3..dc714aecc4 100644
--- a/kubernetes/common/common/templates/_log.tpl
+++ b/kubernetes/common/common/templates/_log.tpl
@@ -17,7 +17,7 @@
{{- define "common.log.sidecar" -}}
{{- if .Values.global.centralizedLoggingEnabled }}
- name: {{ include "common.name" . }}-filebeat
- image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+ image: {{ include "repositoryGenerator.image.logging" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- name: filebeat-conf
diff --git a/kubernetes/common/common/values.yaml b/kubernetes/common/common/values.yaml
index 852f15c810..0de859a3ba 100644
--- a/kubernetes/common/common/values.yaml
+++ b/kubernetes/common/common/values.yaml
@@ -1,4 +1,5 @@
# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2020 Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.