28 Commits

Author SHA1 Message Date
Steve Wilkerson
84f30ec103 Add release-annotation to pod spec, add missing annotations
This adds the release-annotation to the pod spec for the charts in
openstack-helm-infra. This also adds missing configmap annotations
to charts in openstack-helm-infra

Change-Id: Ie23f0c16a7a21d3929e98928db2bbcef69ae6490
2019-03-21 09:10:48 -05:00
Gupta, Sangeet (sg774j)
c7b1f8b50d MARIADB: Job failure policy
Added backoffLimit to exporter-create-sql-user job so that it
keeps retrying to restart the pod incase of an error. Also added
activeDeadlineSeconds for the pod created by this job to terminate
if it does not become ready in one hour.

Change-Id: Ib6214a887f959fed84108884c8d286624d2f164f
2019-03-18 12:40:43 +00:00
Pete Birley
a8fe949612 Mariadb: Support changing the root password
This PS udpates the mariadb chart to support changing the root password.

Additionally it moves to use three replicas in the gate

Change-Id: I286ad0b892e5ea2f85636a0c7af58598bcfdaec4
Signed-off-by: Pete Birley <pete@port.direct>
2019-03-12 20:03:27 +00:00
Steve Wilkerson
70e5769900 Remove set -x from exporter scripts and htk s3 user script
This removes set -x from the templates for the user creation
scripts for the mariadb and postgresql user templates, and it
also removes the set -x from the helm-toolkit job for creating
s3 users. This prevents sensitive credentials from being
displayed to the console when these scripts are run

Change-Id: I0a78d8190fbbae1b300b74ca560d76dedaaf6fc1
2019-02-19 14:42:17 -06:00
Zuul
6620f08e49 Merge "fix type error to streamline single-replica mariadb startup" 2019-02-07 17:21:07 +00:00
Chris Friesen
d99b1412e2 fix type error to streamline single-replica mariadb startup
The mariadb startup script was trying to optimize the single-replica
case but missed the fact that the variable it was checking was a
string rather than an int.

Converting it to an int before doing the comparison makes it work
as expected.

Change-Id: I8612e9e8ef5ec8ff61ecf0782f262a5feafd501a
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2019-02-06 17:34:27 -06:00
Steve Wilkerson
6e2ea01ae0 Mariadb: Use correct credentials for exporter in secret
This updates the mariadb chart to use the correct auth values for
the mariadb prometheus exporter. The correct credentials to use
are the credentials in the oslo_db endpoint

Change-Id: I2d325167d7ffdf911a56fe97b879cb13b0d4c195
2019-02-04 06:23:33 -06:00
Steve Wilkerson
4d170bea32 MariaDB: Remove unused exporter password credentials
This removes auth credentials from the mariadb exporter endpoint,
as the credentials used for the actual user are consumed from
the oslo_db endpoint instead.

Change-Id: I1419f50b7e0059763588028b55c982ad83446a33
2019-02-02 10:55:00 -06:00
Chris Wedgwood
b15605029e [MariaDB] Fix non-default setting for admin user
This allows the database administration username to be changed in
addition to the password (the configuration and documentation implies
this is possible, but the current implementation assumes root in a few
places).

Remove some unused env declarations.

Tested with and without Prometheus exporter enabled.

Change-Id: I8a48dac7a84fe583c7dc5ff0644ca14b1e5190d8
2019-01-31 17:29:52 +00:00
Zuul
0223b1f91c Merge "Mariadb: Add security context for mysql exporter pod/container" 2019-01-07 16:30:36 +00:00
Chris Wedgwood
0c4e37391f 'NOP' cleanup for more consistent white-space use in charts
Where we have the style '{{ ...' we should use the style '... }}'.

Change-Id: Ic3e779e4681370d396f95d3804ca27db5b9d3642
2019-01-03 22:45:49 +00:00
Steve Wilkerson
530e765815 Mariadb: Add security context for mysql exporter pod/container
This adds a security context to the mysql prometheus exporter pod,
which changes the user from root to the nobody user (uid 99 here)
instead

This also adds the container security context to explicitly set
allowPrivilegeEscalation to false

Change-Id: I5ddebb059e3c31c231fdc4c24190a65f23e37785
2019-01-03 16:15:47 -06:00
Pete Birley
0bf3674539 Revert "Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA"
This reverts commit 8d33a2911cda0c9e88406b9eeacbd8dfa70286f2.

Change-Id: Ic861b9bf9b337449b47a3558da8355e7a5bcacee
2018-12-16 04:21:46 +00:00
Mike Pham
8d33a2911c Add Egress Helm-toolkit function & enforce the nework policy at OSH-INFRA
This PS implements the helm toolkit function to generate the
Egress in kubernetes network policy manifest based on overrideable values.
It also enbale the K8s network policy at Osh-infra gate.

Change-Id: Icbe2a18c98dba795d15398dcdcac64228f6a7b4c
2018-12-14 16:32:40 -05:00
Pete Birley
977c523cef Mariadb: Share container PID namespaces under docker
This PS shares pid namespaces for containers in pods under docker,
bringing running in this runtime inline with other runc based container
backends, allowing the pause process in the pod to act as a reaper.

