22 Commits

Author SHA1 Message Date
Markin, Sergiy (sm515x)
5c4056ad34 [DATABASE] Add verify databases backup
HTK - added verify_databases_backup_in_directory function that is
going to be defined inside mariadb/postgresql/etcd charts.

Mariadb chart - added verify_databases_backup_archives function
implementation.

Added mariadb-verify container to mariadb-backup cronjob to run
verification process.

Added remove backup verification pocess - comparition of local and remote file md5 hashes.

PostgreSQL chart - added empty implementation of verify_databases_backup_archives() function. This is a subject for future realization.

Change-Id: I361cdb92c66b0b27539997d697adfd1e93c9a29d
2022-09-09 01:41:00 +00:00
Schubert Anselme
753a32c33d
Migrate CronJob resources to batch/v1 and PodDisruptionBudget resources to policy/v1
This change updates the following charts to migrate CronJob resources to the batch/v1 API version, available since v1.21. [0]
and to migrate PodDisruptionBudget to the policy/v1 API version, also available since v1.21. [1]

This also uplift ingress controller to 1.1.3

- ceph-client (CronJob)
- cert-rotation (CronJob)
- elasticsearch (CronJob)
- mariadb (CronJob & PodDisruptionBudget)
- postgresql (CronJob)

0: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#cronjob-v125
1: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#poddisruptionbudget-v125

Change-Id: Ia6189b98a86b3f7575dc4678bb3a0cce69562c93
2022-05-10 15:12:53 -04:00
Thiago Brito
6dcc7f8f89 Enable taint toleration for mariadb
This adds taint toleration support for openstack jobs

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: Iab78370182b15b48df964eb2dfdc957a9868c708
2022-03-29 11:34:48 -03:00
Gupta, Sangeet (sg774j)
47795919cb Mariadb: Enhance mariadb backup
* Add capability to retry uploading backup to remote server configured
  number of times and delay the retires randomly between configured
  minimum/maximum seconds.
* Enhanced error checking, logging and retrying logic.

Change-Id: Ida3649420bdd6d39ac6ba7412c8c7078a75e0a10
2021-11-20 02:06:28 +00:00
okozachenko
5db88a5fb4 Rename mariadb backup identities
Challenge:
Now remote_ks_admin and remote_rgw_user are using for user labels
of backup target openstack cloud.
When the backup user doesn't exist and we can enable job_ks_user
manifest.
But job_ks_user uses .Vaules.secrets.identity.admin and mariadb,
while secret-rgw and cron-job-backup-mariadb use .Values.secrets.
identity.remote_ks_admin and remote_rgw_user.
It requires to use same values for admin and remote_ks_admin,
and for mariadb and remote_rgw_user.
Seems it isbreaking values consistency.

Suggestion:
Now providing 2 kinds of backup - pvc and swift.
"remote_" means the swift backup.
In fact, mariadb chart has no case to access to keystone except
swift backup. So we can remove remote_xx_* prefix and there is
no confusion.

Change-Id: Ib82120611659bd36bae35f2e90054642fb8ee31f
2021-03-03 20:46:51 +02:00
KHIYANI, RAHUL (rk0850)
4397ed6152 Add missing security context template to mariadb-backup pod
Values are already overridden in values.yaml
https://github.com/openstack/openstack-helm-infra/blob/master/mariadb/values.yaml#L112-L122

Change-Id: I2931eb1408d1d8145b476a76ff8cfac36e9f2bfe
2020-08-01 20:56:38 +00:00
Huang, Sophie (sh879n)
f57aad9822 Fix MariaDB backup cronjob
There are two issues fixed here:
1) The "backoffLimit" and "activeDeadlineSeconds" are attributes of
Job, not CronJob. Therefore, they should be placed in the Job template
part of the cron-job-backup-mariadb.yaml
2) The backup cronjob had two names in the values.yaml
"backup_mariadb" and "mariadb_backup" in various places.
3) When empty table is used, the get_rows function of
restore_mariadb.sh exit with a code of 1, which causes the invoking
function to error out.

Change-Id: Ifa85b97f56e74f7994a2bde2e12c64fb0c9acafb
2020-07-30 15:51:30 +00:00
Rahul Khiyani
3978c6a33c Revert "Add missing pod level security context template for mariadb-backup"
Reverting this change as the health checks are failing with permission denied.
Need to dig more and do through testing.

This reverts commit 0da55ad85ef621baa22887799e3146cecd93d368.

Change-Id: I9de78186a2c3a6d181bedfdb8b84abeecce46bd6
2020-07-29 14:26:28 +00:00
Gupta, Sangeet (sg774j)
347ec225ed mariadb: Fix the indentation
Change-Id: Ibef80effb626024f9dc947bc1c372df3120bff2d
2020-07-28 12:29:13 +00:00
Gupta, Sangeet (sg774j)
d458e888a9 feat(tls): add tls to mariadb exporter charts
This patchset updates the .cnf files to support tls and mount
the certificates where needed.

Change-Id: I5aff6821f2649f55dd4444896379491b504415bb
2020-07-27 21:41:46 +00:00
KHIYANI, RAHUL (rk0850)
0da55ad85e Add missing pod level security context template for mariadb-backup
This change adds security-context template at pod level and also it
removes duplicate run as user value for mariadb-backup container as
it's already given at pod level

Change-Id: I01da9d1b5a2b8d44f4bbf52e15842e2316c6086c
2020-07-21 16:52:55 +00:00
Huang, Sophie (sh879n)
573ac49939 Mariadb backup/restore enhancements
Below enhancements are made to Mariadb backup:
1) Used new helm-toolkit function to send/retrieve Mariadb
   backups to/from RGW via OpenStack Swift API.
2) Modified the backup script such that the database backup
   tarball can be sent to RGW.
3) Added a keystone user for RGW access.
4) Added a secret for OpenStack Swift API access.
5) Changed the cronjob image and runAsUser
6) Modified the restore script so that archives stored remotely
   on RGW can be used for the restore data source.
7) Added functions to the restore script to retrieve data
   from an archive for tables, table rows and table schema of a databse
8) Added a secret containing all the backup/restore related
   configuration needed for invoking the backup/restore operation
   from a different application or namespace.

Change-Id: Iadb9438fe419cded374897b43337039609077e61
2020-06-24 21:13:21 +00:00
Zuul
c0aa66a9f1 Merge "mariadb: Add metadata labels to CronJob" 2020-06-02 19:38:25 +00:00
Zuul
aa957ea2c4 Merge "Mariadb: Add apparmor profile to init-containers" 2020-05-14 18:10:47 +00:00
KHIYANI, RAHUL (rk0850)
845385de38 Mariadb: Add apparmor profile to init-containers
This change adds apparmor profile to mariadb init containers and
ingress init container

Change-Id: I843baf221a82d234104b14db5b02026fe87e6063
2020-05-14 09:57:21 -05:00
Gage Hugo
d14d826b26 Remove OSH Authors copyright
The current copyright refers to a non-existent group
"openstack helm authors" with often out-of-date references that
are confusing when adding a new file to the repo.

This change removes all references to this copyright by the
non-existent group and any blank lines underneath.

Change-Id: I1882738cf9757c5350a8533876fd37b5920b5235
2020-05-07 02:11:15 +00:00
Phil Sphicas
df920e7a47 mariadb: Add metadata labels to CronJob
This change adds the same helm-toolkit-generated metadata labels to
the CronJob itself that are applied to the Jobs it creates.

Change-Id: I217422e9e9c30d6a93d8e6aa4501a19e9c74c9f6
2020-03-16 18:23:28 -07:00
KHIYANI, RAHUL (rk0850)
d50371be9b Adding default apparmor profile to mariadb complete pods
Change-Id: I9a62b36c8cda0a6eaf8ac6b40f138b2706c63d15
2020-02-24 15:43:06 +00:00
Pete Birley
2abf62ff4d OSH-Infra: Add emptydirs for tmp
This PS adds emptydirs backing the /tmp directory in pods, which
is required in most cases for full operation when using a read only
filesystem backing the container.

Additionally some yaml indent issues are resolved.

Change-Id: I8b7f1614da059783254aa6efc09facf23fca3cad
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-20 20:50:59 +00:00
Pete Birley
e582a7df66 MariaDB: remove unused options and function from backup script
This PS removes some unused CLI options and functions from the backup
script.

Change-Id: Ie7abb3bda0689afa0d128552a85c985e1653552f
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-07 19:45:11 +00:00
Pete Birley
abc4af9920 MariaDB: Fix backup job init container
This PS fixes the backup job to have an appropriate init container
and service account.

Change-Id: I93d7ba93c9846508262951efba0d6034f6341ae8
Signed-off-by: Pete Birley <pete@port.direct>
2019-04-07 15:12:55 +00:00
Koffi Nogbe
2379b94b3d Add mariadb backup capability to mariadb chart
* backup script for mariadb
 * restore script for mariadb
 * cronjob to control backup automation for mariadb
 * add parameters to values.yaml

Change-Id: Ib0b6744f519ea1919507df0c2a50b45b27ac86ab
2019-03-30 22:34:14 +00:00