[CORD-2889]
Use premade `postgres` container
Change-Id: Ifc9a021c425d8f03c98d566978400884fbace4de
diff --git a/examples/filter-images.yaml b/examples/filter-images.yaml
index 2f61930..aa0411f 100644
--- a/examples/filter-images.yaml
+++ b/examples/filter-images.yaml
@@ -1,5 +1,4 @@
---
-
# Copyright 2018-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,20 +16,16 @@
# Whitelist for use with imagebuilder
docker_image_whitelist:
+- xosproject/chameleon
- xosproject/xos-base
-- xosproject/xos-core
- xosproject/xos-client
+- xosproject/xos-core
- xosproject/xos-gui
- xosproject/xos-gui-builder
- xosproject/xos-libraries
-- xosproject/xos-postgres
- xosproject/xos-tosca
- xosproject/xos-ws
-- xosproject/chameleon
- xosproject/xos-synchronizer-base
-- redis
-- nginx
-- node
- xosproject/rcord-synchronizer
- xosproject/volt-synchronizer
- xosproject/vtn-synchronizer
@@ -38,3 +33,7 @@
- xosproject/addressmanager-synchronizer
- xosproject/vsg-hw-synchronizer
- xosproject/fabric-synchronizer
+- nginx
+- node
+- postgres
+- redis
diff --git a/xos-core/templates/db-deployment.yaml b/xos-core/templates/db-deployment.yaml
index f950b32..c103e09 100644
--- a/xos-core/templates/db-deployment.yaml
+++ b/xos-core/templates/db-deployment.yaml
@@ -40,3 +40,12 @@
configMapKeyRef:
name: xos-db
key: service_5432_name
+ - name: POSTGRES_DB
+ value: {{ .Values.configs.core_config.database.name | quote }}
+ - name: POSTGRES_USER
+ value: {{ .Values.configs.core_config.database.username | quote }}
+ - name: POSTGRES_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: xos-db-secret
+ key: postgres-password
diff --git a/xos-core/templates/db-secrets.yaml b/xos-core/templates/db-secrets.yaml
new file mode 100644
index 0000000..5a5ca79
--- /dev/null
+++ b/xos-core/templates/db-secrets.yaml
@@ -0,0 +1,22 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: xos-db-secret
+ namespace: default
+type: Opaque
+data:
+ postgres-password: {{ .Values.configs.core_config.database.password | b64enc | quote }}
diff --git a/xos-core/templates/db-service.yaml b/xos-core/templates/db-service.yaml
index a011362..802665a 100644
--- a/xos-core/templates/db-service.yaml
+++ b/xos-core/templates/db-service.yaml
@@ -21,7 +21,7 @@
spec:
type: NodePort
ports:
- - port: 5432
+ - port: 5432
targetPort: 5432
nodePort: {{ .Values.node_ports.db_service_port }}
protocol: TCP
diff --git a/xos-core/values.yaml b/xos-core/values.yaml
index 8f37704..ccb647c 100644
--- a/xos-core/values.yaml
+++ b/xos-core/values.yaml
@@ -24,8 +24,8 @@
tag: 'master'
pullPolicy: 'IfNotPresent'
xos_db:
- repository: xosproject/xos-postgres
- tag: 'master'
+ repository: postgres
+ tag: '10.3-alpine'
pullPolicy: 'IfNotPresent'
xos_tosca:
repository: xosproject/xos-tosca