summaryrefslogtreecommitdiffstats
path: root/kubernetes/msb
diff options
context:
space:
mode:
authorHuabing Zhao <zhao.huabing@zte.com.cn>2020-05-14 09:17:52 +0800
committerKonrad Banka <k.banka@samsung.com>2020-05-26 06:31:37 +0000
commit388a23d85dd8866762330a2e1c146cac3b5c3e36 (patch)
tree8434edbdadc9480681ab213c128e1937bef9b32b /kubernetes/msb
parent953938eaadbe80f37c619e01612b896e37ce5dec (diff)
Set certificate SAN as msb-iag
Also add helm certificate to be used within deployments. Issue-ID: MSB-467 Signed-off-by: Huabing Zhao <zhao.huabing@zte.com.cn> Signed-off-by: Konrad Bańka <k.banka@samsung.com> Change-Id: I1dabc31275edebd4a01be658e462a7d45497ce46 (cherry picked from commit 88cf4965828fa7f17e413a4465844e200d1358df)
Diffstat (limited to 'kubernetes/msb')
-rw-r--r--kubernetes/msb/charts/msb-eag/templates/deployment.yaml11
-rw-r--r--kubernetes/msb/charts/msb-iag/templates/deployment.yaml11
-rw-r--r--kubernetes/msb/resources/config/certificates/cert.crt37
-rw-r--r--kubernetes/msb/templates/secrets.yaml26
4 files changed, 67 insertions, 18 deletions
diff --git a/kubernetes/msb/charts/msb-eag/templates/deployment.yaml b/kubernetes/msb/charts/msb-eag/templates/deployment.yaml
index fd16a0ce6b..95f0e34599 100644
--- a/kubernetes/msb/charts/msb-eag/templates/deployment.yaml
+++ b/kubernetes/msb/charts/msb-eag/templates/deployment.yaml
@@ -81,6 +81,14 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
+ - name: {{ include "common.fullname" . }}-cert
+ mountPath: /usr/local/openresty/nginx/ssl/cert/cert.crt
+ readOnly: true
+ subPath: "cert.crt"
+ - name: {{ include "common.fullname" . }}-cert
+ mountPath: /usr/local/openresty/nginx/html/cert/ca.crt
+ readOnly: true
+ subPath: "ca.crt"
- mountPath: /usr/local/apiroute-works/logs
name: {{ include "common.fullname" . }}-logs
resources:
@@ -109,6 +117,9 @@ spec:
name: {{ include "common.fullname" . }}-log-conf
subPath: logback.xml
volumes:
+ - name: {{ include "common.fullname" . }}-cert
+ secret:
+ secretName: {{ include "common.release" . }}-msb-https-cert
- name: {{ include "common.fullname" . }}-log-conf
configMap:
name: {{ include "common.fullname" . }}-log
diff --git a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
index 8975a32c7f..f95f1059a6 100644
--- a/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
+++ b/kubernetes/msb/charts/msb-iag/templates/deployment.yaml
@@ -81,6 +81,14 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
+ - name: {{ include "common.fullname" . }}-cert
+ mountPath: /usr/local/openresty/nginx/ssl/cert/cert.crt
+ readOnly: true
+ subPath: "cert.crt"
+ - name: {{ include "common.fullname" . }}-cert
+ mountPath: /usr/local/openresty/nginx/html/cert/ca.crt
+ readOnly: true
+ subPath: "ca.crt"
- mountPath: /usr/local/apiroute-works/logs
name: {{ include "common.fullname" . }}-logs
resources:
@@ -109,6 +117,9 @@ spec:
name: {{ include "common.fullname" . }}-log-conf
subPath: logback.xml
volumes:
+ - name: {{ include "common.fullname" . }}-cert
+ secret:
+ secretName: {{ include "common.release" . }}-msb-https-cert
- name: {{ include "common.fullname" . }}-log-conf
configMap:
name: {{ include "common.fullname" . }}-log
diff --git a/kubernetes/msb/resources/config/certificates/cert.crt b/kubernetes/msb/resources/config/certificates/cert.crt
index 7d1314f59e..e718c8d166 100644
--- a/kubernetes/msb/resources/config/certificates/cert.crt
+++ b/kubernetes/msb/resources/config/certificates/cert.crt
@@ -1,22 +1,23 @@
-----BEGIN CERTIFICATE-----
-MIIDqjCCApKgAwIBAgIJAOQWcdss4Qu5MA0GCSqGSIb3DQEBCwUAMIGKMQswCQYD
+MIID0TCCArmgAwIBAgIJAOQWcdss4QvKMA0GCSqGSIb3DQEBCwUAMIGKMQswCQYD
VQQGEwJDTjERMA8GA1UECAwIc2ljaHVhbmcxEDAOBgNVBAcMB2N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co3OUgVH/yNbccysVtqxxrfPrBhLfH/yDrFehmQ00T
+P8mmJG3qeOUII0pgUjBkGL52+YMN0qy0SgryBx86fR9Y1bQLdWNfsM1CUXE2q9xs
+FmU5Ry1pemTo68THSJs4wOnjLZ4kWTseTcEmQ6X2lfah8Ch0ffd3tttguNXnT1Xc
+axgwv2Cypja3bPbq9t8kfJhbDrYO
-----END CERTIFICATE-----
diff --git a/kubernetes/msb/templates/secrets.yaml b/kubernetes/msb/templates/secrets.yaml
new file mode 100644
index 0000000000..7dcec5a303
--- /dev/null
+++ b/kubernetes/msb/templates/secrets.yaml
@@ -0,0 +1,26 @@
+{{/*
+# 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.
+*/}}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.release" . }}-msb-https-cert
+ labels: {{ include "common.labels" . | nindent 4 }}
+ app: {{ include "common.name" . }}
+ chart: {{ include "common.chart" . }}
+ release: {{ include "common.release" . }}
+type: Opaque
+data:
+{{ tpl (.Files.Glob "resources/config/certificates/*").AsSecrets . | indent 2 }}