repository: '@local'
condition: policy.enabled
- name: portal-ng
- version: ~13.x-0
+ version: ~14.x-0
repository: '@local'
condition: portal-ng.enabled
- name: postgres
apiVersion: v2
description: ONAP Next Generation Portal
name: portal-ng
-version: 13.0.3
+version: 14.0.0
dependencies:
- name: common
version: ~13.x-0
repository: '@local'
- name: portal-ng-preferences
- version: ~13.x-0
+ version: ~14.x-0
repository: '@local'
- name: portal-ng-history
- version: ~13.x-0
+ version: ~14.x-0
repository: '@local'
- name: portal-ng-ui
version: ~13.x-0
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 13.0.2
+version: 14.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
-appVersion: 0.1.1
+appVersion: 0.2.1
dependencies:
- name: common
- name: serviceAccount
version: ~13.x-0
repository: '@local'
- - name: mongodb
- version: ~16.5.x-0
+ - name: postgres
+ version: ~13.x-0
+ repository: '@local'
+ condition: global.postgres.localCluster
+ - name: postgres-init
+ version: ~13.x-0
repository: '@local'
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{ include "common.containerSecurityContext" . | indent 10 | trim }}
+ env:
+ - name: HISTORY_DB_USERNAME
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 14 }}
+ - name: HISTORY_DB_PASSWORD
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 14 }}
+ - name: HISTORY_DB_HOST
+ value: {{ ternary .Values.postgres.service.name2 .Values.global.postgres.service.name2 .Values.global.postgres.localCluster }}
+ - name: HISTORY_DB_PORT
+ value: {{ ternary .Values.postgres.service.externalPort2 .Values.global.postgres.service.externalPort2 .Values.global.postgres.localCluster | quote}}
+ - name: HISTORY_DB
+ value: {{ .Values.postgres.config.pgDatabase }}
envFrom:
- configMapRef:
name: {{ include "common.fullname" . }}-configmap
- - secretRef:
- name: {{ include "common.fullname" . }}-secret
ports: {{ include "common.containerPorts" . | nindent 12 }}
livenessProbe:
httpGet:
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.fullname" . }}-secret
- namespace: {{ include "common.namespace" . }}
-type: Opaque
-data:
- {{- range $key, $val := .Values.secretEnv }}
- {{ $key }}: {{ $val | b64enc | quote }}
- {{- end -}}
\ No newline at end of file
+
+{{ include "common.secretFast" . }}
KEYCLOAK_REALM: onap
COLLECTOR_HOST: jaeger-collector.istio-config
COLLECTOR_PORT: 9411
+ #Service Names of the postgres db to connect to.
+ postgres:
+ localCluster: false
+ service:
+ name: pgset
+ externalPort: 5432
+ name2: tcp-pgset-primary
+ externalPort2: 5432
+ name3: tcp-pgset-replica
+ externalPort3: 5432
+ container:
+ name: postgres
+
+secrets:
+ - uid: pg-root-pass
+ name: &pgRootPassSecretName '{{ include "common.release" . }}-portal-ng-history-pg-root-pass'
+ type: password
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "portal-ng-history-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
+ password: '{{ .Values.postgres.config.pgRootpassword }}'
+ policy: generate
+ - uid: pg-user-creds
+ name: &pgUserCredsSecretName '{{ include "common.release" . }}-portal-ng-history-pg-user-creds'
+ type: basicAuth
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "portal-ng-history-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
+ login: '{{ .Values.postgres.config.pgUserName }}'
+ password: '{{ .Values.postgres.config.pgUserPassword }}'
+ passwordPolicy: generate
image:
imageName: onap/portal-ng/history
initialDelaySeconds: 30
failureThreshold: 5
-secretEnv:
- MONGO_USERNAME: dbuser
- MONGO_PASSWORD: dbpassword
- MONGO_DATABASE: history
-
env:
- MONGO_HOST: history-mongodb
- MONGO_PORT: 27017
TRACING_ENABLED: true
-mongodb:
- nameOverride: history-mongodb
+#################################################################
+# Postgres overriding defaults in the postgres
+#################################################################
+postgres:
+ nameOverride: &postgresName portal-ng-history-postgres
service:
- portName: tcp-mongodb
- auth:
- rootPassword: TrWAweN9y9eW
- usernames:
- - dbuser
- passwords:
- - dbpassword
- databases:
- - history
- resources:
- limits:
- cpu: "2"
- memory: "2Gi"
- requests:
- cpu: "250m"
- memory: "500Mi"
+ name: *postgresName
+ externalPort: 5432
+ name2: portal-ng-history-pg-primary
+ externalPort2: 5432
+ name3: portal-ng-history-pg-replica
+ externalPort3: 5432
+ container:
+ name:
+ primary: portal-ng-history-pg-primary
+ replica: portal-ng-history-pg-replica
+ persistence:
+ mountSubPath: portal-ng-history/data
+ mountInitPath: portal-ng-history
+ config:
+ pgUserName: portalnghistory
+ pgDatabase: history
+ pgUserExternalSecret: *pgUserCredsSecretName
+ pgRootPasswordExternalSecret: *pgRootPassSecretName
+
+postgres-init:
+ nameOverride: portal-ng-history-postgres-init
+ config:
+ pgUserName: portalnghistory
+ pgDatabase: history
+ pgDataPath: data
+ pgUserExternalSecret: *pgUserCredsSecretName
+ serviceAccount:
+ nameOverride: portal-ng-history-postgres-init
+
+ # pgPrimaryPassword: password
+ # pgUserPassword: password
+ # pgRootPassword: password
#Pods Service Account
serviceAccount:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 13.0.2
+version: 14.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
-appVersion: 0.1.1
+appVersion: 0.2.1
dependencies:
- name: common
- name: serviceAccount
version: ~13.x-0
repository: '@local'
- - name: mongodb
- version: ~16.5.x-0
+ - name: postgres
+ version: ~13.x-0
+ repository: '@local'
+ condition: global.postgres.localCluster
+ - name: postgres-init
+ version: ~13.x-0
repository: '@local'
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image.imageName }}:{{ .Values.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{ include "common.containerSecurityContext" . | indent 10 | trim }}
+ env:
+ - name: PREFERENCES_DB_USERNAME
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 14 }}
+ - name: PREFERENCES_DB_PASSWORD
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 14 }}
+ - name: PREFERENCES_DB_HOST
+ value: {{ ternary .Values.postgres.service.name2 .Values.global.postgres.service.name2 .Values.global.postgres.localCluster }}
+ - name: PREFERENCES_DB_PORT
+ value: {{ ternary .Values.postgres.service.externalPort2 .Values.global.postgres.service.externalPort2 .Values.global.postgres.localCluster | quote }}
+ - name: PREFERENCES_DB
+ value: {{ .Values.postgres.config.pgDatabase }}
envFrom:
- configMapRef:
name: {{ include "common.fullname" . }}-configmap
- - secretRef:
- name: {{ include "common.fullname" . }}-secret
ports: {{ include "common.containerPorts" . | nindent 12 }}
livenessProbe:
httpGet:
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.fullname" . }}-secret
- namespace: {{ include "common.namespace" . }}
-type: Opaque
-data:
- {{- range $key, $val := .Values.secretEnv }}
- {{ $key }}: {{ $val | b64enc | quote }}
- {{- end -}}
\ No newline at end of file
+
+{{ include "common.secretFast" . }}
KEYCLOAK_REALM: onap
COLLECTOR_HOST: jaeger-collector.istio-config
COLLECTOR_PORT: 9411
+ #Service Names of the postgres db to connect to.
+ postgres:
+ localCluster: false
+ service:
+ name: pgset
+ externalPort: 5432
+ name2: tcp-pgset-primary
+ externalPort2: 5432
+ name3: tcp-pgset-replica
+ externalPort3: 5432
+ container:
+ name: postgres
+
+secrets:
+ - uid: pg-root-pass
+ name: &pgRootPassSecretName '{{ include "common.release" . }}-portal-ng-preferences-pg-root-pass'
+ type: password
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "portal-ng-preferences-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
+ password: '{{ .Values.postgres.config.pgRootpassword }}'
+ policy: generate
+ - uid: pg-user-creds
+ name: &pgUserCredsSecretName '{{ include "common.release" . }}-portal-ng-preferences-pg-user-creds'
+ type: basicAuth
+ externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "portal-ng-preferences-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
+ login: '{{ .Values.postgres.config.pgUserName }}'
+ password: '{{ .Values.postgres.config.pgUserPassword }}'
+ passwordPolicy: generate
# Default values for preferences.
# This is a YAML-formatted file.
initialDelaySeconds: 30
failureThreshold: 5
-secretEnv:
- MONGO_USERNAME: dbuser
- MONGO_PASSWORD: dbpassword
- MONGO_DATABASE: Preferences
-
env:
- MONGO_HOST: preferences-mongodb
- MONGO_PORT: 27017
TRACING_ENABLED: true
-mongodb:
- nameOverride: preferences-mongodb
+#################################################################
+# Postgres overriding defaults in the postgres
+#################################################################
+postgres:
+ nameOverride: &postgresName portal-ng-preferences-postgres
service:
- portName: tcp-mongodb
- auth:
- rootPassword: TrWAweN9y9eW
- usernames:
- - dbuser
- passwords:
- - dbpassword
- databases:
- - Preferences
- resources:
- limits:
- cpu: "2"
- memory: "2Gi"
- requests:
- cpu: "250m"
- memory: "500Mi"
+ name: *postgresName
+ externalPort: 5432
+ name2: portal-ng-preferences-pg-primary
+ externalPort2: 5432
+ name3: portal-ng-preferences-pg-replica
+ externalPort3: 5432
+ container:
+ name:
+ primary: portal-ng-preferences-pg-primary
+ replica: portal-ng-preferences-pg-replica
+ persistence:
+ mountSubPath: portal-ng-preferences/data
+ mountInitPath: portal-ng-preferences
+ config:
+ pgUserName: portalngpreferences
+ pgDatabase: preferences
+ pgUserExternalSecret: *pgUserCredsSecretName
+ pgRootPasswordExternalSecret: *pgRootPassSecretName
+
+postgres-init:
+ nameOverride: portal-ng-preferences-postgres-init
+ config:
+ pgUserName: portalngpreferences
+ pgDatabase: preferences
+ pgDataPath: data
+ pgUserExternalSecret: *pgUserCredsSecretName
+ serviceAccount:
+ nameOverride: portal-ng-preferences-postgres-init
+
+ # pgPrimaryPassword: password
+ # pgUserPassword: password
+ # pgRootPassword: password
#Pods Service Account
serviceAccount: