Alexander Dehn | ab86ec1 | 2020-02-05 14:38:54 +0000 | [diff] [blame] | 1 | |
| 2 | {{ if .Values.global.aafEnabled }} |
| 3 | {{/* |
| 4 | # Copyright © 2020 Bitnami, AT&T, Amdocs, Bell Canada, highstreet technologies |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | */}} |
| 18 | {{- if .Values.aafConfig.addconfig -}} |
| 19 | apiVersion: v1 |
| 20 | kind: ConfigMap |
| 21 | {{ $suffix := "aaf-add-config" -}} |
| 22 | metadata: {{- include "common.resourceMetadata" (dict "suffix" $suffix "dot" . )| nindent 2 }} |
| 23 | data: |
| 24 | aaf-add-config.sh: |- |
| 25 | cd /opt/app/osaaf/local |
| 26 | mkdir -p certs |
| 27 | export $(/opt/app/aaf_config/bin/agent.sh local showpass | grep '^c' | xargs -0) |
| 28 | keytool -exportcert -rfc -file certs/cacert.pem -keystore {{ .Values.aafConfig.fqi_namespace }}.trust.jks -alias ca_local_0 -storepass $cadi_truststore_password |
| 29 | openssl pkcs12 -in {{ .Values.aafConfig.fqi_namespace }}.p12 -out certs/cert.pem -passin pass:$cadi_keystore_password_p12 -passout pass:$cadi_keystore_password_p12 |
| 30 | cp {{ .Values.aafConfig.fqi_namespace }}.key certs/key.pem |
| 31 | chmod -R 755 certs |
| 32 | {{- end -}} |
| 33 | {{- end -}} |