Change-Id: Ib5fc101d930446d848246eb5ca4d554b756cb91f
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-08 16:16:11 -06:00
Pete Birley
896385354e Mariadb: Support adoption of running single node mariadb deployment
This PS updates the mariadb chart to both support adoption of a
single instance of mariadb running the bash driven chart, which
did not support reforming a galera cluster by tracking state using
a configmap. Additionally basic logic is added for upgrading the
database as part of the normal rolling update flow.

Change-Id: I412de507112b38d6d2534e89f2a02f84bef3da63
Signed-off-by: Pete Birley <pete@port.direct>
2018-12-02 00:20:57 -06:00
Pete Birley
f6e84fe15f MariaDB: Galera cluster refactor
This PS updates the MariaDB chart to better support clustering,
using a configmap to track cluster state.

Change-Id: Ifd9c3d63353a9b587384b6f13c0863ecc4fbd956
Signed-off-by: Pete Birley <pete@port.direct>
2018-10-25 06:21:01 +00:00
Pete Birley
8bc03bf88c MariaDB: Move to use mariabackup instead of xtrabackup-v2
This PS moves to use mariabackup instead of xtrabackup-v2, for info
see:
 * https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#mariadb-backup-and-percona-xtrabackup
 * https://mariadb.com/kb/en/library/mariabackup-overview/#about-mariabackup

Additionally the readyness script is updated to match the order of
validation tests described in the mariadb/galera documentation.

Change-Id: I031c63d6305f1514ffdd53d77d621bc7edc0e68c
Signed-off-by: Pete Birley <pete@port.direct>
2018-10-25 05:43:59 +00:00
Chris Wedgwood
8dad346f3f [MariaDB] Bump to version 10.2.18 to avoid shutdown hangs
We see sporadic shutdown hangs that look to be the issue described at
https://jira.mariadb.org/browse/MDEV-15554

Upgrade minor version to address this.

Change-Id: Idf8403b44e871b5a32173bd153a8367519b239ec
2018-10-16 21:30:22 +00:00
Tin Lam
92e68d33ea Add network policy toolkit function
This patch set implements the helm toolkit function to generate a
kubernetes network policy manifest based on overrideable values.
This also adds a chart that shuts down all the ingress and egress
traffics in the namespace. This can be used to ensure the
whitelisted network policy works as intended.

Additionally, implementation is done for some infrastructure charts.

Change-Id: I78e87ef3276e948ae4dd2eb462b4b8012251c8c8
Co-Authored-By: Mike Pham <tp6510@att.com>
Signed-off-by: Tin Lam <tin@irrational.io>
2018-10-15 13:50:50 +00:00
Chris Wedgwood
8554bdcbef [MariaDB] Update/remove deprecated configuration
Change-Id: I18aa87602b63ecd051c21e007aff8cadccdd0cda
2018-10-11 15:31:31 +00:00
Zuul
7d228ef280 Merge "Mariadb: fix error logs - Invalid table or database name lost+found" 2018-10-02 04:16:06 +00:00
Zuul
b800169a17 Merge "MariaDB: init server accounts before serving externally" 2018-10-01 17:55:16 +00:00
Jawon Choo
35e633959c Mariadb: fix error logs - Invalid table or database name lost+found
This PS fixes the error logs in mariadb-server.
Each partition has its own lost+found directory and mysql consider
the directory as a database.

Change-Id: Ibce0dddb5065fd56fa841ebcb91c7c9f15de6c62
Closes-Bug: #1795381
2018-10-01 21:34:44 +09:00
Chris Wedgwood
4e1d7b67f9 [MariaDB] Allow for stable upgrades
Using a random bootstrap filename means any upgrade (even without
changes) causes MariaDB to churn and restart.

Change-Id: Ieaf577e413f8d672d24bf42c90b6110b52e542f0
2018-09-29 17:07:04 +00:00
Pete Birley
6b2d66354d MariaDB: init server accounts before serving externally
This PS updates the server init process to init desired accounts
before serving external requests.

Change-Id: Ida9e3b93ed332a621e0c2fcb39a9870886c9ffe7
Signed-off-by: Pete Birley <pete@port.direct>
2018-09-22 17:23:45 +00:00
Pete Birley
bb3ff98d53 Add release uuid to pods and rc objects
This PS adds the ability to attach a release uuid to pods and rc
objects as desired. A follow up ps will add the ability to add arbitary
annotations to the same objects.

Change-Id: Iceedba457a03387f6fc44eb763a00fd57f9d84a5
Signed-off-by: Pete Birley <pete@port.direct>
2018-09-13 05:35:35 +00:00
Steve Wilkerson
93630ac6e3 MariaDB: Move chart to openstack-helm-infra
This moves the mariadb chart to openstack-helm-infra as part of
the effort to move charts to the appropriate repositories

Change-Id: Ife56e28de46c536108cebb4f4cdf6bad2a415289
Story: 2002204
Task: 21725
2018-09-04 18:57:53 -05:00