[POLICY] Simplify cert retrieval script 62/118262/2
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 23 Feb 2021 15:31:07 +0000 (16:31 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Sun, 2 May 2021 21:24:56 +0000 (21:24 +0000)
As retrieving values is now done via a generic script, let's clean a
little bit cert retrieval in order to remove unneeded part.

Issue-ID: OOM-2688
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ieec9fe0ba23c7d7125086e0882a20a038c25a128

kubernetes/policy/components/policy-apex-pdp/values.yaml
kubernetes/policy/components/policy-api/values.yaml
kubernetes/policy/components/policy-clamp-be/values.yaml
kubernetes/policy/components/policy-clamp-fe/values.yaml
kubernetes/policy/components/policy-distribution/values.yaml
kubernetes/policy/components/policy-drools-pdp/values.yaml
kubernetes/policy/components/policy-pap/values.yaml
kubernetes/policy/components/policy-xacml-pdp/values.yaml

index 22edcff..aa1daf7 100755 (executable)
@@ -80,9 +80,6 @@ certInitializer:
   uid: 101
   gid: 102
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" >> {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWORD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     chown -R {{ .Values.uid }}:{{ .Values.gid }} $(dirname {{ .Values.credsPath }});
index 0b2ea9f..da983e5 100755 (executable)
@@ -69,9 +69,6 @@ certInitializer:
   uid: 100
   gid: 101
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" > {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     chown -R {{ .Values.uid }}:{{ .Values.gid }} $(dirname {{ .Values.credsPath }});
@@ -146,4 +143,3 @@ resources:
       cpu: 200m
       memory: 2Gi
   unlimited: {}
-
index 50ec8fa..ef0ea7a 100644 (file)
@@ -44,11 +44,10 @@ certInitializer:
   app_ns: org.osaaf.aaf
   credsPath: /opt/app/osaaf/local
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh local showpass {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop;
-    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_truststore_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_truststore_password.pwd;
-    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_key_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_key_password.pwd;
-    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_keystore_password=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_keystore_password.pwd;
-    grep '^cadi' {{ .Values.credsPath }}/mycreds.prop | awk -v FS="cadi_keystore_password_p12=" 'NF>1{print $2}' > {{ .Values.credsPath }}/cadi_keystore_password_p12.pwd;
+    echo "$cadi_truststore_password" > {{ .Values.credsPath }}/cadi_truststore_password.pwd;
+    echo "$cadi_key_password" > {{ .Values.credsPath }}/cadi_key_password.pwd;
+    echo "$cadi_keystore_password" > {{ .Values.credsPath }}/cadi_keystore_password.pwd;
+    echo "$cadi_keystore_password_p12" > {{ .Values.credsPath }}/cadi_keystore_password_p12.pwd;
     cd {{ .Values.credsPath }};
     chmod a+rx *;
 
index c2f4d15..c824965 100644 (file)
@@ -48,8 +48,6 @@ certInitializer:
   app_ns: org.osaaf.aaf
   credsPath: /opt/app/osaaf/local
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh local showpass {{.Values.fqi}} {{ .Values.fqdn }} > {{ .Values.credsPath }}/mycreds.prop;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass | grep '^c' | xargs -0);
     cd {{ .Values.credsPath }};
     openssl pkcs12 -in {{ .Values.keystoreFile }} -nocerts -nodes -passin pass:$cadi_keystore_password_p12 > {{ .Values.clamp_key }};
     openssl pkcs12 -in {{ .Values.keystoreFile }} -clcerts -nokeys -passin pass:$cadi_keystore_password_p12 > {{ .Values.clamp_pem }};
index 09805bd..6788613 100755 (executable)
@@ -105,9 +105,6 @@ certInitializer:
   uid: 100
   gid: 101
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" >> {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     chown -R {{ .Values.uid }}:{{ .Values.gid }} $(dirname {{ .Values.credsPath }});
index 658fa65..4eb37c6 100755 (executable)
@@ -89,9 +89,6 @@ certInitializer:
   uid: 100
   gid: 101
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" >> {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     echo "export CADI_KEYFILE='{{ .Values.credsPath }}/org.onap.policy.keyfile'" >> {{ .Values.credsPath }}/.ci;
index ec177d8..18e0e3e 100755 (executable)
@@ -83,9 +83,6 @@ certInitializer:
   uid: 100
   gid: 101
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" > {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     chown -R {{ .Values.uid }}:{{ .Values.gid }} $(dirname {{ .Values.credsPath }});
@@ -172,4 +169,3 @@ resources:
       cpu: 200m
       memory: 2Gi
   unlimited: {}
-
index 76b0f3a..64c00e9 100755 (executable)
@@ -74,9 +74,6 @@ certInitializer:
   uid: 100
   gid: 101
   aaf_add_config: >
-    /opt/app/aaf_config/bin/agent.sh;
-    export $(/opt/app/aaf_config/bin/agent.sh local showpass
-    {{ .Values.fqi }} {{ .Values.fqdn }} | grep "^cadi_keystore_password_p12");
     echo "export KEYSTORE='{{ .Values.credsPath }}/org.onap.policy.p12'" > {{ .Values.credsPath }}/.ci;
     echo "export KEYSTORE_PASSWD='${cadi_keystore_password_p12}'" >> {{ .Values.credsPath }}/.ci;
     chown -R {{ .Values.uid }}:{{ .Values.gid }} $(dirname {{ .Values.credsPath }});
@@ -155,4 +152,3 @@ resources:
       cpu: 200m
       memory: 2Gi
   unlimited: {}
-