[AAF-SMS] Allow to disable CPS part 62/126962/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 4 Feb 2022 07:57:06 +0000 (08:57 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 4 Feb 2022 07:57:06 +0000 (08:57 +0100)
AAF SMS is importing secrets in vault. CPS secret can be retrieved only
if cps is enabled.
this patch allows to disable CPS import in AAF SMS

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

kubernetes/aaf/components/aaf-sms/resources/config/osdf.json
kubernetes/aaf/components/aaf-sms/templates/job.yaml
kubernetes/aaf/components/aaf-sms/values.yaml
kubernetes/onap/resources/overrides/onap-all.yaml
kubernetes/onap/resources/overrides/sm-onap.yaml
kubernetes/onap/values.yaml

index 3ede31d..c14f7ee 100644 (file)
                     "UserName": "${OSDF_OPT_ENGINE_USER}",
                     "Password": "${OSDF_OPT_ENGINE_PASS}"
                 }
-            },
+            }{{ if .Values.cps.enabled }},
             {
                 "name": "cps",
                 "values": {
                     "UserName": "${CPS_USER}",
                     "Password": "${CPS_PASS}"
                 }
-            }
+            }{{ end }}
         ]
     }
 }
index 6d9ecaa..8dbe276 100644 (file)
@@ -52,7 +52,9 @@ spec:
            export OSDF_OPT_ENGINE_PASS=${OSDF_OPT_ENGINE_PASS_PLAIN};
            export SO_PASS=${SO_PASS_PLAIN};
            export SDC_PASS=${SDC_PASS_PLAIN};
+           {{- if .Values.cps.enabled }}
            export CPS_PASS=${CPS_PASS_PLAIN};
+           {{-  end }}
            cd /config-input;
            for PFILE in `find . -not -type d | grep -v -F ..`; do
              envsubst <${PFILE} >/config/${PFILE};
@@ -137,11 +139,12 @@ spec:
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdc-creds" "key" "login") | indent 10 }}
         - name: SDC_PASS_PLAIN
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdc-creds" "key" "password") | indent 10 }}
-
+        {{- if .Values.cps.enabled }}
         - name: CPS_USER
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "login") | indent 10 }}
         - name: CPS_PASS_PLAIN
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-creds" "key" "password") | indent 10 }}
+        {{- end }}
 
         volumeMounts:
         - mountPath: /config-input
index cde8529..da268cc 100644 (file)
@@ -116,6 +116,9 @@ persistence:
 ingress:
   enabled: false
 
+cps:
+  enabled: true
+
 secrets:
   - uid: aai-creds
     type: basicAuth
index 229717a..f92bfa7 100644 (file)
@@ -29,6 +29,10 @@ postgres:
   enabled: true
 aaf:
   enabled: true
+  aaf-sms:
+    cps:
+      # you must always set the same values as value set in cps.enabled
+      enabled: true
 aai:
   enabled: true
 appc:
index 312fc4b..3e8e598 100644 (file)
@@ -53,6 +53,10 @@ aai:
     replicaCount: 1
 aaf:
   enabled: false
+  aaf-sms:
+    cps:
+      # you must always set the same values as value set in cps.enabled
+      enabled: false
 appc:
   enabled: false
 cassandra:
index 08f404a..83000af 100755 (executable)
@@ -259,8 +259,13 @@ global:
 # Enable/disable and configure helm charts (ie. applications)
 # to customize the ONAP deployment.
 #################################################################
+
 aaf:
   enabled: false
+  aaf-sms:
+    cps:
+      # you must always set the same values as value set in cps.enabled
+      enabled: false
 aai:
   enabled: false
 appc: