Merge "[VNFSDK] Use common secret template for postgres credentials"
authorMorgan Richomme <morgan.richomme@orange.com>
Fri, 8 May 2020 13:26:19 +0000 (13:26 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 8 May 2020 13:26:19 +0000 (13:26 +0000)
1  2 
kubernetes/vnfsdk/values.yaml

@@@ -22,6 -22,22 +22,22 @@@ global
    readinessImage: readiness-check:2.0.0
    loggingRepository: docker.elastic.co
    loggingImage: beats/filebeat:5.5.0
+   envsubstImage: dibi/envsubst
+ secrets:
+   - uid: pg-root-pass
+     name: &pgRootPassSecretName '{{ include "common.release" . }}-vnfsdk-pg-root-pass'
+     type: password
+     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "vnfsdk-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
+     password: '{{ .Values.postgres.config.pgRootpassword }}'
+     policy: generate
+   - uid: pg-user-creds
+     name: &pgUserCredsSecretName '{{ include "common.release" . }}-vnfsdk-pg-user-creds'
+     type: basicAuth
+     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "vnfsdk-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
+     login: '{{ .Values.postgres.config.pgUserName }}'
+     password: '{{ .Values.postgres.config.pgUserPassword }}'
+     passwordPolicy: generate
  
  #################################################################
  # Application configuration defaults.
@@@ -50,9 -66,8 +66,8 @@@ postgres
    config:
      pgUserName: postgres
      pgDatabase: postgres
-     pgPrimaryPassword: postgres
-     pgUserPassword: postgres
-     pgRootPassword: postgres
+     pgUserExternalSecret: *pgUserCredsSecretName
+     pgRootPasswordExternalSecret: *pgRootPassSecretName
  
  # flag to enable debugging - application support required
  debugEnabled: false
@@@ -105,6 -120,6 +120,6 @@@ ingress
    service:
      - baseaddr: "refrepo"
        name: "refrepo"
 -      port: 97
 +      port: 8703
    config:
 -    ssl: "none"
 +    ssl: "redirect"