aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/common/postgres/templates
AgeCommit message (Collapse)AuthorFilesLines
2021-07-12[COMMON] Added imagePullSecrets to common template files with some fixandreas-geissler1-0/+2
Added the missing definition for imagePullSecrets in the statefulsets.yaml deployment.yaml to support the registryGenerator Issue-ID: OOM-2789 Signed-off-by: andreas-geissler <andreas-geissler@telekom.de> Change-Id: I013ba52c9c49f95cd3d53fcaa9eb084adcbfe662
2021-03-24[ONAP] Upgrade crunchy imageTomasz Pietruszkiewicz1-0/+4
Set the newest version of crunchy-postgres image. In this image python 2.x was replaced by python 3.x. The crunchy-postgres image is used in few projects in the ONAP, not only in vnfsdk. Change-Id: I1799b6be66312d2418878533775c741b286bec61 Issue-ID: VNFSDK-647 Signed-off-by: Tomasz Pietruszkiewicz <tomasz.pietruszkiewicz@nokia.com>
2021-03-08[COMMON] Fix postgres data persistenceBruno Sakoto1-0/+3
This changes fixes postgres data lost that occurs when postgres pods are restarting. When crunchy data postgres image starts, it runs /opt/cpm/bin/setenv.sh script to set PGDATA folder. This script contains: -- export PGDATA=/pgdata/$HOSTNAME if [[ -v PGDATA_PATH_OVERRIDE ]]; then export PGDATA=/pgdata/$PGDATA_PATH_OVERRIDE fi -- Since postgres is now a deployment (commit 0b243b600), its pod name is different on each startup, hence HOSTNAME and PGDATA are also different each time. This change is leveraging crunchy data PGDATA_PATH_OVERRIDE environment variable to set PGDATA to a fixed path. By default, this path is set to /pgdata/data. Issue-ID: CPS-271 Change-Id: Icc0f05d64230a98bc21d8f2a74c12c6661e05482 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca>
2020-11-24[COMMON][POSTGRES] Uses new tpls for repos / imagesSylvain Desbureaux1-3/+3
This commit makes postgreSQL template to use the new generator for repositories and images. Issue-ID: OOM-2364 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Idac6c4cf2c36e3440d4a7c11bf7ed231d89cdb44
2020-10-19[COMMON] Add limits to postgres deployments.Sylvain Desbureaux1-2/+1
Having limits is important in order to have safe deployment. postgres didn't had one so let's add them. Issue-ID: OOM-2230 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I279e01b6be6cddab1f792c75026b41dca5c6c694
2020-09-16Merge "Remove field not defined in deployment specification"Sylvain Desbureaux1-1/+0
2020-09-15Remove field not defined in deployment specificationJakub Latusek1-1/+0
Change-Id: I811b5a5fe6f6c77209ab7f7b2da5fe188cf7b2db Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
2020-09-15Replace YAML comments with helm comments in templatesJakub Latusek1-0/+2
Change-Id: I8cb12dae07cc3984e7dcfc602afa4c2d07317e9a Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562
2020-07-07Make COMMON/POSTGRES compatible with Kubernetes v1.17milaszki1-1/+4
Issue-ID: OOM-2479 Signed-off-by: Daniel Milaszkiewicz <daniel.milaszkiewicz@nokia.com> Change-Id: Ic64b84db2c192cd5d737b5ef6d59aa4b4c20a48e
2020-05-25[COMMON] Allow to use ' in postgres passwordsKrzysztof Opasiak1-4/+11
' is one of characters that are placed in passwords by our default password generation algorith. As ' is a special character in SQL files we need to escape it before substituting environment variables in .sql file. Issue-ID: OOM-2317 Reported-by: Fiachra Corcoran <fiachra.corcoran@est.tech> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: I970eaf03fbcbfa8cb68df4a06ee27503d02d896a
2020-03-25[COMMON] Optimize common secret templateKrzysztof Opasiak2-9/+9
It turned out that our current implementation of common secret template is really heavy which makes onap linitng extremely long. To improve the situation let's introduce some results caching instead of processing templates over and over. For now we cannot simply replace common secret template because in mariadb-init we generate list of secrets on the fly so we will need to revisit this fragment later. Whole series of patches managed to reduce ONAP linting time to 40 mins. Issue-ID: OOM-2051 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Id2e743147afa37290df19b73feee67621f13f67c
2020-03-10[COMMON] Allow special characters in postgress passwordsKrzysztof Opasiak1-3/+37
Postgres image that we are currently using uses sed to replace passwords placeholders with their actual values at startup time. This apprach is very fragile and leads to issues if & happens to be a part of password as it has a special meaning in sed. To fix this issue let's just extract the setup.sql file from the container and process it on our own in init container using envsubst and then mount it to the main container to be used. Issue-ID: OOM-2317 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Ifd51d8f0af0099958caa209185fb7a87a0480bd2
2020-02-14[COMMON] fix primary PVC for postgres templateSylvain Desbureaux1-1/+0
The last line of the template rewrites PVC storage class and thus the behavior is not the expected one. This patch removes the faulty (and unecessary) line. Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ia0e2f6fbd7d40bbf0de719bbf35f0f0424e1a076
2020-02-07[COMMON] Use common secret template in postgresKrzysztof Opasiak2-29/+5
Use common secret template for storing DB credentials Issue-ID: OOM-2250 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Ic640bba21a368cf3dd7d3a712abd13907b86a217
2020-02-06[COMMON] Share deployment configuration in PostgresKrzysztof Opasiak3-246/+146
When I did diff between deployment-primary and deployment-replica it turned out that this is pretty much the same file apart from primary and replica words. To avoid making the same changes in both files, let's just introduce a template that can be included with parameter. Issue-ID: OOM-2246 Change-Id: Ia13b993b9f23008d6be6b3d0e8b745446048de4e Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
2020-02-01[ONAP-wide] Replace .Release.Name with common.releaseKrzysztof Opasiak11-18/+18
ONAP is too big to be deployed using helm install so we need to use a custom helm plugin helm deploy. This script deloys onap component by component instead of deploying evrything at once. Unfortunately this script also modifies the helm release by appending component name to it. As a result of this behavior our objects are called for example: onap-mariadb-galera-mariadb-galera-0 instead of just being called onap-mariadb-galera-0. This patch simplifies this naming convention by replacing all direct usages of .Release.Name with common.release macro which strips the component specific part from the release name. Issue-ID: OOM-2275 Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Change-Id: Ia8cead50d305adb00eef666d0a1ace74479b5183
2020-01-23[COMMON] Fix PV/PVC for postgresSylvain Desbureaux4-0/+13
When creating https://gerrit.onap.org/r/c/oom/+/99478, forgot to backport storage class part of https://gerrit.onap.org/r/c/oom/+/98962. Issue-ID: OOM-2234 Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I3c42b28ad5bea67eda004b0209c8a21783b539f1
2019-12-17[COMMON] Use deployment for postgresqlSylvain Desbureaux12-168/+465
Instead of statefulset + inner work in the container, use deployments in order to be more reliable Change-Id: Icf4fe1303ae3489c822558e28bb08b69af2d4970 Issue-ID: OOM-2234 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2019-12-05[Common] Use global storage templates for PVCSylvain Desbureaux2-59/+34
OOM has now templates in order to create the needed PVC, using: * a PV with a specific class when using a common nfs mount path between nodes (sames as today use) --> is the default behavior today * or a storage class if we want to use dynamic PV. On this case, we use (in order of priority): - persistence.storageClassOverride if set on the chart - global.persistence.storageClass if set globally - persistence.storageClass if set on the chart I've also aligned the PV creation of the different charts. I've also aligned the PVC creation of the different charts. I've removed unused mysql chart and (badly) used nfs-provisioner chart. I've also make cassandra backup work with dynamic PV (but RWX only for now). Change-Id: I0ea3f8c7514ca648d94b6c682684c06b822bbe0a Issue-ID: OOM-2229 Issue-ID: OOM-2228 Issue-ID: OOM-2227 Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
2018-10-30Add missing selectors on PVCAlexis de Talhouët1-0/+3
Change-Id: If156e738a26c7c19043657c97ac327125c5162db Issue-ID: OOM-1486 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
2018-09-25Updating charts to use common resource templateMandeep Khinda1-1/+1
Issue-ID: OOM-1145 Change-Id: I1510339a820802554b6e8b9a201619ef66be17a0 Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
2018-05-17Fix postgres startupBorislavG1-2/+7
Change-Id: I411447a908c16b3769a5819d8812a93b58623af6 Issue-ID: OOM-1094 Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
2018-05-07Fix persistent volume to be mapped to Release.NameBorislavG2-3/+3
Change-Id: I98754174e50537df2e82a9d9b40f471edff19e69 Issue-ID: OOM-907 Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
2018-04-03Add generic Postgres set for DCAEBorislavG4-0/+331
DCAE postgres set is based on Crunchy Data Statefulset Helm Example. It provides a statefulSet of two postgres replicas. Remaining work: tweak services and PVs. Adjust the chart to DCAE needs. Change-Id: Ic05f88fcde5c5967ebd93f944f953262df77d7c6 Issue-ID: OOM-853 Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>