Mounting the postgres config in xos-db
Change-Id: I4a7765f4afae791a8c2d8bea5f742b93db4649d0
diff --git a/xos-core/Chart.yaml b/xos-core/Chart.yaml
index b6bcbac..260617a 100644
--- a/xos-core/Chart.yaml
+++ b/xos-core/Chart.yaml
@@ -17,7 +17,7 @@
description: XOS - An Extensible Cloud Operating System
icon: https://guide.opencord.org/logos/xos.svg
-version: 2.3.2
+version: 2.3.3
# appVersion is of the xos-core and xos-chameleon containers.
# xos-tosca and xos-api-tester are versioned in values.yaml
diff --git a/xos-core/requirements.yaml b/xos-core/requirements.yaml
index 00edc4b..9ba8938 100644
--- a/xos-core/requirements.yaml
+++ b/xos-core/requirements.yaml
@@ -15,7 +15,7 @@
dependencies:
- name: xos-db
- version: 1.0.0
+ version: 1.0.1
repository: file://../xos-db
- name: xos-gui
version: 1.2.1
diff --git a/xos-db/Chart.yaml b/xos-db/Chart.yaml
index e66aac5..9553ed9 100644
--- a/xos-db/Chart.yaml
+++ b/xos-db/Chart.yaml
@@ -14,7 +14,7 @@
# limitations under the License.
name: xos-db
-version: 1.0.0
+version: 1.0.1
icon: https://www.postgresql.org/media/img/about/press/elephant.png
diff --git a/xos-db/templates/_helpers.tpl b/xos-db/templates/_helpers.tpl
index ad2a2b5..1244611 100644
--- a/xos-db/templates/_helpers.tpl
+++ b/xos-db/templates/_helpers.tpl
@@ -22,3 +22,12 @@
version: {{ .Chart.Version }}
{{- end }}
+{{- define "xos-db.postgresql-conf" }}
+
+listen_addresses = '*'
+
+# as per https://github.com/kubernetes/kubernetes/issues/71233
+huge_pages = off # on, off, or try
+
+{{- end }}
+
diff --git a/xos-db/templates/db-configmap.yaml b/xos-db/templates/db-configmap.yaml
new file mode 100644
index 0000000..af03cf5
--- /dev/null
+++ b/xos-db/templates/db-configmap.yaml
@@ -0,0 +1,24 @@
+---
+# 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: ConfigMap
+metadata:
+ name: xos-db
+ labels:
+ {{- include "xos-db.release_labels" . | indent 4 }}
+data:
+ config: |
+{{ include "xos-db.postgresql-conf" . | indent 4 }}
diff --git a/xos-db/templates/db-deployment.yaml b/xos-db/templates/db-deployment.yaml
index 9814677..4f0bee6 100644
--- a/xos-db/templates/db-deployment.yaml
+++ b/xos-db/templates/db-deployment.yaml
@@ -45,11 +45,22 @@
key: password
- name: PGDATA
value: "/var/lib/postgresql/data/pgdata"
-{{- if .Values.needDBPersistence }}
volumeMounts:
+ - name: xos-db-config
+ mountPath: /usr/local/share/postgresql/postgresql.conf.sample
+ subPath: config/postgresql.conf.sample
+{{- if .Values.needDBPersistence }}
- name: db-pv-storage
mountPath: "/var/lib/postgresql/data"
+{{- end }}
volumes:
+ - name: xos-db-config
+ configMap:
+ name: xos-db
+ items:
+ - key: config
+ path: config/postgresql.conf.sample
+{{- if .Values.needDBPersistence }}
- name: db-pv-storage
persistentVolumeClaim:
claimName: {{ .Values.pvClaimName }}