From a2caa9e121712821088c5756c81df41501da8b2d Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Thu, 16 Jul 2020 15:52:36 -0600 Subject: [PATCH 01/31] added mariadb 10.2 --- .DS_Store | Bin 0 -> 6148 bytes stable/.DS_Store | Bin 0 -> 6148 bytes stable/bitnami/.DS_Store | Bin 0 -> 6148 bytes stable/bitnami/mariadb/.DS_Store | Bin 0 -> 10244 bytes stable/bitnami/mariadb/mariadb101/.DS_Store | Bin 0 -> 6148 bytes stable/bitnami/mariadb/mariadb101/Chart.yaml | 22 + .../mariadb/mariadb101/README-original.md | 342 ++++++++++ stable/bitnami/mariadb/mariadb101/README.md | 106 ++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb101/templates/NOTES.txt | 49 ++ .../mariadb/mariadb101/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb101/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb101/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb101/templates/role.yaml | 19 + .../mariadb101/templates/rolebinding.yaml | 19 + .../mariadb/mariadb101/templates/secrets.yaml | 39 ++ .../mariadb101/templates/serviceaccount.yaml | 12 + .../mariadb101/templates/servicemonitor.yaml | 35 ++ .../mariadb101/templates/slave-configmap.yaml | 16 + .../mariadb101/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb101/templates/slave-svc.yaml | 49 ++ .../mariadb101/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb101/templates/tests.yaml | 12 + .../mariadb/mariadb101/values-ironbank.yaml | 533 ++++++++++++++++ .../mariadb/mariadb101/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb101/values.schema.json | 169 +++++ stable/bitnami/mariadb/mariadb101/values.yaml | 583 +++++++++++++++++ stable/bitnami/mariadb/mariadb102/Chart.yaml | 22 + .../mariadb/mariadb102/README-original.md | 342 ++++++++++ stable/bitnami/mariadb/mariadb102/README.md | 342 ++++++++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb102/templates/NOTES.txt | 49 ++ .../mariadb/mariadb102/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb102/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb102/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb102/templates/role.yaml | 19 + .../mariadb102/templates/rolebinding.yaml | 19 + .../mariadb/mariadb102/templates/secrets.yaml | 39 ++ .../mariadb102/templates/serviceaccount.yaml | 12 + .../mariadb102/templates/servicemonitor.yaml | 35 ++ .../mariadb102/templates/slave-configmap.yaml | 16 + .../mariadb102/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb102/templates/slave-svc.yaml | 49 ++ .../mariadb102/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb102/templates/tests.yaml | 12 + .../mariadb/mariadb102/values-ironbank.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb102/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb102/values.schema.json | 169 +++++ stable/bitnami/mariadb/mariadb102/values.yaml | 583 +++++++++++++++++ stable/bitnami/mariadb/mariadb103/Chart.yaml | 22 + .../mariadb/mariadb103/README-original.md | 342 ++++++++++ stable/bitnami/mariadb/mariadb103/README.md | 342 ++++++++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb103/templates/NOTES.txt | 49 ++ .../mariadb/mariadb103/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb103/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb103/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb103/templates/role.yaml | 19 + .../mariadb103/templates/rolebinding.yaml | 19 + .../mariadb/mariadb103/templates/secrets.yaml | 39 ++ .../mariadb103/templates/serviceaccount.yaml | 12 + .../mariadb103/templates/servicemonitor.yaml | 35 ++ .../mariadb103/templates/slave-configmap.yaml | 16 + .../mariadb103/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb103/templates/slave-svc.yaml | 49 ++ .../mariadb103/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb103/templates/tests.yaml | 12 + .../mariadb/mariadb103/values-ironbank.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb103/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb103/values.schema.json | 169 +++++ stable/bitnami/mariadb/mariadb103/values.yaml | 583 +++++++++++++++++ stable/bitnami/mariadb/mariadb104/Chart.yaml | 22 + .../mariadb/mariadb104/README-original.md | 342 ++++++++++ stable/bitnami/mariadb/mariadb104/README.md | 342 ++++++++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb104/templates/NOTES.txt | 49 ++ .../mariadb/mariadb104/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb104/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb104/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb104/templates/role.yaml | 19 + .../mariadb104/templates/rolebinding.yaml | 19 + .../mariadb/mariadb104/templates/secrets.yaml | 39 ++ .../mariadb104/templates/serviceaccount.yaml | 12 + .../mariadb104/templates/servicemonitor.yaml | 35 ++ .../mariadb104/templates/slave-configmap.yaml | 16 + .../mariadb104/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb104/templates/slave-svc.yaml | 49 ++ .../mariadb104/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb104/templates/tests.yaml | 12 + .../mariadb/mariadb104/values-ironbank.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb104/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb104/values.schema.json | 169 +++++ stable/bitnami/mariadb/mariadb104/values.yaml | 583 +++++++++++++++++ stable/bitnami/mariadb/mariadb105/Chart.yaml | 22 + .../mariadb/mariadb105/README-original.md | 342 ++++++++++ stable/bitnami/mariadb/mariadb105/README.md | 342 ++++++++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb105/templates/NOTES.txt | 49 ++ .../mariadb/mariadb105/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb105/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb105/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb105/templates/role.yaml | 19 + .../mariadb105/templates/rolebinding.yaml | 19 + .../mariadb/mariadb105/templates/secrets.yaml | 39 ++ .../mariadb105/templates/serviceaccount.yaml | 12 + .../mariadb105/templates/servicemonitor.yaml | 35 ++ .../mariadb105/templates/slave-configmap.yaml | 16 + .../mariadb105/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb105/templates/slave-svc.yaml | 49 ++ .../mariadb105/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb105/templates/tests.yaml | 12 + .../mariadb/mariadb105/values-ironbank.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb105/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb105/values.schema.json | 169 +++++ stable/bitnami/mariadb/mariadb105/values.yaml | 583 +++++++++++++++++ 140 files changed, 20127 insertions(+) create mode 100644 .DS_Store create mode 100644 stable/.DS_Store create mode 100644 stable/bitnami/.DS_Store create mode 100644 stable/bitnami/mariadb/.DS_Store create mode 100644 stable/bitnami/mariadb/mariadb101/.DS_Store create mode 100644 stable/bitnami/mariadb/mariadb101/Chart.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/README-original.md create mode 100644 stable/bitnami/mariadb/mariadb101/README.md create mode 100644 stable/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md create mode 100644 stable/bitnami/mariadb/mariadb101/templates/NOTES.txt create mode 100644 stable/bitnami/mariadb/mariadb101/templates/_helpers.tpl create mode 100644 stable/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/master-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/master-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/master-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/role.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/rolebinding.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/secrets.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/slave-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/test-runner.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/templates/tests.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/values-ironbank.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/values-production.yaml create mode 100644 stable/bitnami/mariadb/mariadb101/values.schema.json create mode 100644 stable/bitnami/mariadb/mariadb101/values.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/Chart.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/README-original.md create mode 100644 stable/bitnami/mariadb/mariadb102/README.md create mode 100644 stable/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md create mode 100644 stable/bitnami/mariadb/mariadb102/templates/NOTES.txt create mode 100644 stable/bitnami/mariadb/mariadb102/templates/_helpers.tpl create mode 100644 stable/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/master-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/master-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/master-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/role.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/rolebinding.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/secrets.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/slave-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/test-runner.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/templates/tests.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/values-ironbank.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/values-production.yaml create mode 100644 stable/bitnami/mariadb/mariadb102/values.schema.json create mode 100644 stable/bitnami/mariadb/mariadb102/values.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/Chart.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/README-original.md create mode 100644 stable/bitnami/mariadb/mariadb103/README.md create mode 100644 stable/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md create mode 100644 stable/bitnami/mariadb/mariadb103/templates/NOTES.txt create mode 100644 stable/bitnami/mariadb/mariadb103/templates/_helpers.tpl create mode 100644 stable/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/master-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/master-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/master-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/role.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/rolebinding.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/secrets.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/slave-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/test-runner.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/templates/tests.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/values-ironbank.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/values-production.yaml create mode 100644 stable/bitnami/mariadb/mariadb103/values.schema.json create mode 100644 stable/bitnami/mariadb/mariadb103/values.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/Chart.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/README-original.md create mode 100644 stable/bitnami/mariadb/mariadb104/README.md create mode 100644 stable/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md create mode 100644 stable/bitnami/mariadb/mariadb104/templates/NOTES.txt create mode 100644 stable/bitnami/mariadb/mariadb104/templates/_helpers.tpl create mode 100644 stable/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/master-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/master-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/master-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/role.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/rolebinding.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/secrets.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/slave-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/test-runner.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/templates/tests.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/values-ironbank.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/values-production.yaml create mode 100644 stable/bitnami/mariadb/mariadb104/values.schema.json create mode 100644 stable/bitnami/mariadb/mariadb104/values.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/Chart.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/README-original.md create mode 100644 stable/bitnami/mariadb/mariadb105/README.md create mode 100644 stable/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md create mode 100644 stable/bitnami/mariadb/mariadb105/templates/NOTES.txt create mode 100644 stable/bitnami/mariadb/mariadb105/templates/_helpers.tpl create mode 100644 stable/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/master-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/master-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/master-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/role.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/rolebinding.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/secrets.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/slave-svc.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/test-runner.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/templates/tests.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/values-ironbank.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/values-production.yaml create mode 100644 stable/bitnami/mariadb/mariadb105/values.schema.json create mode 100644 stable/bitnami/mariadb/mariadb105/values.yaml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..25ed2fe0ff577d2b9316655dfbcf35d30278d971 GIT binary patch literal 6148 zcmeHK&1xGl5FR;hqID?sA&~Z_OP~i+yfm!?p|EwGgAakwEypP{ zQF#_S`-9fmogKx8>0o@)+<2$+GD`Eo&?KkH07E_d*1{Gn+a literal 0 HcmV?d00001 diff --git a/stable/.DS_Store b/stable/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9bf56c712d145e45372a617eff804c6b01aef0bd GIT binary patch literal 6148 zcmeHK&2G~`5T0!V*`z{52&r(}3lfJQ#i9@-gk+`V&>NBw913df+B6o9w~ZYlNP~Rg zCEy8o6<&Y`;Q`>=pH{>Mi4#I}N1FX+cV>39pY2^Q5wX!M_K12!#GwjXT{OQCfx4&zF)rgMf z#c`DB=r7T6mKNn;@RhBtw=P|7bKd3ME8UmDSk8koEN8_iobIXKldv2|)_y8wc5a8! zvox9S_pWctybRMknd;;;P7w0qd78&^K9aLMF7!Nsad6(@o&Da;#lqVfdVO*4fw%07 z#c(+2i>{yyZRGJ(#?Gw>VwC|EO0&47-+=s}|4T6O0-wZ-Qx_$@~Z&mDQ$0 zk~F1+V(?a&J@1^e&xly%>br9TtcX_CumE|lcIL5 zBKuIAV?)=A?310)3G&B{%HL{P=sLMD4A{4yZ(NuayM;Oi90PyKfZ87fRH1LNGN`u> zH2MkvY++anZ1vNia)d?SVr38>2s5cblgjKBgPC-U3mfNKtPGlTV)pXEY-MI|C`?z! z{6dEl^9{PzG2j?jWnkTOd+Pju{QLX=YLe?Y1{?$b6$7lb6YPwzBzv|t7N^cy0X={! pQE`<)or1<5$J$Uw@eQaJ_=GZmzQxKQMj-A-K-1tF$G~4@;0KjDm^A2c)da`bl$VHuLs7UQ50E;LTfV*6FlcYJczj zd|sDZZ@t6g{^;lB>}q~}V^#tJzgi=&9WLM&oj+K)2*z2evojo7R4uX@nE_^i8CW+4 z+&(5>t=oh1^D+a>z>_mT`-4Iy^c|KK&DMd&v;c@z3>!h8ej2GpIrJTt7I6ec*iuAW zDqM>pY&pi2%kv$U7Hv5Q*L(&VeXFeE0Yewx5$hAgaBf*TuEDvvp;abk-`=J}L?2l@^yJ=$NAzbLlAFMm2(QMGm6xu(XH~ P6#fw~G_YX?o|S;}@L^oK=bOaBQE z>Rk~3i^YpxJ@|L{2Q2#Lhi&XO%^VhXvGZW&O_KL!I^WMW%bOyEaAWA}2&o7m1sd_? zOVBMb@|?6|w!!b*0*@gdAs6|`Lpsu+Ns|gl1*8H}0jYpg;4CTt|FelH7nzs6R6r^q z6__bN-VZ7?;%)Ay%+pr~bhHEjUx3@xU<`Et%~83xxt}smQ(;b4Jz$=Sd5M8pIy_fN zICz`;Df28HVU~_CUm5cX1=H0bPo?1q+sw;eDj*d&t^ldsOQ-{tdk+Qa`h6#i_q;In z;5qq9Z9y}CQ-e`PjyLLedCqsQ8wUM>rv1bln}u`dFDOb$DP1nTbPnQ?GjIpPe#7lO zCs&W$!GXuekK;I;ja~0a&>roUuRe&Qfg42a9!(DXHiW!*8bp3PYQ)3H@6&l4_CQgJ zN^!S*Gf8x_u2)p+o<6RqNxiOBRMV)9$3^A(ZTY;ytjL;$wAPOwcu z*k&5`(cz@F0yf0XVdupP!Zrn9TMMv%0qk1NH``h#*p?t{D-C<{!`WH^8)E0M^I`>I zTMMv(qco|2R6r^q6_5&?kOG@*9+jN`Kg|C9|AbbP(?|uR0%uVHTxdGY27I!=M_`K| zlAN`x&|1)lk+>=IGzB_(91orz$HN6Vj=uwq#A?J7gR#y1lzF%Vc1k}6WF7X%`hR|o M``@4Jt!w@N2e`8Vod5s; literal 0 HcmV?d00001 diff --git a/stable/bitnami/mariadb/mariadb101/.DS_Store b/stable/bitnami/mariadb/mariadb101/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..453159e26a1704ff08b61396d2e83a365c619586 GIT binary patch literal 6148 zcmeHKyG{c!5FCdfC8UWW1e90O5Q&=R2uVRf13y4sKp-zcf<$)>|G+QseS84SuB~wA zK#LIUO6&1scWh5|b_~F^mV-l}4xmC8EN`*+!em^0%}SxCN_5JxKod{sVuJBnv~`#Q zroeAgK)&5AoZyCE?LBhe@9B8f?~P|Yj?3Y2MBjf`V+|;wk5Lr!8pUkl3L~BbLp&5C z-EI`wz&ScNMjL0u1I)OV5w7V|u4~LwWr9J(@f>kfx%wgF=8W%ZJ(^Yb@RHlZHXfCI zDJ$fxBhEVGj6L>Farb$a6=#O*GtaXV@ywNHfF(6rkX1NW=VFmdmB@273S3RDtIyv? z_SGfFE!$*^I7Ep&M=jzACvuea7G<$%_OBG+oh??Wd9>0LFa=D3l>%};By_2Trk;lj)=yilCZ zPX0v0;Zl!QngXUkQGpHLtjqo1`TqT1OtO|KU<&*x1zfp((Qa`|;ci{qoZPhu{gN&w nahXR=VG*ult;kipM_1!mA{Am9F!RVBn*9+_8LTh`epG=EH(->2 literal 0 HcmV?d00001 diff --git a/stable/bitnami/mariadb/mariadb101/Chart.yaml b/stable/bitnami/mariadb/mariadb101/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/stable/bitnami/mariadb/mariadb101/README-original.md b/stable/bitnami/mariadb/mariadb101/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb101/README.md b/stable/bitnami/mariadb/mariadb101/README.md new file mode 100644 index 0000000..cea8833 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/README.md @@ -0,0 +1,106 @@ +# MariaDB 10.1 + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Chart Values + +| Key | Type | Default | +|-----|------|---------| +| db.forcePassword | bool | `true` | | +| db.injectSecretsAsVolume | bool | `true` | | +| db.name | string | `"my_database"` | | +| db.password | string | `""` | | +| db.user | string | `""` | | +| image.debug | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"registry1.dsop.io/opensource/mariadb"` | | +| image.tag | string | `"10.1.45"` | | +| master.affinity | object | `{}` | | +| master.antiAffinity | string | `"soft"` | | +| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=127.0.0.1\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\nlog-infile=0\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| master.extraEnvVars | string | `nil` | | +| master.extraEnvVarsCM | string | `nil` | | +| master.extraEnvVarsSecret | string | `nil` | | +| master.extraInitContainers | list | `[]` | | +| master.livenessProbe.enabled | bool | `true` | | +| master.livenessProbe.failureThreshold | int | `3` | | +| master.livenessProbe.initialDelaySeconds | int | `120` | | +| master.livenessProbe.periodSeconds | int | `10` | | +| master.livenessProbe.successThreshold | int | `1` | | +| master.livenessProbe.timeoutSeconds | int | `1` | | +| master.nodeSelector | object | `{}` | | +| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| master.persistence.annotations | object | `{}` | | +| master.persistence.enabled | bool | `true` | | +| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | +| master.persistence.size | string | `"8Gi"` | | +| master.podDisruptionBudget.enabled | bool | `false` | | +| master.podDisruptionBudget.minAvailable | int | `1` | | +| master.readinessProbe.enabled | bool | `true` | | +| master.readinessProbe.failureThreshold | int | `3` | | +| master.readinessProbe.initialDelaySeconds | int | `30` | | +| master.readinessProbe.periodSeconds | int | `10` | | +| master.readinessProbe.successThreshold | int | `1` | | +| master.readinessProbe.timeoutSeconds | int | `1` | | +| master.resources | object | `{}` | | +| master.service.annotations | object | `{}` | | +| master.tolerations | list | `[]` | | +| master.updateStrategy.type | string | `"RollingUpdate"` | | +| metrics.enabled | bool | `false` | | +| rbac.create | bool | `false` | | +| replication.enabled | bool | `true` | | +| replication.forcePassword | bool | `true` | | +| replication.injectSecretsAsVolume | bool | `true` | | +| replication.password | string | `""` | | +| replication.user | string | `"replicator"` | | +| rootUser.forcePassword | bool | `true` | | +| rootUser.injectSecretsAsVolume | bool | `true` | | +| rootUser.password | string | `""` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1001` | | +| securityContext.runAsUser | int | `1001` | | +| service.port | int | `3306` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `false` | | +| slave.affinity | object | `{}` | | +| slave.antiAffinity | string | `"soft"` | | +| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=127.0.0.1\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\nlocal-infile=0\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| slave.extraEnvVars | string | `nil` | | +| slave.extraEnvVarsCM | string | `nil` | | +| slave.extraEnvVarsSecret | string | `nil` | | +| slave.extraInitContainers | list | `[]` | | +| slave.livenessProbe.enabled | bool | `true` | | +| slave.livenessProbe.failureThreshold | int | `3` | | +| slave.livenessProbe.initialDelaySeconds | int | `120` | | +| slave.livenessProbe.periodSeconds | int | `10` | | +| slave.livenessProbe.successThreshold | int | `1` | | +| slave.livenessProbe.timeoutSeconds | int | `1` | | +| slave.nodeSelector | object | `{}` | | +| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| slave.persistence.annotations | string | `nil` | | +| slave.persistence.enabled | bool | `true` | | +| slave.persistence.size | string | `"8Gi"` | | +| slave.podDisruptionBudget.enabled | bool | `false` | | +| slave.podDisruptionBudget.minAvailable | int | `1` | | +| slave.readinessProbe.enabled | bool | `true` | | +| slave.readinessProbe.failureThreshold | int | `3` | | +| slave.readinessProbe.initialDelaySeconds | int | `45` | | +| slave.readinessProbe.periodSeconds | int | `10` | | +| slave.readinessProbe.successThreshold | int | `1` | | +| slave.readinessProbe.timeoutSeconds | int | `1` | | +| slave.replicas | int | `2` | | +| slave.resources | object | `{}` | | +| slave.service.annotations | object | `{}` | | +| slave.tolerations | list | `[]` | | +| slave.updateStrategy.type | string | `"RollingUpdate"` | | +| tests.enabled | bool | `false` | | +| volumePermissions.enabled | bool | `false` | | +| volumePermissions.image.pullPolicy | string | `"Always"` | | +| volumePermissions.image.repository | string | `"registry1.dsop.io/redhat/ubi/ubi8"` | | +| volumePermissions.image.tag | float | `8.2` | | +| volumePermissions.resources | object | `{}` | | diff --git a/stable/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml b/stable/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/stable/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md b/stable/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/stable/bitnami/mariadb/mariadb101/templates/NOTES.txt b/stable/bitnami/mariadb/mariadb101/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/_helpers.tpl b/stable/bitnami/mariadb/mariadb101/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml b/stable/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/master-configmap.yaml b/stable/bitnami/mariadb/mariadb101/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb101/templates/master-pdb.yaml b/stable/bitnami/mariadb/mariadb101/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml b/stable/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/master-svc.yaml b/stable/bitnami/mariadb/mariadb101/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/stable/bitnami/mariadb/mariadb101/templates/role.yaml b/stable/bitnami/mariadb/mariadb101/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/rolebinding.yaml b/stable/bitnami/mariadb/mariadb101/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/secrets.yaml b/stable/bitnami/mariadb/mariadb101/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml b/stable/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml b/stable/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml b/stable/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml b/stable/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml b/stable/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/slave-svc.yaml b/stable/bitnami/mariadb/mariadb101/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/test-runner.yaml b/stable/bitnami/mariadb/mariadb101/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/templates/tests.yaml b/stable/bitnami/mariadb/mariadb101/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb101/values-ironbank.yaml b/stable/bitnami/mariadb/mariadb101/values-ironbank.yaml new file mode 100644 index 0000000..04309ca --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/values-ironbank.yaml @@ -0,0 +1,533 @@ +image: + repository: registry1.dsop.io/opensource/mariadb + tag: 10.1.45 + pullPolicy: IfNotPresent + debug: false + + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + repository: registry1.dsop.io/redhat/ubi/ubi8 + tag: 8.2 + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + create: false + +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +rootUser: + password: "" + forcePassword: true + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + log-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + local-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: false + # image: + # registry: docker.io + # repository: bitnami/mysqld-exporter + # tag: 0.12.1-debian-10-r146 + # pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + # resources: {} + # annotations: + # prometheus.io/scrape: "true" + # prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + # extraArgs: + # master: [] + # slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + # livenessProbe: + # enabled: true + # ## + # ## Initializing the database could take some time + # initialDelaySeconds: 120 + # ## + # ## Default Kubernetes values + # periodSeconds: 10 + # timeoutSeconds: 1 + # successThreshold: 1 + # failureThreshold: 3 + # readinessProbe: + # enabled: true + # initialDelaySeconds: 30 + # ## + # ## Default Kubernetes values + # periodSeconds: 10 + # timeoutSeconds: 1 + # successThreshold: 1 + # failureThreshold: 3 + + # # Enable this if you're using https://github.com/coreos/prometheus-operator + # serviceMonitor: + # enabled: false + # ## Specify a namespace if needed + # # namespace: monitoring + # # fallback to the prometheus default unless specified + # # interval: 10s + # # scrapeTimeout: 10s + # ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + # ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + # ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + # selector: + # prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: false + # resources: {} + # testFramework: + # image: + # registry: docker.io + # repository: dduportal/bats + # tag: 0.4.0 + # resources: {} diff --git a/stable/bitnami/mariadb/mariadb101/values-production.yaml b/stable/bitnami/mariadb/mariadb101/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb101/values.schema.json b/stable/bitnami/mariadb/mariadb101/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/stable/bitnami/mariadb/mariadb101/values.yaml b/stable/bitnami/mariadb/mariadb101/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/stable/bitnami/mariadb/mariadb101/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb102/Chart.yaml b/stable/bitnami/mariadb/mariadb102/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/stable/bitnami/mariadb/mariadb102/README-original.md b/stable/bitnami/mariadb/mariadb102/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb102/README.md b/stable/bitnami/mariadb/mariadb102/README.md new file mode 100644 index 0000000..6901aa7 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/README.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml b/stable/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/stable/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md b/stable/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/stable/bitnami/mariadb/mariadb102/templates/NOTES.txt b/stable/bitnami/mariadb/mariadb102/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/_helpers.tpl b/stable/bitnami/mariadb/mariadb102/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml b/stable/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/master-configmap.yaml b/stable/bitnami/mariadb/mariadb102/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb102/templates/master-pdb.yaml b/stable/bitnami/mariadb/mariadb102/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml b/stable/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/master-svc.yaml b/stable/bitnami/mariadb/mariadb102/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/stable/bitnami/mariadb/mariadb102/templates/role.yaml b/stable/bitnami/mariadb/mariadb102/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/rolebinding.yaml b/stable/bitnami/mariadb/mariadb102/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/secrets.yaml b/stable/bitnami/mariadb/mariadb102/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml b/stable/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml b/stable/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml b/stable/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml b/stable/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml b/stable/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/slave-svc.yaml b/stable/bitnami/mariadb/mariadb102/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/test-runner.yaml b/stable/bitnami/mariadb/mariadb102/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/templates/tests.yaml b/stable/bitnami/mariadb/mariadb102/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb102/values-ironbank.yaml b/stable/bitnami/mariadb/mariadb102/values-ironbank.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/values-ironbank.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb102/values-production.yaml b/stable/bitnami/mariadb/mariadb102/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb102/values.schema.json b/stable/bitnami/mariadb/mariadb102/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/stable/bitnami/mariadb/mariadb102/values.yaml b/stable/bitnami/mariadb/mariadb102/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/stable/bitnami/mariadb/mariadb102/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb103/Chart.yaml b/stable/bitnami/mariadb/mariadb103/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/stable/bitnami/mariadb/mariadb103/README-original.md b/stable/bitnami/mariadb/mariadb103/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb103/README.md b/stable/bitnami/mariadb/mariadb103/README.md new file mode 100644 index 0000000..6901aa7 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/README.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml b/stable/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/stable/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md b/stable/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/stable/bitnami/mariadb/mariadb103/templates/NOTES.txt b/stable/bitnami/mariadb/mariadb103/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/_helpers.tpl b/stable/bitnami/mariadb/mariadb103/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml b/stable/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/master-configmap.yaml b/stable/bitnami/mariadb/mariadb103/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb103/templates/master-pdb.yaml b/stable/bitnami/mariadb/mariadb103/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml b/stable/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/master-svc.yaml b/stable/bitnami/mariadb/mariadb103/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/stable/bitnami/mariadb/mariadb103/templates/role.yaml b/stable/bitnami/mariadb/mariadb103/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/rolebinding.yaml b/stable/bitnami/mariadb/mariadb103/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/secrets.yaml b/stable/bitnami/mariadb/mariadb103/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml b/stable/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml b/stable/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml b/stable/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml b/stable/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml b/stable/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/slave-svc.yaml b/stable/bitnami/mariadb/mariadb103/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/test-runner.yaml b/stable/bitnami/mariadb/mariadb103/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/templates/tests.yaml b/stable/bitnami/mariadb/mariadb103/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb103/values-ironbank.yaml b/stable/bitnami/mariadb/mariadb103/values-ironbank.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/values-ironbank.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb103/values-production.yaml b/stable/bitnami/mariadb/mariadb103/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb103/values.schema.json b/stable/bitnami/mariadb/mariadb103/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/stable/bitnami/mariadb/mariadb103/values.yaml b/stable/bitnami/mariadb/mariadb103/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/stable/bitnami/mariadb/mariadb103/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb104/Chart.yaml b/stable/bitnami/mariadb/mariadb104/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/stable/bitnami/mariadb/mariadb104/README-original.md b/stable/bitnami/mariadb/mariadb104/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb104/README.md b/stable/bitnami/mariadb/mariadb104/README.md new file mode 100644 index 0000000..6901aa7 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/README.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml b/stable/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/stable/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md b/stable/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/stable/bitnami/mariadb/mariadb104/templates/NOTES.txt b/stable/bitnami/mariadb/mariadb104/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/_helpers.tpl b/stable/bitnami/mariadb/mariadb104/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml b/stable/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/master-configmap.yaml b/stable/bitnami/mariadb/mariadb104/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb104/templates/master-pdb.yaml b/stable/bitnami/mariadb/mariadb104/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml b/stable/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/master-svc.yaml b/stable/bitnami/mariadb/mariadb104/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/stable/bitnami/mariadb/mariadb104/templates/role.yaml b/stable/bitnami/mariadb/mariadb104/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/rolebinding.yaml b/stable/bitnami/mariadb/mariadb104/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/secrets.yaml b/stable/bitnami/mariadb/mariadb104/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml b/stable/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml b/stable/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml b/stable/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml b/stable/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml b/stable/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/slave-svc.yaml b/stable/bitnami/mariadb/mariadb104/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/test-runner.yaml b/stable/bitnami/mariadb/mariadb104/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/templates/tests.yaml b/stable/bitnami/mariadb/mariadb104/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb104/values-ironbank.yaml b/stable/bitnami/mariadb/mariadb104/values-ironbank.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/values-ironbank.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb104/values-production.yaml b/stable/bitnami/mariadb/mariadb104/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb104/values.schema.json b/stable/bitnami/mariadb/mariadb104/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/stable/bitnami/mariadb/mariadb104/values.yaml b/stable/bitnami/mariadb/mariadb104/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/stable/bitnami/mariadb/mariadb104/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb105/Chart.yaml b/stable/bitnami/mariadb/mariadb105/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/stable/bitnami/mariadb/mariadb105/README-original.md b/stable/bitnami/mariadb/mariadb105/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb105/README.md b/stable/bitnami/mariadb/mariadb105/README.md new file mode 100644 index 0000000..6901aa7 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/README.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/stable/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml b/stable/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/stable/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md b/stable/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/stable/bitnami/mariadb/mariadb105/templates/NOTES.txt b/stable/bitnami/mariadb/mariadb105/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/_helpers.tpl b/stable/bitnami/mariadb/mariadb105/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml b/stable/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/master-configmap.yaml b/stable/bitnami/mariadb/mariadb105/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/stable/bitnami/mariadb/mariadb105/templates/master-pdb.yaml b/stable/bitnami/mariadb/mariadb105/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml b/stable/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/master-svc.yaml b/stable/bitnami/mariadb/mariadb105/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/stable/bitnami/mariadb/mariadb105/templates/role.yaml b/stable/bitnami/mariadb/mariadb105/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/rolebinding.yaml b/stable/bitnami/mariadb/mariadb105/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/secrets.yaml b/stable/bitnami/mariadb/mariadb105/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml b/stable/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml b/stable/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml b/stable/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml b/stable/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml b/stable/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/slave-svc.yaml b/stable/bitnami/mariadb/mariadb105/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/test-runner.yaml b/stable/bitnami/mariadb/mariadb105/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/templates/tests.yaml b/stable/bitnami/mariadb/mariadb105/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/stable/bitnami/mariadb/mariadb105/values-ironbank.yaml b/stable/bitnami/mariadb/mariadb105/values-ironbank.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/values-ironbank.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb105/values-production.yaml b/stable/bitnami/mariadb/mariadb105/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/stable/bitnami/mariadb/mariadb105/values.schema.json b/stable/bitnami/mariadb/mariadb105/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/stable/bitnami/mariadb/mariadb105/values.yaml b/stable/bitnami/mariadb/mariadb105/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/stable/bitnami/mariadb/mariadb105/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} -- GitLab From 083660eb20ff475013a1af5f52d8ba586466774b Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Thu, 16 Jul 2020 22:01:51 +0000 Subject: [PATCH 02/31] Delete .DS_Store --- stable/bitnami/mariadb/mariadb101/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 stable/bitnami/mariadb/mariadb101/.DS_Store diff --git a/stable/bitnami/mariadb/mariadb101/.DS_Store b/stable/bitnami/mariadb/mariadb101/.DS_Store deleted file mode 100644 index 453159e26a1704ff08b61396d2e83a365c619586..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c!5FCdfC8UWW1e90O5Q&=R2uVRf13y4sKp-zcf<$)>|G+QseS84SuB~wA zK#LIUO6&1scWh5|b_~F^mV-l}4xmC8EN`*+!em^0%}SxCN_5JxKod{sVuJBnv~`#Q zroeAgK)&5AoZyCE?LBhe@9B8f?~P|Yj?3Y2MBjf`V+|;wk5Lr!8pUkl3L~BbLp&5C z-EI`wz&ScNMjL0u1I)OV5w7V|u4~LwWr9J(@f>kfx%wgF=8W%ZJ(^Yb@RHlZHXfCI zDJ$fxBhEVGj6L>Farb$a6=#O*GtaXV@ywNHfF(6rkX1NW=VFmdmB@273S3RDtIyv? z_SGfFE!$*^I7Ep&M=jzACvuea7G<$%_OBG+oh??Wd9>0LFa=D3l>%};By_2Trk;lj)=yilCZ zPX0v0;Zl!QngXUkQGpHLtjqo1`TqT1OtO|KU<&*x1zfp((Qa`|;ci{qoZPhu{gN&w nahXR=VG*ult;kipM_1!mA{Am9F!RVBn*9+_8LTh`epG=EH(->2 -- GitLab From 9545e69f9d8b359b27e5a84a381938bba29b2278 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Fri, 17 Jul 2020 15:51:12 +0000 Subject: [PATCH 03/31] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 25ed2fe0ff577d2b9316655dfbcf35d30278d971..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&1xGl5FR;hqID?sA&~Z_OP~i+yfm!?p|EwGgAakwEypP{ zQF#_S`-9fmogKx8>0o@)+<2$+GD`Eo&?KkH07E_d*1{Gn+a -- GitLab From e478130a6dd0d123632b17eb0643565360493fe6 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Fri, 17 Jul 2020 15:51:29 +0000 Subject: [PATCH 04/31] Delete .DS_Store --- stable/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 stable/.DS_Store diff --git a/stable/.DS_Store b/stable/.DS_Store deleted file mode 100644 index 9bf56c712d145e45372a617eff804c6b01aef0bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5T0!V*`z{52&r(}3lfJQ#i9@-gk+`V&>NBw913df+B6o9w~ZYlNP~Rg zCEy8o6<&Y`;Q`>=pH{>Mi4#I}N1FX+cV>39pY2^Q5wX!M_K12!#GwjXT{OQCfx4&zF)rgMf z#c`DB=r7T6mKNn;@RhBtw=P|7bKd3ME8UmDSk8koEN8_iobIXKldv2|)_y8wc5a8! zvox9S_pWctybRMknd;;;P7w0qd78&^K9aLMF7!Nsad6(@o&Da;#lqVfdVO*4fw%07 z#c(+2i>{yyZRGJ(#?Gw>VwC|EO0&47-+=s}|4T6O0-wZ-Qx_$@~Z&mDQ$0 zk~F1+V(?a&J@1^e&xly%>br9TtcX_CumE|lcIL5 zBKuIAV?)=A?310)3G&B{%HL{P=sLMD4A{4yZ(NuayM;Oi90PyKfZ87fRH1LNGN`u> zH2MkvY++anZ1vNia)d?SVr38>2s5cblgjKBgPC-U3mfNKtPGlTV)pXEY-MI|C`?z! z{6dEl^9{PzG2j?jWnkTOd+Pju{QLX=YLe?Y1{?$b6$7lb6YPwzBzv|t7N^cy0X={! pQE`<)or1<5$J$Uw@eQaJ_=GZmzQxKQMj-A-K-1tF$G~4@;0KjDm^A Date: Fri, 17 Jul 2020 15:51:39 +0000 Subject: [PATCH 05/31] Delete .DS_Store --- stable/bitnami/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 stable/bitnami/.DS_Store diff --git a/stable/bitnami/.DS_Store b/stable/bitnami/.DS_Store deleted file mode 100644 index 0f381c1289ed53be5c559657259fcc4684073dd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!D`z;5S?}0dhHVGLm|m+FNGX@ut-`LLO?j~A-94`duU56MJ5)=+F;8OjpLy2 zNdBllkk3hGcGrg1=`o=$GcfZ;vokC0li1Y&fap$R512c)da`bl$VHuLs7UQ50E;LTfV*6FlcYJczj zd|sDZZ@t6g{^;lB>}q~}V^#tJzgi=&9WLM&oj+K)2*z2evojo7R4uX@nE_^i8CW+4 z+&(5>t=oh1^D+a>z>_mT`-4Iy^c|KK&DMd&v;c@z3>!h8ej2GpIrJTt7I6ec*iuAW zDqM>pY&pi2%kv$U7Hv5Q*L(&VeXFeE0Yewx5$hAgaBf*TuEDvvp;abk-`=J}L?2l@^yJ=$NAzbLlAFMm2(QMGm6xu(XH~ P6#fw~G_YX?o|S Date: Fri, 17 Jul 2020 15:51:46 +0000 Subject: [PATCH 06/31] Delete .DS_Store --- stable/bitnami/mariadb/.DS_Store | Bin 10244 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 stable/bitnami/mariadb/.DS_Store diff --git a/stable/bitnami/mariadb/.DS_Store b/stable/bitnami/mariadb/.DS_Store deleted file mode 100644 index 29a5285ca6c931f8ef57ac44000aee32bcbd65a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeI1&x_MQ6vt;}@L^oK=bOaBQE z>Rk~3i^YpxJ@|L{2Q2#Lhi&XO%^VhXvGZW&O_KL!I^WMW%bOyEaAWA}2&o7m1sd_? zOVBMb@|?6|w!!b*0*@gdAs6|`Lpsu+Ns|gl1*8H}0jYpg;4CTt|FelH7nzs6R6r^q z6__bN-VZ7?;%)Ay%+pr~bhHEjUx3@xU<`Et%~83xxt}smQ(;b4Jz$=Sd5M8pIy_fN zICz`;Df28HVU~_CUm5cX1=H0bPo?1q+sw;eDj*d&t^ldsOQ-{tdk+Qa`h6#i_q;In z;5qq9Z9y}CQ-e`PjyLLedCqsQ8wUM>rv1bln}u`dFDOb$DP1nTbPnQ?GjIpPe#7lO zCs&W$!GXuekK;I;ja~0a&>roUuRe&Qfg42a9!(DXHiW!*8bp3PYQ)3H@6&l4_CQgJ zN^!S*Gf8x_u2)p+o<6RqNxiOBRMV)9$3^A(ZTY;ytjL;$wAPOwcu z*k&5`(cz@F0yf0XVdupP!Zrn9TMMv%0qk1NH``h#*p?t{D-C<{!`WH^8)E0M^I`>I zTMMv(qco|2R6r^q6_5&?kOG@*9+jN`Kg|C9|AbbP(?|uR0%uVHTxdGY27I!=M_`K| zlAN`x&|1)lk+>=IGzB_(91orz$HN6Vj=uwq#A?J7gR#y1lzF%Vc1k}6WF7X%`hR|o M``@4Jt!w@N2e`8Vod5s; -- GitLab From 6d911180b81dff9f45bfed776821c3d4dcb9a946 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Fri, 17 Jul 2020 12:44:49 -0600 Subject: [PATCH 07/31] Added README template and restructure --- .DS_Store | Bin 0 -> 6148 bytes bitnami/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/.DS_Store | Bin 0 -> 6148 bytes .../mariadb/mariadb101/Chart.yaml | 0 bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl | 23 +++++ .../mariadb/mariadb101/README-original.md | 0 .../mariadb/mariadb101/README.md | 84 +++++++++++++----- .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb101/templates/NOTES.txt | 0 .../mariadb/mariadb101/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../mariadb101/templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../mariadb101/templates/master-svc.yaml | 0 .../mariadb/mariadb101/templates/role.yaml | 0 .../mariadb101/templates/rolebinding.yaml | 0 .../mariadb/mariadb101/templates/secrets.yaml | 0 .../mariadb101/templates/serviceaccount.yaml | 0 .../mariadb101/templates/servicemonitor.yaml | 0 .../mariadb101/templates/slave-configmap.yaml | 0 .../mariadb101/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../mariadb101/templates/slave-svc.yaml | 0 .../mariadb101/templates/test-runner.yaml | 0 .../mariadb/mariadb101/templates/tests.yaml | 0 .../mariadb/mariadb101/values-ironbank.yaml | 0 .../mariadb/mariadb101/values-production.yaml | 0 .../mariadb/mariadb101/values.schema.json | 0 .../mariadb/mariadb101/values.yaml | 0 .../mariadb/mariadb102/Chart.yaml | 0 .../mariadb/mariadb102/README-original.md | 0 .../mariadb/mariadb102/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb102/templates/NOTES.txt | 0 .../mariadb/mariadb102/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../mariadb102/templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../mariadb102/templates/master-svc.yaml | 0 .../mariadb/mariadb102/templates/role.yaml | 0 .../mariadb102/templates/rolebinding.yaml | 0 .../mariadb/mariadb102/templates/secrets.yaml | 0 .../mariadb102/templates/serviceaccount.yaml | 0 .../mariadb102/templates/servicemonitor.yaml | 0 .../mariadb102/templates/slave-configmap.yaml | 0 .../mariadb102/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../mariadb102/templates/slave-svc.yaml | 0 .../mariadb102/templates/test-runner.yaml | 0 .../mariadb/mariadb102/templates/tests.yaml | 0 .../mariadb/mariadb102/values-ironbank.yaml | 0 .../mariadb/mariadb102/values-production.yaml | 0 .../mariadb/mariadb102/values.schema.json | 0 .../mariadb/mariadb102/values.yaml | 0 .../mariadb/mariadb103/Chart.yaml | 0 .../mariadb/mariadb103/README-original.md | 0 .../mariadb/mariadb103/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb103/templates/NOTES.txt | 0 .../mariadb/mariadb103/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../mariadb103/templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../mariadb103/templates/master-svc.yaml | 0 .../mariadb/mariadb103/templates/role.yaml | 0 .../mariadb103/templates/rolebinding.yaml | 0 .../mariadb/mariadb103/templates/secrets.yaml | 0 .../mariadb103/templates/serviceaccount.yaml | 0 .../mariadb103/templates/servicemonitor.yaml | 0 .../mariadb103/templates/slave-configmap.yaml | 0 .../mariadb103/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../mariadb103/templates/slave-svc.yaml | 0 .../mariadb103/templates/test-runner.yaml | 0 .../mariadb/mariadb103/templates/tests.yaml | 0 .../mariadb/mariadb103/values-ironbank.yaml | 0 .../mariadb/mariadb103/values-production.yaml | 0 .../mariadb/mariadb103/values.schema.json | 0 .../mariadb/mariadb103/values.yaml | 0 .../mariadb/mariadb104/Chart.yaml | 0 .../mariadb/mariadb104/README-original.md | 0 .../mariadb/mariadb104/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb104/templates/NOTES.txt | 0 .../mariadb/mariadb104/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../mariadb104/templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../mariadb104/templates/master-svc.yaml | 0 .../mariadb/mariadb104/templates/role.yaml | 0 .../mariadb104/templates/rolebinding.yaml | 0 .../mariadb/mariadb104/templates/secrets.yaml | 0 .../mariadb104/templates/serviceaccount.yaml | 0 .../mariadb104/templates/servicemonitor.yaml | 0 .../mariadb104/templates/slave-configmap.yaml | 0 .../mariadb104/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../mariadb104/templates/slave-svc.yaml | 0 .../mariadb104/templates/test-runner.yaml | 0 .../mariadb/mariadb104/templates/tests.yaml | 0 .../mariadb/mariadb104/values-ironbank.yaml | 0 .../mariadb/mariadb104/values-production.yaml | 0 .../mariadb/mariadb104/values.schema.json | 0 .../mariadb/mariadb104/values.yaml | 0 .../mariadb/mariadb105/Chart.yaml | 0 .../mariadb/mariadb105/README-original.md | 0 .../mariadb/mariadb105/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb105/templates/NOTES.txt | 0 .../mariadb/mariadb105/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../mariadb105/templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../mariadb105/templates/master-svc.yaml | 0 .../mariadb/mariadb105/templates/role.yaml | 0 .../mariadb105/templates/rolebinding.yaml | 0 .../mariadb/mariadb105/templates/secrets.yaml | 0 .../mariadb105/templates/serviceaccount.yaml | 0 .../mariadb105/templates/servicemonitor.yaml | 0 .../mariadb105/templates/slave-configmap.yaml | 0 .../mariadb105/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../mariadb105/templates/slave-svc.yaml | 0 .../mariadb105/templates/test-runner.yaml | 0 .../mariadb/mariadb105/templates/tests.yaml | 0 .../mariadb/mariadb105/values-ironbank.yaml | 0 .../mariadb/mariadb105/values-production.yaml | 0 .../mariadb/mariadb105/values.schema.json | 0 .../mariadb/mariadb105/values.yaml | 0 stable/.DS_Store | Bin 0 -> 6148 bytes 140 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 .DS_Store create mode 100644 bitnami/.DS_Store create mode 100644 bitnami/mariadb/.DS_Store rename {stable/bitnami => bitnami}/mariadb/mariadb101/Chart.yaml (100%) create mode 100644 bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl rename {stable/bitnami => bitnami}/mariadb/mariadb101/README-original.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/README.md (54%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/ci/values-production-with-rbac.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/NOTES.txt (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/_helpers.tpl (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/initialization-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/master-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/master-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/master-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/master-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/role.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/rolebinding.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/secrets.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/serviceaccount.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/servicemonitor.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/slave-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/slave-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/slave-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/slave-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/test-runner.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/templates/tests.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/values-ironbank.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/values-production.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/values.schema.json (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb101/values.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/Chart.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/README-original.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/ci/values-production-with-rbac.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/NOTES.txt (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/_helpers.tpl (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/initialization-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/master-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/master-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/master-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/master-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/role.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/rolebinding.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/secrets.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/serviceaccount.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/servicemonitor.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/slave-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/slave-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/slave-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/slave-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/test-runner.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/templates/tests.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/values-ironbank.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/values-production.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/values.schema.json (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb102/values.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/Chart.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/README-original.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/ci/values-production-with-rbac.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/NOTES.txt (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/_helpers.tpl (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/initialization-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/master-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/master-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/master-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/master-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/role.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/rolebinding.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/secrets.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/serviceaccount.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/servicemonitor.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/slave-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/slave-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/slave-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/slave-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/test-runner.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/templates/tests.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/values-ironbank.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/values-production.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/values.schema.json (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb103/values.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/Chart.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/README-original.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/ci/values-production-with-rbac.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/NOTES.txt (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/_helpers.tpl (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/initialization-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/master-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/master-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/master-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/master-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/role.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/rolebinding.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/secrets.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/serviceaccount.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/servicemonitor.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/slave-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/slave-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/slave-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/slave-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/test-runner.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/templates/tests.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/values-ironbank.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/values-production.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/values.schema.json (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb104/values.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/Chart.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/README-original.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/ci/values-production-with-rbac.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/NOTES.txt (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/_helpers.tpl (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/initialization-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/master-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/master-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/master-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/master-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/role.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/rolebinding.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/secrets.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/serviceaccount.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/servicemonitor.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/slave-configmap.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/slave-pdb.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/slave-statefulset.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/slave-svc.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/test-runner.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/templates/tests.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/values-ironbank.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/values-production.yaml (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/values.schema.json (100%) rename {stable/bitnami => bitnami}/mariadb/mariadb105/values.yaml (100%) create mode 100644 stable/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6292752edb7559f859699d36b1f1c5f3f101b17a GIT binary patch literal 6148 zcmeH~-EPw`6vvOZvbvoRy+9gps^$InGa zEb@bQhI8E}R)A`PpmTQ+*>YO)u^K$cLa45$?5f-Do7Y_H-)8nu>jBNX^^5S`t#d6$}qb$z#IDv6+-r$Y>*7dUVwz^(h+`i*Y z+M?`sJ8iMGxjmUQ_}WeH{_eri+jr&r$%l`6CB(36X}eRYXh>a7Enz5+mN z=+=g|x=W}WVb!-<8HESNOe)l*GJC~fCLR64#`#t&qb8l0y?ih`GqX1orf0|aLWdLc zjk?+qa0F%vEStxcI{$Z0zyHrBxhF@!5%{kNuv$Op_pl^;wk|AAowWkx07aRKtBmRt kRQ5R54RsV>L(vAGPz|VWwK9qxnENB3F}TVRxKIK=0p>@%HUIzs literal 0 HcmV?d00001 diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0f381c1289ed53be5c559657259fcc4684073dd0 GIT binary patch literal 6148 zcmeHK!D`z;5S?}0dhHVGLm|m+FNGX@ut-`LLO?j~A-94`duU56MJ5)=+F;8OjpLy2 zNdBllkk3hGcGrg1=`o=$GcfZ;vokC0li1Y&fap$R512c)da`bl$VHuLs7UQ50E;LTfV*6FlcYJczj zd|sDZZ@t6g{^;lB>}q~}V^#tJzgi=&9WLM&oj+K)2*z2evojo7R4uX@nE_^i8CW+4 z+&(5>t=oh1^D+a>z>_mT`-4Iy^c|KK&DMd&v;c@z3>!h8ej2GpIrJTt7I6ec*iuAW zDqM>pY&pi2%kv$U7Hv5Q*L(&VeXFeE0Yewx5$hAgaBf*TuEDvvp;abk-`=J}L?2l@^yJ=$NAzbLlAFMm2(QMGm6xu(XH~ P6#fw~G_YX?o|Sk&X01}{Lm{OnT>?GiAlqq8C7gx&RGCDeXoD@+w62RT z`HJKR`Yru{en>wcd9%9-*l}p+p%k+Nvu}21-im!lyILX=-C^1!Y7mixGuAvbbBy!s zw`|FdtOA9eBc_xRYEl4q<`i%W{O=0zx9iaf#nh(^?alYQo2ySrt`g*Vb9e=ReyI)7 z9h_t|IJKOg$!VSq${_e9mX>QP4_2l0r1!}C7#*uoRL13S(2e`=x%W0Mj}sg3DV5*E zak8KFMhA^2Z&XpnS<&lja+dZ`^5I=pq-xYv!y+B%c_NdLvM%cfjc4O=tGyL$_|2fz znQZvuP6wUM_RGnnF4xwZuXhhmzI+{jn|wdl3nGCnOxt6N*KmPgu0)@sevzx<2zlnt zt7*;1_ycu+lCeF_5o`D0Y|e1b?!kF6!}&eKLD$(LD_~!E`EZdJ>DJ~Ha0>jD0=z%? zaK_MLWl(P&X!I2TSi`V3#QeL!9N%JSu`-AZOc*NAP=&o>2t&uXZ|g#fl|e%%VJ{!T zK3UisiqKET{Jt(H5gK%@Q@|-Ot-!MBHu(JCx%>V#Y_fKywu5qr*Lh^`5XX4iv(IYzC>pIH81EN@s1vc2;uBv&t>M8UWhxFS|Fh_+q zJmA~+S0z14%Qf}l(}b2rKQVTON9qPMU+p3KqZ56K7wk~7_9eEcnNyp+W?Qq)l5=Oq z_BG_JQ)6WFm8`O4&Kj?*_1v9V-aA?Bh6Dq_Krj#t1Oq(`@XS^jjvS*627-ZL;J|?H z4~eQ+WNaL5>tJI~0HR)_O=#<-S#wgxB4gu74@Eqc=&6#Q7~<(1PdTp0*f@GRBtJeR z&%A%Uh|SLW$-*IpW3<6QFwkb;*t=sr|8Mxq^gi<2DbWiCf`Na=fDER0(+L-q&( Date: Fri, 17 Jul 2020 12:50:56 -0600 Subject: [PATCH 08/31] remove old files --- .DS_Store | Bin 6148 -> 6148 bytes bitnami/.DS_Store | Bin 6148 -> 6148 bytes bitnami/mariadb/.DS_Store | Bin 6148 -> 8196 bytes bitnami/mariadb/mariadb102/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/mariadb102/Chart.yaml | 22 - bitnami/mariadb/mariadb102/README-original.md | 342 ---------- bitnami/mariadb/mariadb102/README.md | 342 ---------- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb102/templates/NOTES.txt | 49 -- .../mariadb/mariadb102/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb102/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb102/templates/master-svc.yaml | 47 -- .../mariadb/mariadb102/templates/role.yaml | 19 - .../mariadb102/templates/rolebinding.yaml | 19 - .../mariadb/mariadb102/templates/secrets.yaml | 39 -- .../mariadb102/templates/serviceaccount.yaml | 12 - .../mariadb102/templates/servicemonitor.yaml | 35 -- .../mariadb102/templates/slave-configmap.yaml | 16 - .../mariadb102/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb102/templates/slave-svc.yaml | 49 -- .../mariadb102/templates/test-runner.yaml | 53 -- .../mariadb/mariadb102/templates/tests.yaml | 12 - .../mariadb/mariadb102/values-ironbank.yaml | 595 ------------------ .../mariadb/mariadb102/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb102/values.schema.json | 169 ----- bitnami/mariadb/mariadb102/values.yaml | 583 ----------------- bitnami/mariadb/mariadb103/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/mariadb103/Chart.yaml | 22 - bitnami/mariadb/mariadb103/README-original.md | 342 ---------- bitnami/mariadb/mariadb103/README.md | 342 ---------- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb103/templates/NOTES.txt | 49 -- .../mariadb/mariadb103/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb103/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb103/templates/master-svc.yaml | 47 -- .../mariadb/mariadb103/templates/role.yaml | 19 - .../mariadb103/templates/rolebinding.yaml | 19 - .../mariadb/mariadb103/templates/secrets.yaml | 39 -- .../mariadb103/templates/serviceaccount.yaml | 12 - .../mariadb103/templates/servicemonitor.yaml | 35 -- .../mariadb103/templates/slave-configmap.yaml | 16 - .../mariadb103/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb103/templates/slave-svc.yaml | 49 -- .../mariadb103/templates/test-runner.yaml | 53 -- .../mariadb/mariadb103/templates/tests.yaml | 12 - .../mariadb/mariadb103/values-ironbank.yaml | 595 ------------------ .../mariadb/mariadb103/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb103/values.schema.json | 169 ----- bitnami/mariadb/mariadb103/values.yaml | 583 ----------------- bitnami/mariadb/mariadb104/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/mariadb104/Chart.yaml | 22 - bitnami/mariadb/mariadb104/README-original.md | 342 ---------- bitnami/mariadb/mariadb104/README.md | 342 ---------- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb104/templates/NOTES.txt | 49 -- .../mariadb/mariadb104/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb104/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb104/templates/master-svc.yaml | 47 -- .../mariadb/mariadb104/templates/role.yaml | 19 - .../mariadb104/templates/rolebinding.yaml | 19 - .../mariadb/mariadb104/templates/secrets.yaml | 39 -- .../mariadb104/templates/serviceaccount.yaml | 12 - .../mariadb104/templates/servicemonitor.yaml | 35 -- .../mariadb104/templates/slave-configmap.yaml | 16 - .../mariadb104/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb104/templates/slave-svc.yaml | 49 -- .../mariadb104/templates/test-runner.yaml | 53 -- .../mariadb/mariadb104/templates/tests.yaml | 12 - .../mariadb/mariadb104/values-ironbank.yaml | 595 ------------------ .../mariadb/mariadb104/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb104/values.schema.json | 169 ----- bitnami/mariadb/mariadb104/values.yaml | 583 ----------------- bitnami/mariadb/mariadb105/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/mariadb105/Chart.yaml | 22 - bitnami/mariadb/mariadb105/README-original.md | 342 ---------- bitnami/mariadb/mariadb105/README.md | 342 ---------- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb105/templates/NOTES.txt | 49 -- .../mariadb/mariadb105/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb105/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb105/templates/master-svc.yaml | 47 -- .../mariadb/mariadb105/templates/role.yaml | 19 - .../mariadb105/templates/rolebinding.yaml | 19 - .../mariadb/mariadb105/templates/secrets.yaml | 39 -- .../mariadb105/templates/serviceaccount.yaml | 12 - .../mariadb105/templates/servicemonitor.yaml | 35 -- .../mariadb105/templates/slave-configmap.yaml | 16 - .../mariadb105/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb105/templates/slave-svc.yaml | 49 -- .../mariadb105/templates/test-runner.yaml | 53 -- .../mariadb/mariadb105/templates/tests.yaml | 12 - .../mariadb/mariadb105/values-ironbank.yaml | 595 ------------------ .../mariadb/mariadb105/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb105/values.schema.json | 169 ----- bitnami/mariadb/mariadb105/values.yaml | 583 ----------------- 115 files changed, 16340 deletions(-) create mode 100644 bitnami/mariadb/mariadb102/.DS_Store delete mode 100644 bitnami/mariadb/mariadb102/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb102/README-original.md delete mode 100644 bitnami/mariadb/mariadb102/README.md delete mode 100644 bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb102/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb102/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb102/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb102/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb102/values.schema.json delete mode 100644 bitnami/mariadb/mariadb102/values.yaml create mode 100644 bitnami/mariadb/mariadb103/.DS_Store delete mode 100644 bitnami/mariadb/mariadb103/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb103/README-original.md delete mode 100644 bitnami/mariadb/mariadb103/README.md delete mode 100644 bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb103/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb103/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb103/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb103/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb103/values.schema.json delete mode 100644 bitnami/mariadb/mariadb103/values.yaml create mode 100644 bitnami/mariadb/mariadb104/.DS_Store delete mode 100644 bitnami/mariadb/mariadb104/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb104/README-original.md delete mode 100644 bitnami/mariadb/mariadb104/README.md delete mode 100644 bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb104/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb104/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb104/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb104/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb104/values.schema.json delete mode 100644 bitnami/mariadb/mariadb104/values.yaml create mode 100644 bitnami/mariadb/mariadb105/.DS_Store delete mode 100644 bitnami/mariadb/mariadb105/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb105/README-original.md delete mode 100644 bitnami/mariadb/mariadb105/README.md delete mode 100644 bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb105/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb105/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb105/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb105/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb105/values.schema.json delete mode 100644 bitnami/mariadb/mariadb105/values.yaml diff --git a/.DS_Store b/.DS_Store index 6292752edb7559f859699d36b1f1c5f3f101b17a..197a48137cf297129d6f754499b9c59d0175585b 100644 GIT binary patch delta 47 zcmZoMXffCj&cb+d@-Ef}Zi(t@a|3f71!Ggw$?j~jj58;vvdJ^f+N{L-lxZ^?$3K1m DWo8bJ delta 72 zcmZoMXffCj&cb+V@=n$UEy?O?LlbjD9R*Vh!&)7MYIAb~9R(9(v)Wot4slgOThD~t c%Bt#`+PYbj8Cm5SXKz+yeaf_%o#QV*02$*I_W%F@ diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store index 0f381c1289ed53be5c559657259fcc4684073dd0..70a8a8753aefa9d8b914b393e613570a77d383d6 100644 GIT binary patch delta 97 zcmZoMXffCj&ct|fas*R@r$lwNxq-Qkg0ZP-t&T#qxw(Okf{C$NZ7nBM8XF_ge hRdr2m-Ao2BU}S{Q4E#_UM$Ou+#Qc&heKY009aWj{pDw diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store index df9258aa884bcc3644a83853b6d77d0d1571cb92..8a02be08323a10825aec16e768672c3d79f00b58 100644 GIT binary patch delta 463 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8E20o2aMA$iFdQH}hr%jz7$c**Q2SHn1@A zPj+CDn5@EL&vCSZMRYzmY2v5N4TlA@Q_v@EzN zFDE}Q9q2R0jfIOC1(|^?Aduh&60V?7+$_lPoq009i05Q~9u5vhNB}cTj^~*^*_lOz Kk&3p@X9NJ56?S0& delta 159 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jH7iU^g=(`{Y1D@yW^p4veQK zzY}WUm8z~bGPX3(Q7|+xGN1fjK$da#WJNJ~#yMbhE`kx0*9w_T{v>QN*<4g%W7$K- s#q1m$g3LgJfk1#8NVtOR*jV_Tc{0C@C&)$yCW!4I2Qh4p=b6I{0OkoHk^lez diff --git a/bitnami/mariadb/mariadb102/.DS_Store b/bitnami/mariadb/mariadb102/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb102/README.md b/bitnami/mariadb/mariadb102/README.md deleted file mode 100644 index 6901aa7..0000000 --- a/bitnami/mariadb/mariadb102/README.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb102/templates/NOTES.txt b/bitnami/mariadb/mariadb102/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb102/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/_helpers.tpl b/bitnami/mariadb/mariadb102/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb102/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-configmap.yaml b/bitnami/mariadb/mariadb102/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb102/templates/master-pdb.yaml b/bitnami/mariadb/mariadb102/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-svc.yaml b/bitnami/mariadb/mariadb102/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb102/templates/role.yaml b/bitnami/mariadb/mariadb102/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb102/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/rolebinding.yaml b/bitnami/mariadb/mariadb102/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb102/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/secrets.yaml b/bitnami/mariadb/mariadb102/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb102/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-svc.yaml b/bitnami/mariadb/mariadb102/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/test-runner.yaml b/bitnami/mariadb/mariadb102/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb102/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/tests.yaml b/bitnami/mariadb/mariadb102/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb102/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb102/values-ironbank.yaml b/bitnami/mariadb/mariadb102/values-ironbank.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb102/values-ironbank.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb102/values-production.yaml b/bitnami/mariadb/mariadb102/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb102/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb102/values.schema.json b/bitnami/mariadb/mariadb102/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb102/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb102/values.yaml b/bitnami/mariadb/mariadb102/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb102/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb103/.DS_Store b/bitnami/mariadb/mariadb103/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb103/README.md b/bitnami/mariadb/mariadb103/README.md deleted file mode 100644 index 6901aa7..0000000 --- a/bitnami/mariadb/mariadb103/README.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb103/templates/NOTES.txt b/bitnami/mariadb/mariadb103/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb103/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/_helpers.tpl b/bitnami/mariadb/mariadb103/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb103/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-configmap.yaml b/bitnami/mariadb/mariadb103/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb103/templates/master-pdb.yaml b/bitnami/mariadb/mariadb103/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-svc.yaml b/bitnami/mariadb/mariadb103/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb103/templates/role.yaml b/bitnami/mariadb/mariadb103/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb103/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/rolebinding.yaml b/bitnami/mariadb/mariadb103/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb103/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/secrets.yaml b/bitnami/mariadb/mariadb103/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb103/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-svc.yaml b/bitnami/mariadb/mariadb103/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/test-runner.yaml b/bitnami/mariadb/mariadb103/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb103/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/tests.yaml b/bitnami/mariadb/mariadb103/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb103/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb103/values-ironbank.yaml b/bitnami/mariadb/mariadb103/values-ironbank.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb103/values-ironbank.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb103/values-production.yaml b/bitnami/mariadb/mariadb103/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb103/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb103/values.schema.json b/bitnami/mariadb/mariadb103/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb103/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb103/values.yaml b/bitnami/mariadb/mariadb103/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb103/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb104/.DS_Store b/bitnami/mariadb/mariadb104/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb104/README.md b/bitnami/mariadb/mariadb104/README.md deleted file mode 100644 index 6901aa7..0000000 --- a/bitnami/mariadb/mariadb104/README.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb104/templates/NOTES.txt b/bitnami/mariadb/mariadb104/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb104/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/_helpers.tpl b/bitnami/mariadb/mariadb104/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb104/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-configmap.yaml b/bitnami/mariadb/mariadb104/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb104/templates/master-pdb.yaml b/bitnami/mariadb/mariadb104/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-svc.yaml b/bitnami/mariadb/mariadb104/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb104/templates/role.yaml b/bitnami/mariadb/mariadb104/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb104/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/rolebinding.yaml b/bitnami/mariadb/mariadb104/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb104/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/secrets.yaml b/bitnami/mariadb/mariadb104/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb104/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-svc.yaml b/bitnami/mariadb/mariadb104/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/test-runner.yaml b/bitnami/mariadb/mariadb104/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb104/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/tests.yaml b/bitnami/mariadb/mariadb104/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb104/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb104/values-ironbank.yaml b/bitnami/mariadb/mariadb104/values-ironbank.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb104/values-ironbank.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb104/values-production.yaml b/bitnami/mariadb/mariadb104/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb104/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb104/values.schema.json b/bitnami/mariadb/mariadb104/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb104/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb104/values.yaml b/bitnami/mariadb/mariadb104/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb104/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb105/.DS_Store b/bitnami/mariadb/mariadb105/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb105/README.md b/bitnami/mariadb/mariadb105/README.md deleted file mode 100644 index 6901aa7..0000000 --- a/bitnami/mariadb/mariadb105/README.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb105/templates/NOTES.txt b/bitnami/mariadb/mariadb105/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb105/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/_helpers.tpl b/bitnami/mariadb/mariadb105/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb105/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-configmap.yaml b/bitnami/mariadb/mariadb105/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb105/templates/master-pdb.yaml b/bitnami/mariadb/mariadb105/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-svc.yaml b/bitnami/mariadb/mariadb105/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb105/templates/role.yaml b/bitnami/mariadb/mariadb105/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb105/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/rolebinding.yaml b/bitnami/mariadb/mariadb105/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb105/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/secrets.yaml b/bitnami/mariadb/mariadb105/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb105/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-svc.yaml b/bitnami/mariadb/mariadb105/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/test-runner.yaml b/bitnami/mariadb/mariadb105/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb105/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/tests.yaml b/bitnami/mariadb/mariadb105/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb105/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb105/values-ironbank.yaml b/bitnami/mariadb/mariadb105/values-ironbank.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb105/values-ironbank.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb105/values-production.yaml b/bitnami/mariadb/mariadb105/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb105/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb105/values.schema.json b/bitnami/mariadb/mariadb105/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb105/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb105/values.yaml b/bitnami/mariadb/mariadb105/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb105/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} -- GitLab From 7427e0eb02497a6f16dea066ee1cbe775a66db9a Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Fri, 17 Jul 2020 18:51:22 +0000 Subject: [PATCH 09/31] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 197a48137cf297129d6f754499b9c59d0175585b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~-EPw`6vvOZvbsfxULbASRc?^Ds8G5xq6r~|(p~HV2@wPrfVPBGEK(LvO-i+e zqP)g7UVukIJOGaae}4@1gY9m7$w#vPj?X!E{ZnGsM8tZdxI@$;B90=p)a260ijRHUje7ty4q^6_nA`_bVcJur07v=$-G%)Q_Kw zj>h?6l&a`2(P5h8h3kG}OUt!uD|ODBym_PfCfFC_pa_dm-V2AX=UM16V!y^C!x*4y4WHhO@lX>2Q$191q{DGlagKVKF*1^DZq2E1OD8{I8X?YJA> zrHIe4B-n+BKfyVJWDc;(w$+sqFt0zqexs&BN?sIwj@ zp<5Z+@-88B9HYL`N-I1trcS#rOZ&B>Q9uSOWhQ0aoh={T`NN&eny+$+Ol$*+Y>g<0`Ex k1(i9DRYM-dYbeU#b7TYR8?CgW2WI~WC=9l;1b!=lA8 Date: Fri, 17 Jul 2020 18:51:29 +0000 Subject: [PATCH 10/31] Delete .DS_Store --- stable/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 stable/.DS_Store diff --git a/stable/.DS_Store b/stable/.DS_Store deleted file mode 100644 index df6ca1ede3a4b6b761fe57e175a7c4a123052638..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyH3ME5S)cbL`oCUKzS7%1vQNog@T$NAWnEhB(We)?}m@zD`9r`5@F*SA+#&) z&EDv(IYzC>pIH81EN@s1vc2;uBv&t>M8UWhxFS|Fh_+q zJmA~+S0z14%Qf}l(}b2rKQVTON9qPMU+p3KqZ56K7wk~7_9eEcnNyp+W?Qq)l5=Oq z_BG_JQ)6WFm8`O4&Kj?*_1v9V-aA?Bh6Dq_Krj#t1Oq(`@XS^jjvS*627-ZL;J|?H z4~eQ+WNaL5>tJI~0HR)_O=#<-S#wgxB4gu74@Eqc=&6#Q7~<(1PdTp0*f@GRBtJeR z&%A%Uh|SLW$-*IpW3<6QFwkb;*t=sr|8Mxq^gi<2DbWiCf`Na=fDER0(+L-q&( Date: Fri, 17 Jul 2020 18:51:58 +0000 Subject: [PATCH 11/31] Delete .DS_Store --- bitnami/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/.DS_Store diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store deleted file mode 100644 index 70a8a8753aefa9d8b914b393e613570a77d383d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T317w-vDmL63V8JoHfUrw0*2tp{&HL=P&On4*E0l{U3#t>iWIjeG(h zM`w1o1+5+xl^K}%CbKh}?3b{c0RYkHMk@dn0FbDJg%X-igvLq7q~IbGh{DVfKm_4# zqR+!*ESm$rkpX&l({Kd=v>`@2dVe~^5&A4PQI}thpf{Es_Bz*LVzQsZ>m=@Ewc3j) zOcW=lrll;)@@)CUztlZH3$kvf5wwr!YA?txL+9^nos9e-JcwJp)5`p|PO~6RTWwPu zM=eY_K8({y_ZqsJMjbPcZwI6-$Q%M6zCNg`e!X6+sC~V`e~#Z< Date: Fri, 17 Jul 2020 18:52:07 +0000 Subject: [PATCH 12/31] Delete .DS_Store --- bitnami/mariadb/.DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/.DS_Store diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store deleted file mode 100644 index 8a02be08323a10825aec16e768672c3d79f00b58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeI1&2G~`5XWcRKsP~%9FUshUXVEC;KVUGAS5eo54|B7!2wWfvy;b56K?w4N zhiKoRkHQo1AUpufeoz%R5tcwA$TQOHf9;)F+dny8j{^W~G>dxx9RT3yO51m^Sz&5i z`3>8$d+wn!%m)Y|h6sA#ppy{+B0vO)01+Spn@9lHY-N1Sx^G6QB?3gCmIT!EL7*%3 ztrkZ0qXQdV0-!cIo!9iVfBRo`l1RHx#crg~sDmDv)5nRFZ%Dje0fS{OCyz)U(Y zdt_!S6sC`kc|wN+^NmtV1c<;*0;+az!6{bm6G*Pt?}w>;6Qwf3arKjWjQ;SuHtem* ziRRNYoAV_)OOt8tIA7V;cH`FV9nM?4b+`38IFa)p5A)e{6i!~Mt*2pr650MUDbuTd z7(GwM^P~3tJ(=ZUl8q-iIf=&@^6EvB#d1E9vn-zKc>*)Qd6PGf+MUH>=nT8U^}JB*0&?9haAPH)cflk}W%d@wRqm>o zehK0w#{CXrzfKVQ6(G95LS(xYAi8ye=vII@C_(&O0pg%e5C;_?dL@Y8DnRt=1ko!& zL_TDjOJLiaT1VCY2kXE8Z|()qnGpdZ@W%vLV?Wp*;WR(rfy*IHcK -- GitLab From c7826dbca7f7a8d57cec77e8f7f42bbf15f6ab0d Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Fri, 17 Jul 2020 18:52:17 +0000 Subject: [PATCH 13/31] Delete .DS_Store --- bitnami/mariadb/mariadb102/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/mariadb102/.DS_Store diff --git a/bitnami/mariadb/mariadb102/.DS_Store b/bitnami/mariadb/mariadb102/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Fri, 17 Jul 2020 18:52:39 +0000 Subject: [PATCH 14/31] Delete .DS_Store --- bitnami/mariadb/mariadb103/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/mariadb103/.DS_Store diff --git a/bitnami/mariadb/mariadb103/.DS_Store b/bitnami/mariadb/mariadb103/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Fri, 17 Jul 2020 18:52:45 +0000 Subject: [PATCH 15/31] Delete .DS_Store --- bitnami/mariadb/mariadb104/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/mariadb104/.DS_Store diff --git a/bitnami/mariadb/mariadb104/.DS_Store b/bitnami/mariadb/mariadb104/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Fri, 17 Jul 2020 18:52:53 +0000 Subject: [PATCH 16/31] Delete .DS_Store --- bitnami/mariadb/mariadb105/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/mariadb105/.DS_Store diff --git a/bitnami/mariadb/mariadb105/.DS_Store b/bitnami/mariadb/mariadb105/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 Date: Fri, 17 Jul 2020 20:01:14 -0600 Subject: [PATCH 17/31] Refactoring the Ironbank values file --- .../mariadb/mariadb101/values-ironbank.yaml | 469 +----------------- 1 file changed, 3 insertions(+), 466 deletions(-) diff --git a/bitnami/mariadb/mariadb101/values-ironbank.yaml b/bitnami/mariadb/mariadb101/values-ironbank.yaml index 04309ca..2e826c6 100644 --- a/bitnami/mariadb/mariadb101/values-ironbank.yaml +++ b/bitnami/mariadb/mariadb101/values-ironbank.yaml @@ -4,216 +4,15 @@ image: pullPolicy: IfNotPresent debug: false - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## volumePermissions: enabled: false image: repository: registry1.dsop.io/redhat/ubi/ubi8 tag: 8.2 pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - create: false - -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -rootUser: - password: "" - forcePassword: true - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## + config: |- [mysqld] skip-name-resolve @@ -240,127 +39,9 @@ master: [manager] port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## config: |- [mysqld] skip-name-resolve @@ -386,148 +67,4 @@ slave: port=3306 socket=/opt/bitnami/mariadb/tmp/mysql.sock pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: false - # image: - # registry: docker.io - # repository: bitnami/mysqld-exporter - # tag: 0.12.1-debian-10-r146 - # pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - # resources: {} - # annotations: - # prometheus.io/scrape: "true" - # prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - # extraArgs: - # master: [] - # slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - # livenessProbe: - # enabled: true - # ## - # ## Initializing the database could take some time - # initialDelaySeconds: 120 - # ## - # ## Default Kubernetes values - # periodSeconds: 10 - # timeoutSeconds: 1 - # successThreshold: 1 - # failureThreshold: 3 - # readinessProbe: - # enabled: true - # initialDelaySeconds: 30 - # ## - # ## Default Kubernetes values - # periodSeconds: 10 - # timeoutSeconds: 1 - # successThreshold: 1 - # failureThreshold: 3 - - # # Enable this if you're using https://github.com/coreos/prometheus-operator - # serviceMonitor: - # enabled: false - # ## Specify a namespace if needed - # # namespace: monitoring - # # fallback to the prometheus default unless specified - # # interval: 10s - # # scrapeTimeout: 10s - # ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - # ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - # ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - # selector: - # prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: false - # resources: {} - # testFramework: - # image: - # registry: docker.io - # repository: dduportal/bats - # tag: 0.4.0 - # resources: {} + \ No newline at end of file -- GitLab From fe4b604eb47f6fe60b675d866aa796f017dbaa50 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 09:53:55 -0600 Subject: [PATCH 18/31] Added MariaDB 10.2 --- .DS_Store | Bin 0 -> 6148 bytes bitnami/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/.DS_Store | Bin 0 -> 10244 bytes bitnami/mariadb/mariadb 102/Chart.yaml | 22 + .../mariadb/mariadb 102/IRONBANK.md.gotmpl | 23 + .../mariadb/mariadb 102/README-original.md | 342 ++++++++++ bitnami/mariadb/mariadb 102/README.md | 148 +++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb 102/templates/NOTES.txt | 49 ++ .../mariadb 102/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb 102/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb 102/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb 102/templates/role.yaml | 19 + .../mariadb 102/templates/rolebinding.yaml | 19 + .../mariadb 102/templates/secrets.yaml | 39 ++ .../mariadb 102/templates/serviceaccount.yaml | 12 + .../mariadb 102/templates/servicemonitor.yaml | 35 ++ .../templates/slave-configmap.yaml | 16 + .../mariadb 102/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb 102/templates/slave-svc.yaml | 49 ++ .../mariadb 102/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb 102/templates/tests.yaml | 12 + .../mariadb/mariadb 102/values-ironbank.yaml | 70 +++ .../mariadb 102/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb 102/values.schema.json | 169 +++++ bitnami/mariadb/mariadb 102/values.yaml | 583 +++++++++++++++++ 31 files changed, 3389 insertions(+) create mode 100644 .DS_Store create mode 100644 bitnami/.DS_Store create mode 100644 bitnami/mariadb/.DS_Store create mode 100644 bitnami/mariadb/mariadb 102/Chart.yaml create mode 100644 bitnami/mariadb/mariadb 102/IRONBANK.md.gotmpl create mode 100644 bitnami/mariadb/mariadb 102/README-original.md create mode 100644 bitnami/mariadb/mariadb 102/README.md create mode 100644 bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml create mode 100644 bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md create mode 100644 bitnami/mariadb/mariadb 102/templates/NOTES.txt create mode 100644 bitnami/mariadb/mariadb 102/templates/_helpers.tpl create mode 100644 bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/master-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/master-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/master-svc.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/role.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/rolebinding.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/secrets.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/slave-svc.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/test-runner.yaml create mode 100644 bitnami/mariadb/mariadb 102/templates/tests.yaml create mode 100644 bitnami/mariadb/mariadb 102/values-ironbank.yaml create mode 100644 bitnami/mariadb/mariadb 102/values-production.yaml create mode 100644 bitnami/mariadb/mariadb 102/values.schema.json create mode 100644 bitnami/mariadb/mariadb 102/values.yaml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..19f2712238843814197671ce77210aeb74c4050f GIT binary patch literal 6148 zcmeH~%We}f6o!x6&^SSeERb5U@&<`TgmR%o6+#+9y66H4F$flb+8HLIBTZ+j%!CL+ z(7Xnh7vND455VKV?_(F`Lc1$B`AGKf@j1tiKh4-N5sCgdY7;exNTO)1)KUGyv|pDM zTeCe?sNgXII-+_Ybp)Uj)TC?+2r&`sqPX9EP_2D9e(c z?I3&{4=4MLEBCUr2;y`&;^a6QBIMbVIE}JNKO3h}&g1yTA!SY0_8VK%X{Xa`s_ypo ztf{8GUaP5Yc5lsQHMx1MeP{3B==GcF+u6JKybu!DwAe0NJ&_M+EG_euKT4AW?K{*fyK%LNVDfaVOv2%dG{%OEh0l2#Zs_j;% zcP8SGSQ6}1#Gl|?K(Yjwvt4zr1nlcCFP`fxZg5Ay5%?Dg=>0*VX!Wd?MtSQ%#a94m z1>J0D>$`-`QC2;xrBQfb!lXh?s<2lKVbamBY@BDcG-}dG*vp5oGYfk|5j;D_R~$~l zGwNzbz!6v^ux=h3`uyKL{rN8rCAASwfY(8rSO*}Aegeby?J0~BpKt~AOi jsO)jf4Sf`Ep|HWHbOY*HEsdfF=KcsU23I)(zm>obHoUw4 literal 0 HcmV?d00001 diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5266a65037c50ea99eeb43b292b93f554135f239 GIT binary patch literal 6148 zcmeHK%}T>S5T317w-vDmL63V8JoHe1dk`U1J$Mr$dQj2C6b;0zw5dgFC9k1xS^}s5fJ7xMl+b)4G)_7q1s54Z6lRV9A_#XA zeI6zw*&O(d4A8rqgewT31u@#;`_mzg&}XrMy7+1Yy^-v&+rADHll>fCCviKg)m}tl ztT;X~DP>ufr^_e)rSAG!kagOPpmju7dqH*?I)7j5WatOsLEP+~R%W+!ngwy%Y?1{XwA;dJc1oX6ry>S^&f%hK-<4KaEtQ9C{9Oi#UQJY$>8G6|Th)wjATi z<#`Tsi?$quYd(a#vv3`XFn7oKl}QKTS!Bx$Faz%ypxzIqLg)X^*ZsdqV#5qD1OJl& zQQY>o8@M)iwvMcl&RT_fhDt(txy4}#I_4Iy2`mZl z_k#hAYe#7&RlGW&6Da^_4R#BIG2{Uv#!%W(nn@L*FsIBOs0yVj#h@}AjvL$^w4*eW zD#Hnt;e@I)QU%JZqw&Nvf6%S%+NH}^G)>p^Yx*m1z-HdWpG?PHfAoTHJ@F@l zK#iX<7B9zsa1ixphm9MLSUT~ev_BHTQP>BUm(Qa#WV0@trr}u3R@dr>ja&1% zZMU0-klcrqOclE*5od_qO$5|0sF$cK&Yh{*$;NLe;y4T$kI+{&V^5#wV6{ z%#z{Kw-ijmdOZb3JNS4{e;RyySUzvU!ZUae2UV})wKqy*mY%?w`Q7TdrRRkkE4T3X z!Ef)cg)fZxUzfe`W-CC+wV`j<#|D?oHM38GU0Vk-yn zLj{PfO@i2}0MX4s{8<5_yGan;97N!Qh6IoR52#eL^&Q*l;dH8m*e-KabJ@wHyC%6 fW>R4f*oA)#xWEGBKP{qQ{(r_QZc!y_GxPu79fR **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/bitnami/mariadb/mariadb 102/README.md b/bitnami/mariadb/mariadb 102/README.md new file mode 100644 index 0000000..d57836a --- /dev/null +++ b/bitnami/mariadb/mariadb 102/README.md @@ -0,0 +1,148 @@ +mariadb +======= +Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. + +Version: 7.6.1 + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| db.forcePassword | bool | `false` | | +| db.injectSecretsAsVolume | bool | `false` | | +| db.name | string | `"my_database"` | | +| db.password | string | `""` | | +| db.user | string | `""` | | +| image.debug | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"bitnami/mariadb"` | | +| image.tag | string | `"10.3.23-debian-10-r44"` | | +| master.affinity | object | `{}` | | +| master.antiAffinity | string | `"soft"` | | +| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| master.extraEnvVars | string | `nil` | | +| master.extraEnvVarsCM | string | `nil` | | +| master.extraEnvVarsSecret | string | `nil` | | +| master.extraInitContainers | list | `[]` | | +| master.livenessProbe.enabled | bool | `true` | | +| master.livenessProbe.failureThreshold | int | `3` | | +| master.livenessProbe.initialDelaySeconds | int | `120` | | +| master.livenessProbe.periodSeconds | int | `10` | | +| master.livenessProbe.successThreshold | int | `1` | | +| master.livenessProbe.timeoutSeconds | int | `1` | | +| master.nodeSelector | object | `{}` | | +| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| master.persistence.annotations | object | `{}` | | +| master.persistence.enabled | bool | `true` | | +| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | +| master.persistence.size | string | `"8Gi"` | | +| master.podDisruptionBudget.enabled | bool | `false` | | +| master.podDisruptionBudget.minAvailable | int | `1` | | +| master.readinessProbe.enabled | bool | `true` | | +| master.readinessProbe.failureThreshold | int | `3` | | +| master.readinessProbe.initialDelaySeconds | int | `30` | | +| master.readinessProbe.periodSeconds | int | `10` | | +| master.readinessProbe.successThreshold | int | `1` | | +| master.readinessProbe.timeoutSeconds | int | `1` | | +| master.resources | object | `{}` | | +| master.service.annotations | object | `{}` | | +| master.tolerations | list | `[]` | | +| master.updateStrategy.type | string | `"RollingUpdate"` | | +| metrics.annotations."prometheus.io/port" | string | `"9104"` | | +| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | +| metrics.enabled | bool | `false` | | +| metrics.extraArgs.master | list | `[]` | | +| metrics.extraArgs.slave | list | `[]` | | +| metrics.image.pullPolicy | string | `"IfNotPresent"` | | +| metrics.image.registry | string | `"docker.io"` | | +| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | +| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | +| metrics.livenessProbe.enabled | bool | `true` | | +| metrics.livenessProbe.failureThreshold | int | `3` | | +| metrics.livenessProbe.initialDelaySeconds | int | `120` | | +| metrics.livenessProbe.periodSeconds | int | `10` | | +| metrics.livenessProbe.successThreshold | int | `1` | | +| metrics.livenessProbe.timeoutSeconds | int | `1` | | +| metrics.readinessProbe.enabled | bool | `true` | | +| metrics.readinessProbe.failureThreshold | int | `3` | | +| metrics.readinessProbe.initialDelaySeconds | int | `30` | | +| metrics.readinessProbe.periodSeconds | int | `10` | | +| metrics.readinessProbe.successThreshold | int | `1` | | +| metrics.readinessProbe.timeoutSeconds | int | `1` | | +| metrics.resources | object | `{}` | | +| metrics.serviceMonitor.enabled | bool | `false` | | +| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | +| rbac.create | bool | `false` | | +| replication.enabled | bool | `true` | | +| replication.forcePassword | bool | `false` | | +| replication.injectSecretsAsVolume | bool | `false` | | +| replication.password | string | `""` | | +| replication.user | string | `"replicator"` | | +| rootUser.forcePassword | bool | `false` | | +| rootUser.injectSecretsAsVolume | bool | `false` | | +| rootUser.password | string | `""` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1001` | | +| securityContext.runAsUser | int | `1001` | | +| service.port | int | `3306` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `false` | | +| slave.affinity | object | `{}` | | +| slave.antiAffinity | string | `"soft"` | | +| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| slave.extraEnvVars | string | `nil` | | +| slave.extraEnvVarsCM | string | `nil` | | +| slave.extraEnvVarsSecret | string | `nil` | | +| slave.extraInitContainers | string | `nil` | | +| slave.livenessProbe.enabled | bool | `true` | | +| slave.livenessProbe.failureThreshold | int | `3` | | +| slave.livenessProbe.initialDelaySeconds | int | `120` | | +| slave.livenessProbe.periodSeconds | int | `10` | | +| slave.livenessProbe.successThreshold | int | `1` | | +| slave.livenessProbe.timeoutSeconds | int | `1` | | +| slave.nodeSelector | object | `{}` | | +| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| slave.persistence.annotations | string | `nil` | | +| slave.persistence.enabled | bool | `true` | | +| slave.persistence.size | string | `"8Gi"` | | +| slave.podDisruptionBudget.enabled | bool | `false` | | +| slave.podDisruptionBudget.minAvailable | int | `1` | | +| slave.readinessProbe.enabled | bool | `true` | | +| slave.readinessProbe.failureThreshold | int | `3` | | +| slave.readinessProbe.initialDelaySeconds | int | `45` | | +| slave.readinessProbe.periodSeconds | int | `10` | | +| slave.readinessProbe.successThreshold | int | `1` | | +| slave.readinessProbe.timeoutSeconds | int | `1` | | +| slave.replicas | int | `1` | | +| slave.resources | object | `{}` | | +| slave.service.annotations | object | `{}` | | +| slave.tolerations | list | `[]` | | +| slave.updateStrategy.type | string | `"RollingUpdate"` | | +| tests.enabled | bool | `true` | | +| tests.resources | object | `{}` | | +| tests.testFramework.image.registry | string | `"docker.io"` | | +| tests.testFramework.image.repository | string | `"dduportal/bats"` | | +| tests.testFramework.image.tag | string | `"0.4.0"` | | +| tests.testFramework.resources | object | `{}` | | +| volumePermissions.enabled | bool | `false` | | +| volumePermissions.image.pullPolicy | string | `"Always"` | | +| volumePermissions.image.registry | string | `"docker.io"` | | +| volumePermissions.image.repository | string | `"bitnami/minideb"` | | +| volumePermissions.image.tag | string | `"buster"` | | +| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 102/templates/NOTES.txt b/bitnami/mariadb/mariadb 102/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/_helpers.tpl b/bitnami/mariadb/mariadb 102/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/bitnami/mariadb/mariadb 102/templates/master-configmap.yaml b/bitnami/mariadb/mariadb 102/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 102/templates/master-pdb.yaml b/bitnami/mariadb/mariadb 102/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/master-svc.yaml b/bitnami/mariadb/mariadb 102/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb 102/templates/role.yaml b/bitnami/mariadb/mariadb 102/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/rolebinding.yaml b/bitnami/mariadb/mariadb 102/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/secrets.yaml b/bitnami/mariadb/mariadb 102/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/slave-svc.yaml b/bitnami/mariadb/mariadb 102/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/test-runner.yaml b/bitnami/mariadb/mariadb 102/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/templates/tests.yaml b/bitnami/mariadb/mariadb 102/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/bitnami/mariadb/mariadb 102/values-ironbank.yaml b/bitnami/mariadb/mariadb 102/values-ironbank.yaml new file mode 100644 index 0000000..5e22f85 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/values-ironbank.yaml @@ -0,0 +1,70 @@ +image: + repository: registry1.dsop.io/opensource/mariadb + tag: 10.2.32 + pullPolicy: IfNotPresent + debug: false + +volumePermissions: + enabled: false + image: + repository: registry1.dsop.io/redhat/ubi/ubi8 + tag: 8.2 + pullPolicy: Always + +master: + + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + log-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + +slave: + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + local-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 102/values-production.yaml b/bitnami/mariadb/mariadb 102/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/bitnami/mariadb/mariadb 102/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/bitnami/mariadb/mariadb 102/values.schema.json b/bitnami/mariadb/mariadb 102/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/bitnami/mariadb/mariadb 102/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/bitnami/mariadb/mariadb 102/values.yaml b/bitnami/mariadb/mariadb 102/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/bitnami/mariadb/mariadb 102/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} -- GitLab From c0a4c714eb4398853b8428a397cb362e7f06bead Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 09:55:52 -0600 Subject: [PATCH 19/31] Added mariadb 10.3 --- .DS_Store | Bin 6148 -> 6148 bytes bitnami/.DS_Store | Bin 6148 -> 6148 bytes bitnami/mariadb/.DS_Store | Bin 10244 -> 10244 bytes bitnami/mariadb/mariadb 103/Chart.yaml | 22 + .../mariadb/mariadb 103/IRONBANK.md.gotmpl | 23 + .../mariadb/mariadb 103/README-original.md | 342 ++++++++++ bitnami/mariadb/mariadb 103/README.md | 148 +++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb 103/templates/NOTES.txt | 49 ++ .../mariadb 103/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb 103/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb 103/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb 103/templates/role.yaml | 19 + .../mariadb 103/templates/rolebinding.yaml | 19 + .../mariadb 103/templates/secrets.yaml | 39 ++ .../mariadb 103/templates/serviceaccount.yaml | 12 + .../mariadb 103/templates/servicemonitor.yaml | 35 ++ .../templates/slave-configmap.yaml | 16 + .../mariadb 103/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb 103/templates/slave-svc.yaml | 49 ++ .../mariadb 103/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb 103/templates/tests.yaml | 12 + .../mariadb/mariadb 103/values-ironbank.yaml | 70 +++ .../mariadb 103/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb 103/values.schema.json | 169 +++++ bitnami/mariadb/mariadb 103/values.yaml | 583 +++++++++++++++++ 31 files changed, 3389 insertions(+) create mode 100644 bitnami/mariadb/mariadb 103/Chart.yaml create mode 100644 bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl create mode 100644 bitnami/mariadb/mariadb 103/README-original.md create mode 100644 bitnami/mariadb/mariadb 103/README.md create mode 100644 bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml create mode 100644 bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md create mode 100644 bitnami/mariadb/mariadb 103/templates/NOTES.txt create mode 100644 bitnami/mariadb/mariadb 103/templates/_helpers.tpl create mode 100644 bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/master-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/master-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/master-svc.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/role.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/rolebinding.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/secrets.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/slave-svc.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/test-runner.yaml create mode 100644 bitnami/mariadb/mariadb 103/templates/tests.yaml create mode 100644 bitnami/mariadb/mariadb 103/values-ironbank.yaml create mode 100644 bitnami/mariadb/mariadb 103/values-production.yaml create mode 100644 bitnami/mariadb/mariadb 103/values.schema.json create mode 100644 bitnami/mariadb/mariadb 103/values.yaml diff --git a/.DS_Store b/.DS_Store index 19f2712238843814197671ce77210aeb74c4050f..a3d0aa9346d2b1cd502214d19e643ee51560effc 100644 GIT binary patch delta 21 ccmZoMXffDun}x&J*i=Ws*u-e_V-`hW085t!P5=M^ delta 21 ccmZoMXffDun}x&3$XrLk*wl3MV-`hW086a~QUCw| diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store index 5266a65037c50ea99eeb43b292b93f554135f239..7ac0805f404699f5ac7a5599b6f34a8540691f6f 100644 GIT binary patch delta 21 ccmZoMXffDun~B5N*i=Ws*u-e_V|{ehsmW>r!i?&Ztpql57#o}FC>WaF058BX5&!@I delta 71 zcmV-N0J#5zP=rvBPXQLOP`eKS7Lzd%8j~gv69FxgIuNmw-4scaFB2A%N)f=5j}{cO d85Hgdv4Hylvj-sh1d~A+$dmOGB(vxj7XnG}7}fv) diff --git a/bitnami/mariadb/mariadb 103/Chart.yaml b/bitnami/mariadb/mariadb 103/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl new file mode 100644 index 0000000..dd7ffed --- /dev/null +++ b/bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl @@ -0,0 +1,23 @@ +{{ template "chart.header" . }} +{{ template "chart.description" . }} + +Version: {{ template "chart.version" . }} + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 103/README-original.md b/bitnami/mariadb/mariadb 103/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/bitnami/mariadb/mariadb 103/README.md b/bitnami/mariadb/mariadb 103/README.md new file mode 100644 index 0000000..d57836a --- /dev/null +++ b/bitnami/mariadb/mariadb 103/README.md @@ -0,0 +1,148 @@ +mariadb +======= +Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. + +Version: 7.6.1 + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| db.forcePassword | bool | `false` | | +| db.injectSecretsAsVolume | bool | `false` | | +| db.name | string | `"my_database"` | | +| db.password | string | `""` | | +| db.user | string | `""` | | +| image.debug | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"bitnami/mariadb"` | | +| image.tag | string | `"10.3.23-debian-10-r44"` | | +| master.affinity | object | `{}` | | +| master.antiAffinity | string | `"soft"` | | +| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| master.extraEnvVars | string | `nil` | | +| master.extraEnvVarsCM | string | `nil` | | +| master.extraEnvVarsSecret | string | `nil` | | +| master.extraInitContainers | list | `[]` | | +| master.livenessProbe.enabled | bool | `true` | | +| master.livenessProbe.failureThreshold | int | `3` | | +| master.livenessProbe.initialDelaySeconds | int | `120` | | +| master.livenessProbe.periodSeconds | int | `10` | | +| master.livenessProbe.successThreshold | int | `1` | | +| master.livenessProbe.timeoutSeconds | int | `1` | | +| master.nodeSelector | object | `{}` | | +| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| master.persistence.annotations | object | `{}` | | +| master.persistence.enabled | bool | `true` | | +| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | +| master.persistence.size | string | `"8Gi"` | | +| master.podDisruptionBudget.enabled | bool | `false` | | +| master.podDisruptionBudget.minAvailable | int | `1` | | +| master.readinessProbe.enabled | bool | `true` | | +| master.readinessProbe.failureThreshold | int | `3` | | +| master.readinessProbe.initialDelaySeconds | int | `30` | | +| master.readinessProbe.periodSeconds | int | `10` | | +| master.readinessProbe.successThreshold | int | `1` | | +| master.readinessProbe.timeoutSeconds | int | `1` | | +| master.resources | object | `{}` | | +| master.service.annotations | object | `{}` | | +| master.tolerations | list | `[]` | | +| master.updateStrategy.type | string | `"RollingUpdate"` | | +| metrics.annotations."prometheus.io/port" | string | `"9104"` | | +| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | +| metrics.enabled | bool | `false` | | +| metrics.extraArgs.master | list | `[]` | | +| metrics.extraArgs.slave | list | `[]` | | +| metrics.image.pullPolicy | string | `"IfNotPresent"` | | +| metrics.image.registry | string | `"docker.io"` | | +| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | +| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | +| metrics.livenessProbe.enabled | bool | `true` | | +| metrics.livenessProbe.failureThreshold | int | `3` | | +| metrics.livenessProbe.initialDelaySeconds | int | `120` | | +| metrics.livenessProbe.periodSeconds | int | `10` | | +| metrics.livenessProbe.successThreshold | int | `1` | | +| metrics.livenessProbe.timeoutSeconds | int | `1` | | +| metrics.readinessProbe.enabled | bool | `true` | | +| metrics.readinessProbe.failureThreshold | int | `3` | | +| metrics.readinessProbe.initialDelaySeconds | int | `30` | | +| metrics.readinessProbe.periodSeconds | int | `10` | | +| metrics.readinessProbe.successThreshold | int | `1` | | +| metrics.readinessProbe.timeoutSeconds | int | `1` | | +| metrics.resources | object | `{}` | | +| metrics.serviceMonitor.enabled | bool | `false` | | +| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | +| rbac.create | bool | `false` | | +| replication.enabled | bool | `true` | | +| replication.forcePassword | bool | `false` | | +| replication.injectSecretsAsVolume | bool | `false` | | +| replication.password | string | `""` | | +| replication.user | string | `"replicator"` | | +| rootUser.forcePassword | bool | `false` | | +| rootUser.injectSecretsAsVolume | bool | `false` | | +| rootUser.password | string | `""` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1001` | | +| securityContext.runAsUser | int | `1001` | | +| service.port | int | `3306` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `false` | | +| slave.affinity | object | `{}` | | +| slave.antiAffinity | string | `"soft"` | | +| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| slave.extraEnvVars | string | `nil` | | +| slave.extraEnvVarsCM | string | `nil` | | +| slave.extraEnvVarsSecret | string | `nil` | | +| slave.extraInitContainers | string | `nil` | | +| slave.livenessProbe.enabled | bool | `true` | | +| slave.livenessProbe.failureThreshold | int | `3` | | +| slave.livenessProbe.initialDelaySeconds | int | `120` | | +| slave.livenessProbe.periodSeconds | int | `10` | | +| slave.livenessProbe.successThreshold | int | `1` | | +| slave.livenessProbe.timeoutSeconds | int | `1` | | +| slave.nodeSelector | object | `{}` | | +| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| slave.persistence.annotations | string | `nil` | | +| slave.persistence.enabled | bool | `true` | | +| slave.persistence.size | string | `"8Gi"` | | +| slave.podDisruptionBudget.enabled | bool | `false` | | +| slave.podDisruptionBudget.minAvailable | int | `1` | | +| slave.readinessProbe.enabled | bool | `true` | | +| slave.readinessProbe.failureThreshold | int | `3` | | +| slave.readinessProbe.initialDelaySeconds | int | `45` | | +| slave.readinessProbe.periodSeconds | int | `10` | | +| slave.readinessProbe.successThreshold | int | `1` | | +| slave.readinessProbe.timeoutSeconds | int | `1` | | +| slave.replicas | int | `1` | | +| slave.resources | object | `{}` | | +| slave.service.annotations | object | `{}` | | +| slave.tolerations | list | `[]` | | +| slave.updateStrategy.type | string | `"RollingUpdate"` | | +| tests.enabled | bool | `true` | | +| tests.resources | object | `{}` | | +| tests.testFramework.image.registry | string | `"docker.io"` | | +| tests.testFramework.image.repository | string | `"dduportal/bats"` | | +| tests.testFramework.image.tag | string | `"0.4.0"` | | +| tests.testFramework.resources | object | `{}` | | +| volumePermissions.enabled | bool | `false` | | +| volumePermissions.image.pullPolicy | string | `"Always"` | | +| volumePermissions.image.registry | string | `"docker.io"` | | +| volumePermissions.image.repository | string | `"bitnami/minideb"` | | +| volumePermissions.image.tag | string | `"buster"` | | +| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 103/templates/NOTES.txt b/bitnami/mariadb/mariadb 103/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/_helpers.tpl b/bitnami/mariadb/mariadb 103/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/bitnami/mariadb/mariadb 103/templates/master-configmap.yaml b/bitnami/mariadb/mariadb 103/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 103/templates/master-pdb.yaml b/bitnami/mariadb/mariadb 103/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/master-svc.yaml b/bitnami/mariadb/mariadb 103/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb 103/templates/role.yaml b/bitnami/mariadb/mariadb 103/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/rolebinding.yaml b/bitnami/mariadb/mariadb 103/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/secrets.yaml b/bitnami/mariadb/mariadb 103/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/slave-svc.yaml b/bitnami/mariadb/mariadb 103/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/test-runner.yaml b/bitnami/mariadb/mariadb 103/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/templates/tests.yaml b/bitnami/mariadb/mariadb 103/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/bitnami/mariadb/mariadb 103/values-ironbank.yaml b/bitnami/mariadb/mariadb 103/values-ironbank.yaml new file mode 100644 index 0000000..826520a --- /dev/null +++ b/bitnami/mariadb/mariadb 103/values-ironbank.yaml @@ -0,0 +1,70 @@ +image: + repository: registry1.dsop.io/opensource/mariadb + tag: 10.3.23 + pullPolicy: IfNotPresent + debug: false + +volumePermissions: + enabled: false + image: + repository: registry1.dsop.io/redhat/ubi/ubi8 + tag: 8.2 + pullPolicy: Always + +master: + + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + log-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + +slave: + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + local-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 103/values-production.yaml b/bitnami/mariadb/mariadb 103/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/bitnami/mariadb/mariadb 103/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/bitnami/mariadb/mariadb 103/values.schema.json b/bitnami/mariadb/mariadb 103/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/bitnami/mariadb/mariadb 103/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/bitnami/mariadb/mariadb 103/values.yaml b/bitnami/mariadb/mariadb 103/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/bitnami/mariadb/mariadb 103/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} -- GitLab From cbd6d7e01aa3806d3cf56af451140542f86d843a Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 10:00:42 -0600 Subject: [PATCH 20/31] Added mariadb 10.4 --- bitnami/mariadb/.DS_Store | Bin 10244 -> 10244 bytes bitnami/mariadb/mariadb 104/Chart.yaml | 22 + .../mariadb/mariadb 104/IRONBANK.md.gotmpl | 23 + .../mariadb/mariadb 104/README-original.md | 342 ++++++++++ bitnami/mariadb/mariadb 104/README.md | 148 +++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb 104/templates/NOTES.txt | 49 ++ .../mariadb 104/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb 104/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb 104/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb 104/templates/role.yaml | 19 + .../mariadb 104/templates/rolebinding.yaml | 19 + .../mariadb 104/templates/secrets.yaml | 39 ++ .../mariadb 104/templates/serviceaccount.yaml | 12 + .../mariadb 104/templates/servicemonitor.yaml | 35 ++ .../templates/slave-configmap.yaml | 16 + .../mariadb 104/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb 104/templates/slave-svc.yaml | 49 ++ .../mariadb 104/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb 104/templates/tests.yaml | 12 + .../mariadb/mariadb 104/values-ironbank.yaml | 70 +++ .../mariadb 104/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb 104/values.schema.json | 169 +++++ bitnami/mariadb/mariadb 104/values.yaml | 583 +++++++++++++++++ 29 files changed, 3389 insertions(+) create mode 100644 bitnami/mariadb/mariadb 104/Chart.yaml create mode 100644 bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl create mode 100644 bitnami/mariadb/mariadb 104/README-original.md create mode 100644 bitnami/mariadb/mariadb 104/README.md create mode 100644 bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml create mode 100644 bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md create mode 100644 bitnami/mariadb/mariadb 104/templates/NOTES.txt create mode 100644 bitnami/mariadb/mariadb 104/templates/_helpers.tpl create mode 100644 bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/master-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/master-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/master-svc.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/role.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/rolebinding.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/secrets.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/slave-svc.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/test-runner.yaml create mode 100644 bitnami/mariadb/mariadb 104/templates/tests.yaml create mode 100644 bitnami/mariadb/mariadb 104/values-ironbank.yaml create mode 100644 bitnami/mariadb/mariadb 104/values-production.yaml create mode 100644 bitnami/mariadb/mariadb 104/values.schema.json create mode 100644 bitnami/mariadb/mariadb 104/values.yaml diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store index a266d8e02d99845f87786a2bd466be9c17b45e38..5f82abf4d1c17b776cb8ad0cf24bf8c95d98f5b7 100644 GIT binary patch delta 214 zcmZn(XbG6$C7U^hRb%49=9sm*Ev_n9Yi35kiCc;@6MC*|ZPF)%O)FfcHd18I%P zRsxEQCX@X{`X|2@h-Ws*NuPX9SY6O0H{Znts+OZg`RAs|4Z^Y@(G(0(pze!;nn1Ea dOnI}U$Y;*Y>|{ehsm*Ev_n9||v2$%~_|3SPUEvqYWJd|h&8Fg~m;hTx B4;KIc diff --git a/bitnami/mariadb/mariadb 104/Chart.yaml b/bitnami/mariadb/mariadb 104/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl new file mode 100644 index 0000000..dd7ffed --- /dev/null +++ b/bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl @@ -0,0 +1,23 @@ +{{ template "chart.header" . }} +{{ template "chart.description" . }} + +Version: {{ template "chart.version" . }} + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 104/README-original.md b/bitnami/mariadb/mariadb 104/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/bitnami/mariadb/mariadb 104/README.md b/bitnami/mariadb/mariadb 104/README.md new file mode 100644 index 0000000..d57836a --- /dev/null +++ b/bitnami/mariadb/mariadb 104/README.md @@ -0,0 +1,148 @@ +mariadb +======= +Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. + +Version: 7.6.1 + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| db.forcePassword | bool | `false` | | +| db.injectSecretsAsVolume | bool | `false` | | +| db.name | string | `"my_database"` | | +| db.password | string | `""` | | +| db.user | string | `""` | | +| image.debug | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"bitnami/mariadb"` | | +| image.tag | string | `"10.3.23-debian-10-r44"` | | +| master.affinity | object | `{}` | | +| master.antiAffinity | string | `"soft"` | | +| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| master.extraEnvVars | string | `nil` | | +| master.extraEnvVarsCM | string | `nil` | | +| master.extraEnvVarsSecret | string | `nil` | | +| master.extraInitContainers | list | `[]` | | +| master.livenessProbe.enabled | bool | `true` | | +| master.livenessProbe.failureThreshold | int | `3` | | +| master.livenessProbe.initialDelaySeconds | int | `120` | | +| master.livenessProbe.periodSeconds | int | `10` | | +| master.livenessProbe.successThreshold | int | `1` | | +| master.livenessProbe.timeoutSeconds | int | `1` | | +| master.nodeSelector | object | `{}` | | +| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| master.persistence.annotations | object | `{}` | | +| master.persistence.enabled | bool | `true` | | +| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | +| master.persistence.size | string | `"8Gi"` | | +| master.podDisruptionBudget.enabled | bool | `false` | | +| master.podDisruptionBudget.minAvailable | int | `1` | | +| master.readinessProbe.enabled | bool | `true` | | +| master.readinessProbe.failureThreshold | int | `3` | | +| master.readinessProbe.initialDelaySeconds | int | `30` | | +| master.readinessProbe.periodSeconds | int | `10` | | +| master.readinessProbe.successThreshold | int | `1` | | +| master.readinessProbe.timeoutSeconds | int | `1` | | +| master.resources | object | `{}` | | +| master.service.annotations | object | `{}` | | +| master.tolerations | list | `[]` | | +| master.updateStrategy.type | string | `"RollingUpdate"` | | +| metrics.annotations."prometheus.io/port" | string | `"9104"` | | +| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | +| metrics.enabled | bool | `false` | | +| metrics.extraArgs.master | list | `[]` | | +| metrics.extraArgs.slave | list | `[]` | | +| metrics.image.pullPolicy | string | `"IfNotPresent"` | | +| metrics.image.registry | string | `"docker.io"` | | +| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | +| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | +| metrics.livenessProbe.enabled | bool | `true` | | +| metrics.livenessProbe.failureThreshold | int | `3` | | +| metrics.livenessProbe.initialDelaySeconds | int | `120` | | +| metrics.livenessProbe.periodSeconds | int | `10` | | +| metrics.livenessProbe.successThreshold | int | `1` | | +| metrics.livenessProbe.timeoutSeconds | int | `1` | | +| metrics.readinessProbe.enabled | bool | `true` | | +| metrics.readinessProbe.failureThreshold | int | `3` | | +| metrics.readinessProbe.initialDelaySeconds | int | `30` | | +| metrics.readinessProbe.periodSeconds | int | `10` | | +| metrics.readinessProbe.successThreshold | int | `1` | | +| metrics.readinessProbe.timeoutSeconds | int | `1` | | +| metrics.resources | object | `{}` | | +| metrics.serviceMonitor.enabled | bool | `false` | | +| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | +| rbac.create | bool | `false` | | +| replication.enabled | bool | `true` | | +| replication.forcePassword | bool | `false` | | +| replication.injectSecretsAsVolume | bool | `false` | | +| replication.password | string | `""` | | +| replication.user | string | `"replicator"` | | +| rootUser.forcePassword | bool | `false` | | +| rootUser.injectSecretsAsVolume | bool | `false` | | +| rootUser.password | string | `""` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1001` | | +| securityContext.runAsUser | int | `1001` | | +| service.port | int | `3306` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `false` | | +| slave.affinity | object | `{}` | | +| slave.antiAffinity | string | `"soft"` | | +| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| slave.extraEnvVars | string | `nil` | | +| slave.extraEnvVarsCM | string | `nil` | | +| slave.extraEnvVarsSecret | string | `nil` | | +| slave.extraInitContainers | string | `nil` | | +| slave.livenessProbe.enabled | bool | `true` | | +| slave.livenessProbe.failureThreshold | int | `3` | | +| slave.livenessProbe.initialDelaySeconds | int | `120` | | +| slave.livenessProbe.periodSeconds | int | `10` | | +| slave.livenessProbe.successThreshold | int | `1` | | +| slave.livenessProbe.timeoutSeconds | int | `1` | | +| slave.nodeSelector | object | `{}` | | +| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| slave.persistence.annotations | string | `nil` | | +| slave.persistence.enabled | bool | `true` | | +| slave.persistence.size | string | `"8Gi"` | | +| slave.podDisruptionBudget.enabled | bool | `false` | | +| slave.podDisruptionBudget.minAvailable | int | `1` | | +| slave.readinessProbe.enabled | bool | `true` | | +| slave.readinessProbe.failureThreshold | int | `3` | | +| slave.readinessProbe.initialDelaySeconds | int | `45` | | +| slave.readinessProbe.periodSeconds | int | `10` | | +| slave.readinessProbe.successThreshold | int | `1` | | +| slave.readinessProbe.timeoutSeconds | int | `1` | | +| slave.replicas | int | `1` | | +| slave.resources | object | `{}` | | +| slave.service.annotations | object | `{}` | | +| slave.tolerations | list | `[]` | | +| slave.updateStrategy.type | string | `"RollingUpdate"` | | +| tests.enabled | bool | `true` | | +| tests.resources | object | `{}` | | +| tests.testFramework.image.registry | string | `"docker.io"` | | +| tests.testFramework.image.repository | string | `"dduportal/bats"` | | +| tests.testFramework.image.tag | string | `"0.4.0"` | | +| tests.testFramework.resources | object | `{}` | | +| volumePermissions.enabled | bool | `false` | | +| volumePermissions.image.pullPolicy | string | `"Always"` | | +| volumePermissions.image.registry | string | `"docker.io"` | | +| volumePermissions.image.repository | string | `"bitnami/minideb"` | | +| volumePermissions.image.tag | string | `"buster"` | | +| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 104/templates/NOTES.txt b/bitnami/mariadb/mariadb 104/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/_helpers.tpl b/bitnami/mariadb/mariadb 104/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/bitnami/mariadb/mariadb 104/templates/master-configmap.yaml b/bitnami/mariadb/mariadb 104/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 104/templates/master-pdb.yaml b/bitnami/mariadb/mariadb 104/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/master-svc.yaml b/bitnami/mariadb/mariadb 104/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb 104/templates/role.yaml b/bitnami/mariadb/mariadb 104/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/rolebinding.yaml b/bitnami/mariadb/mariadb 104/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/secrets.yaml b/bitnami/mariadb/mariadb 104/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/slave-svc.yaml b/bitnami/mariadb/mariadb 104/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/test-runner.yaml b/bitnami/mariadb/mariadb 104/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/templates/tests.yaml b/bitnami/mariadb/mariadb 104/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/bitnami/mariadb/mariadb 104/values-ironbank.yaml b/bitnami/mariadb/mariadb 104/values-ironbank.yaml new file mode 100644 index 0000000..8db5958 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/values-ironbank.yaml @@ -0,0 +1,70 @@ +image: + repository: registry1.dsop.io/opensource/mariadb + tag: 10.4.13 + pullPolicy: IfNotPresent + debug: false + +volumePermissions: + enabled: false + image: + repository: registry1.dsop.io/redhat/ubi/ubi8 + tag: 8.2 + pullPolicy: Always + +master: + + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + log-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + +slave: + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + local-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 104/values-production.yaml b/bitnami/mariadb/mariadb 104/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/bitnami/mariadb/mariadb 104/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/bitnami/mariadb/mariadb 104/values.schema.json b/bitnami/mariadb/mariadb 104/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/bitnami/mariadb/mariadb 104/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/bitnami/mariadb/mariadb 104/values.yaml b/bitnami/mariadb/mariadb 104/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/bitnami/mariadb/mariadb 104/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} -- GitLab From 0afae836046ba23cdabf137cd29222ac124a84cb Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 10:02:20 -0600 Subject: [PATCH 21/31] Added mariadb 10.5 --- bitnami/mariadb/.DS_Store | Bin 10244 -> 10244 bytes bitnami/mariadb/mariadb 105/Chart.yaml | 22 + .../mariadb/mariadb 105/IRONBANK.md.gotmpl | 23 + .../mariadb/mariadb 105/README-original.md | 342 ++++++++++ bitnami/mariadb/mariadb 105/README.md | 148 +++++ .../ci/values-production-with-rbac.yaml | 31 + .../docker-entrypoint-initdb.d/README.md | 3 + .../mariadb/mariadb 105/templates/NOTES.txt | 49 ++ .../mariadb 105/templates/_helpers.tpl | 298 +++++++++ .../templates/initialization-configmap.yaml | 27 + .../templates/master-configmap.yaml | 16 + .../mariadb 105/templates/master-pdb.yaml | 25 + .../templates/master-statefulset.yaml | 344 ++++++++++ .../mariadb 105/templates/master-svc.yaml | 47 ++ .../mariadb/mariadb 105/templates/role.yaml | 19 + .../mariadb 105/templates/rolebinding.yaml | 19 + .../mariadb 105/templates/secrets.yaml | 39 ++ .../mariadb 105/templates/serviceaccount.yaml | 12 + .../mariadb 105/templates/servicemonitor.yaml | 35 ++ .../templates/slave-configmap.yaml | 16 + .../mariadb 105/templates/slave-pdb.yaml | 27 + .../templates/slave-statefulset.yaml | 316 ++++++++++ .../mariadb 105/templates/slave-svc.yaml | 49 ++ .../mariadb 105/templates/test-runner.yaml | 53 ++ .../mariadb/mariadb 105/templates/tests.yaml | 12 + .../mariadb/mariadb 105/values-ironbank.yaml | 70 +++ .../mariadb 105/values-production.yaml | 595 ++++++++++++++++++ .../mariadb/mariadb 105/values.schema.json | 169 +++++ bitnami/mariadb/mariadb 105/values.yaml | 583 +++++++++++++++++ 29 files changed, 3389 insertions(+) create mode 100644 bitnami/mariadb/mariadb 105/Chart.yaml create mode 100644 bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl create mode 100644 bitnami/mariadb/mariadb 105/README-original.md create mode 100644 bitnami/mariadb/mariadb 105/README.md create mode 100644 bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml create mode 100644 bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md create mode 100644 bitnami/mariadb/mariadb 105/templates/NOTES.txt create mode 100644 bitnami/mariadb/mariadb 105/templates/_helpers.tpl create mode 100644 bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/master-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/master-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/master-svc.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/role.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/rolebinding.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/secrets.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/slave-svc.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/test-runner.yaml create mode 100644 bitnami/mariadb/mariadb 105/templates/tests.yaml create mode 100644 bitnami/mariadb/mariadb 105/values-ironbank.yaml create mode 100644 bitnami/mariadb/mariadb 105/values-production.yaml create mode 100644 bitnami/mariadb/mariadb 105/values.schema.json create mode 100644 bitnami/mariadb/mariadb 105/values.yaml diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store index 5f82abf4d1c17b776cb8ad0cf24bf8c95d98f5b7..c8b339f0409ef77bd3ddf93d291eec092ba6d1d7 100644 GIT binary patch delta 225 zcmZn(XbG6$jIU^hRb_GCjrsm*Evw^%2035f}sdgkOOC*|ZPF)%O)FfcIQo~$FH z%4j;dPrQHfYk_zm%TZKQ&@?yS#RaO0<6Vs6tH}+*vLMkE3{jwti-MYrrkg*CN^@*x OSNKU|dnSJrl>h)-OG8Zn delta 50 zcmZn(XbG6$C7U^hRb%49=9sm*Evw^%1TNQ!Lcm-xZHvEeu4W_E?2Fp&?80I!P> A{Qv*} diff --git a/bitnami/mariadb/mariadb 105/Chart.yaml b/bitnami/mariadb/mariadb 105/Chart.yaml new file mode 100644 index 0000000..e8a6bd8 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +name: mariadb +version: 7.6.1 +appVersion: 10.3.23 +description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. +keywords: + - mariadb + - mysql + - database + - sql + - prometheus +home: https://mariadb.org +icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png +sources: + - https://github.com/bitnami/bitnami-docker-mariadb + - https://github.com/prometheus/mysqld_exporter +maintainers: + - name: Bitnami + email: containers@bitnami.com +engine: gotpl +annotations: + category: Database diff --git a/bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl new file mode 100644 index 0000000..dd7ffed --- /dev/null +++ b/bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl @@ -0,0 +1,23 @@ +{{ template "chart.header" . }} +{{ template "chart.description" . }} + +Version: {{ template "chart.version" . }} + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 105/README-original.md b/bitnami/mariadb/mariadb 105/README-original.md new file mode 100644 index 0000000..80640c2 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/README-original.md @@ -0,0 +1,342 @@ +# MariaDB + +[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. + +MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. + +## TL;DR; + +```bash +$ helm repo add bitnami https://charts.bitnami.com/bitnami +$ helm install my-release bitnami/mariadb +``` + +## Introduction + +This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). + +## Prerequisites + +- Kubernetes 1.12+ +- Helm 2.12+ or Helm 3.0-beta3+ +- PV provisioner support in the underlying infrastructure + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install my-release bitnami/mariadb +``` + +The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Parameters + +The following table lists the configurable parameters of the MariaDB chart and their default values. + +| Parameter | Description | Default | +|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | +| `image.registry` | MariaDB image registry | `docker.io` | +| `image.repository` | MariaDB Image name | `bitnami/mariadb` | +| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | +| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | +| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | +| `image.debug` | Specify if debug logs should be enabled | `false` | +| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | +| `podLabels` | Additional pod labels | `{}` | +| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | +| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | +| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | +| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | +| `volumePermissions.resources` | Init container resource requests/limit | `nil` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | +| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | +| `service.port` | MySQL service port | `3306` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | +| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | +| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | +| `rbac.create` | Create and use RBAC resources | `false` | +| `securityContext.enabled` | Enable security context | `true` | +| `securityContext.fsGroup` | Group ID for the container | `1001` | +| `securityContext.runAsUser` | User ID for the container | `1001` | +| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | +| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `rootUser.forcePassword` | Force users to specify a password | `false` | +| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | +| `db.name` | Name for new database to create | `my_database` | +| `db.user` | Username of new user to create | `""` | +| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | +| `db.forcePassword` | Force users to specify a password | `false` | +| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | +| `replication.enabled` | MariaDB replication enabled | `true` | +| `replication.user` | MariaDB replication user | `replicator` | +| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | +| `replication.forcePassword` | Force users to specify a password | `false` | +| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | +| `initdbScripts` | Dictionary of initdb scripts | `nil` | +| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | +| `master.annotations[].key` | key for the the annotation list item | `nil` | +| `master.annotations[].value` | value for the the annotation list item | `nil` | +| `master.extraFlags` | MariaDB master additional command line flags | `nil` | +| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | +| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | +| `master.nodeSelector` | Master node labels for pod assignment | `{}` | +| `master.tolerations` | List of node taints to tolerate (master) | `[]` | +| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | +| `master.persistence.enabled` | Enable persistence using PVC | `true` | +| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | +| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | +| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | +| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `master.persistence.size` | Persistent Volume Size | `8Gi` | +| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | +| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | +| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | +| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | +| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | +| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | +| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | +| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | +| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | +| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | +| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | +| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | +| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | +| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `master.service.annotations` | Master service annotations | `{}` | +| `slave.replicas` | Desired number of slave replicas | `1` | +| `slave.annotations[].key` | key for the the annotation list item | `nil` | +| `slave.annotations[].value` | value for the the annotation list item | `nil` | +| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | +| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | +| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | +| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | +| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | +| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | +| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | +| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | +| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | +| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | +| `slave.persistence.size` | Persistent Volume Size | `8Gi` | +| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | +| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | +| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | +| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | +| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | +| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | +| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | +| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | +| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | +| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | +| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | +| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | +| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | +| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | +| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | +| `slave.service.annotations` | Slave service annotations | `{}` | +| `metrics.enabled` | Start a side-car prometheus exporter | `false` | +| `metrics.image.registry` | Exporter image registry | `docker.io` | +| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | +| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | +| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | +| `metrics.resources` | Exporter resource requests/limit | `nil` | +| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | +| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | +| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | +| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | +| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | +| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | +| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | +| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | +| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | +| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | +| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | +| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | +| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | +| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | +| `tests.resources` | Resource definition for the test-runner pod | `nil` | +| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | +| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | +| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | +| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | + +The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install my-release \ + --set rootUser.password=secretpassword,db.user=app_database \ + bitnami/mariadb +``` + +The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install my-release -f values.yaml bitnami/mariadb +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +## Configuration and installation details + +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) + +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. + +Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. + +### Production configuration + +This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. + +- Force users to specify a password and mount secrets as volumes instead of using environment variables: + +```diff +- rootUser.forcePassword: false +- rootUser.injectSecretsAsVolume: false ++ rootUser.forcePassword: true ++ rootUser.injectSecretsAsVolume: true +- db.forcePassword: false +- db.injectSecretsAsVolume: false ++ db.forcePassword: true ++ db.injectSecretsAsVolume: true +- replication.forcePassword: false +- replication.injectSecretsAsVolume: false ++ replication.forcePassword: true ++ replication.injectSecretsAsVolume: true +``` + +- Desired number of slave replicas: + +```diff +- slave.replicas: 1 ++ slave.replicas: 2 +``` + +- Start a side-car prometheus exporter: + +```diff +- metrics.enabled: false ++ metrics.enabled: true +``` + +### Change MariaDB version + +To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. + +### Initialize a fresh instance + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. + +Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. + +In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. + +The allowed extensions are `.sh`, `.sql` and `.sql.gz`. + +### Extra Init Containers + +The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. +`values.yaml` +```yaml +master: + extraInitContainers: | + - name: initcontainer + image: bitnami/minideb:buster + command: ["/bin/sh", "-c"] + args: + - install_packages curl && curl http://api-service.local/db/starting; +``` + +## Persistence + +The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. + +The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. + +### Adjust permissions of persistent volume mountpoint + +As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. + +By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. +As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. + +You can enable this initContainer by setting `volumePermissions.enabled` to `true`. + +## Upgrading + +It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: + +```bash +$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] +``` + +| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. + +### To 7.0.0 + +Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. + +In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. + +This major version bump signifies this change. + +### To 6.0.0 + +MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: + +- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) +- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) + +### To 5.0.0 + +Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. +Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: + +```console +$ kubectl delete statefulset opencart-mariadb --cascade=false +``` diff --git a/bitnami/mariadb/mariadb 105/README.md b/bitnami/mariadb/mariadb 105/README.md new file mode 100644 index 0000000..d57836a --- /dev/null +++ b/bitnami/mariadb/mariadb 105/README.md @@ -0,0 +1,148 @@ +mariadb +======= +Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. + +Version: 7.6.1 + +This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. + +A `values-ironbank.yaml` file is included with required parameters for deployment. + +- sets `bind-address` to `localhost` +- sets `local-infile` to `0` + +Reference the original [README](./README-original.md) for additional configuration options. + +## Installation + +```shell +helm install ./ --name mariadb -f values-ironbank.yaml +``` + +## Configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| db.forcePassword | bool | `false` | | +| db.injectSecretsAsVolume | bool | `false` | | +| db.name | string | `"my_database"` | | +| db.password | string | `""` | | +| db.user | string | `""` | | +| image.debug | bool | `false` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"docker.io"` | | +| image.repository | string | `"bitnami/mariadb"` | | +| image.tag | string | `"10.3.23-debian-10-r44"` | | +| master.affinity | object | `{}` | | +| master.antiAffinity | string | `"soft"` | | +| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| master.extraEnvVars | string | `nil` | | +| master.extraEnvVarsCM | string | `nil` | | +| master.extraEnvVarsSecret | string | `nil` | | +| master.extraInitContainers | list | `[]` | | +| master.livenessProbe.enabled | bool | `true` | | +| master.livenessProbe.failureThreshold | int | `3` | | +| master.livenessProbe.initialDelaySeconds | int | `120` | | +| master.livenessProbe.periodSeconds | int | `10` | | +| master.livenessProbe.successThreshold | int | `1` | | +| master.livenessProbe.timeoutSeconds | int | `1` | | +| master.nodeSelector | object | `{}` | | +| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| master.persistence.annotations | object | `{}` | | +| master.persistence.enabled | bool | `true` | | +| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | +| master.persistence.size | string | `"8Gi"` | | +| master.podDisruptionBudget.enabled | bool | `false` | | +| master.podDisruptionBudget.minAvailable | int | `1` | | +| master.readinessProbe.enabled | bool | `true` | | +| master.readinessProbe.failureThreshold | int | `3` | | +| master.readinessProbe.initialDelaySeconds | int | `30` | | +| master.readinessProbe.periodSeconds | int | `10` | | +| master.readinessProbe.successThreshold | int | `1` | | +| master.readinessProbe.timeoutSeconds | int | `1` | | +| master.resources | object | `{}` | | +| master.service.annotations | object | `{}` | | +| master.tolerations | list | `[]` | | +| master.updateStrategy.type | string | `"RollingUpdate"` | | +| metrics.annotations."prometheus.io/port" | string | `"9104"` | | +| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | +| metrics.enabled | bool | `false` | | +| metrics.extraArgs.master | list | `[]` | | +| metrics.extraArgs.slave | list | `[]` | | +| metrics.image.pullPolicy | string | `"IfNotPresent"` | | +| metrics.image.registry | string | `"docker.io"` | | +| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | +| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | +| metrics.livenessProbe.enabled | bool | `true` | | +| metrics.livenessProbe.failureThreshold | int | `3` | | +| metrics.livenessProbe.initialDelaySeconds | int | `120` | | +| metrics.livenessProbe.periodSeconds | int | `10` | | +| metrics.livenessProbe.successThreshold | int | `1` | | +| metrics.livenessProbe.timeoutSeconds | int | `1` | | +| metrics.readinessProbe.enabled | bool | `true` | | +| metrics.readinessProbe.failureThreshold | int | `3` | | +| metrics.readinessProbe.initialDelaySeconds | int | `30` | | +| metrics.readinessProbe.periodSeconds | int | `10` | | +| metrics.readinessProbe.successThreshold | int | `1` | | +| metrics.readinessProbe.timeoutSeconds | int | `1` | | +| metrics.resources | object | `{}` | | +| metrics.serviceMonitor.enabled | bool | `false` | | +| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | +| rbac.create | bool | `false` | | +| replication.enabled | bool | `true` | | +| replication.forcePassword | bool | `false` | | +| replication.injectSecretsAsVolume | bool | `false` | | +| replication.password | string | `""` | | +| replication.user | string | `"replicator"` | | +| rootUser.forcePassword | bool | `false` | | +| rootUser.injectSecretsAsVolume | bool | `false` | | +| rootUser.password | string | `""` | | +| securityContext.enabled | bool | `true` | | +| securityContext.fsGroup | int | `1001` | | +| securityContext.runAsUser | int | `1001` | | +| service.port | int | `3306` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.create | bool | `false` | | +| slave.affinity | object | `{}` | | +| slave.antiAffinity | string | `"soft"` | | +| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | +| slave.extraEnvVars | string | `nil` | | +| slave.extraEnvVarsCM | string | `nil` | | +| slave.extraEnvVarsSecret | string | `nil` | | +| slave.extraInitContainers | string | `nil` | | +| slave.livenessProbe.enabled | bool | `true` | | +| slave.livenessProbe.failureThreshold | int | `3` | | +| slave.livenessProbe.initialDelaySeconds | int | `120` | | +| slave.livenessProbe.periodSeconds | int | `10` | | +| slave.livenessProbe.successThreshold | int | `1` | | +| slave.livenessProbe.timeoutSeconds | int | `1` | | +| slave.nodeSelector | object | `{}` | | +| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | +| slave.persistence.annotations | string | `nil` | | +| slave.persistence.enabled | bool | `true` | | +| slave.persistence.size | string | `"8Gi"` | | +| slave.podDisruptionBudget.enabled | bool | `false` | | +| slave.podDisruptionBudget.minAvailable | int | `1` | | +| slave.readinessProbe.enabled | bool | `true` | | +| slave.readinessProbe.failureThreshold | int | `3` | | +| slave.readinessProbe.initialDelaySeconds | int | `45` | | +| slave.readinessProbe.periodSeconds | int | `10` | | +| slave.readinessProbe.successThreshold | int | `1` | | +| slave.readinessProbe.timeoutSeconds | int | `1` | | +| slave.replicas | int | `1` | | +| slave.resources | object | `{}` | | +| slave.service.annotations | object | `{}` | | +| slave.tolerations | list | `[]` | | +| slave.updateStrategy.type | string | `"RollingUpdate"` | | +| tests.enabled | bool | `true` | | +| tests.resources | object | `{}` | | +| tests.testFramework.image.registry | string | `"docker.io"` | | +| tests.testFramework.image.repository | string | `"dduportal/bats"` | | +| tests.testFramework.image.tag | string | `"0.4.0"` | | +| tests.testFramework.resources | object | `{}` | | +| volumePermissions.enabled | bool | `false` | | +| volumePermissions.image.pullPolicy | string | `"Always"` | | +| volumePermissions.image.registry | string | `"docker.io"` | | +| volumePermissions.image.repository | string | `"bitnami/minideb"` | | +| volumePermissions.image.tag | string | `"buster"` | | +| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml new file mode 100644 index 0000000..3e71d77 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml @@ -0,0 +1,31 @@ +# Test values file for generating all of the yaml and check that +# the rendering is correct + +metrics: + enabled: true + +podDisruptionBudget: + create: true + +master: + extraEnvVars: + - name: TEST + value: "3" + + extraEnvVarsSecret: example-secret + extraEnvVarsCM: example-cm + +slave: + extraEnvVars: + - name: TEST + value: "2" + + extraEnvVarsSecret: example-secret-2 + extraEnvVarsCM: example-cm-2 + +rbac: + create: true + +serviceAccount: + create: true + name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md new file mode 100644 index 0000000..aaddde3 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md @@ -0,0 +1,3 @@ +You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. + +More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 105/templates/NOTES.txt b/bitnami/mariadb/mariadb 105/templates/NOTES.txt new file mode 100644 index 0000000..9cf93ae --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/NOTES.txt @@ -0,0 +1,49 @@ + +Please be patient while the chart is being deployed + +Tip: + + Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} + +Services: + + echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- if .Values.replication.enabled }} + echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} +{{- end }} + +Administrator credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + +To connect to your database: + + 1. Run a pod that you can use as a client: + + kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash + + 2. To connect to master service (read/write): + + mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} + +{{- if .Values.replication.enabled }} + + 3. To connect to slave service (read-only): + + mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} +{{- end }} + +To upgrade this helm chart: + + 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: + + ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD + +{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} + +WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. ++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ + +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/_helpers.tpl b/bitnami/mariadb/mariadb 105/templates/_helpers.tpl new file mode 100644 index 0000000..27d629f --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/_helpers.tpl @@ -0,0 +1,298 @@ +{{/* +Return the appropriate apiVersion for statefulset. +*/}} +{{- define "mariadb.statefulset.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "apps/v1beta1" -}} +{{- else -}} +{{- print "apps/v1" -}} +{{- end -}} +{{- end -}} + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mariadb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mariadb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{- define "master.fullname" -}} +{{- if .Values.replication.enabled -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- include "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} + +{{- define "slave.fullname" -}} +{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{- define "mariadb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create pod labels for mariadb +*/}} +{{- define "mariadb.podLabels" -}} +{{- if .Values.podLabels }} +{{ toYaml .Values.podLabels }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper MariaDB image name +*/}} +{{- define "mariadb.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper metrics image name +*/}} +{{- define "mariadb.metrics.image" -}} +{{- $registryName := .Values.metrics.image.registry -}} +{{- $repositoryName := .Values.metrics.image.repository -}} +{{- $tag := .Values.metrics.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{ template "mariadb.initdbScriptsCM" . }} +{{/* +Get the initialization scripts ConfigMap name. +*/}} +{{- define "mariadb.initdbScriptsCM" -}} +{{- if .Values.initdbScriptsConfigMap -}} +{{- printf "%s" .Values.initdbScriptsConfigMap -}} +{{- else -}} +{{- printf "%s-init-scripts" (include "master.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "mariadb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Docker Image Registry Secret Names +*/}} +{{- define "mariadb.imagePullSecrets" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +Also, we can not use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} +{{- if .Values.global.imagePullSecrets }} +imagePullSecrets: +{{- range .Values.global.imagePullSecrets }} + - name: {{ . }} +{{- end }} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} +imagePullSecrets: +{{- range .Values.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.metrics.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- range .Values.volumePermissions.image.pullSecrets }} + - name: {{ . }} +{{- end }} +{{- end -}} +{{- end -}} + +{{/* +Return the proper test image name +*/}} +{{- define "mariadb.tests.testFramework.image" -}} +{{- $registryName := .Values.tests.testFramework.image.registry -}} +{{- $repositoryName := .Values.tests.testFramework.image.repository -}} +{{- $tag := .Values.tests.testFramework.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper image name (for the init container volume-permissions image) +*/}} +{{- define "mariadb.volumePermissions.image" -}} +{{- $registryName := .Values.volumePermissions.image.registry -}} +{{- $repositoryName := .Values.volumePermissions.image.repository -}} +{{- $tag := .Values.volumePermissions.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the master +*/}} +{{- define "mariadb.master.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.master.persistence.storageClass -}} + {{- if (eq "-" .Values.master.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the proper Storage Class for the slave +*/}} +{{- define "mariadb.slave.storageClass" -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. +*/}} +{{- if .Values.global -}} + {{- if .Values.global.storageClass -}} + {{- if (eq "-" .Values.global.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.global.storageClass -}} + {{- end -}} + {{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} + {{- end -}} +{{- else -}} + {{- if .Values.slave.persistence.storageClass -}} + {{- if (eq "-" .Values.slave.persistence.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} + {{- end -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Return the name of the Secret used to store the passwords +*/}} +{{- define "mariadb.secretName" -}} +{{- if .Values.existingSecret -}} +{{ .Values.existingSecret }} +{{- else -}} +{{ template "mariadb.fullname" . -}} +{{- end -}} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml new file mode 100644 index 0000000..2dbeb2d --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml @@ -0,0 +1,27 @@ +{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }}-init-scripts + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + component: "master" +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} +binaryData: +{{- $root := . }} +{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} + {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} +{{- end }} +{{- end }} +data: +{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} +{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} +{{- end }} +{{- with .Values.initdbScripts }} +{{ toYaml . | indent 2 }} +{{- end }} +{{ end }} diff --git a/bitnami/mariadb/mariadb 105/templates/master-configmap.yaml b/bitnami/mariadb/mariadb 105/templates/master-configmap.yaml new file mode 100644 index 0000000..3620743 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/master-configmap.yaml @@ -0,0 +1,16 @@ +{{- if .Values.master.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.master.config | indent 4 }} +{{- end -}} diff --git a/bitnami/mariadb/mariadb 105/templates/master-pdb.yaml b/bitnami/mariadb/mariadb 105/templates/master-pdb.yaml new file mode 100644 index 0000000..012d09a --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/master-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.master.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.master.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.master.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml new file mode 100644 index 0000000..03bbd48 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml @@ -0,0 +1,344 @@ +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: master + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: master + serviceName: {{ template "master.fullname" . }} + replicas: 1 + updateStrategy: + type: {{ .Values.master.updateStrategy.type }} + {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- with .Values.master.annotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: master + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.master.antiAffinity "hard" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.master.antiAffinity "soft" }} + affinity: + {{- with .Values.master.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.master.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.master.nodeSelector }} + nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.master.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} +{{ tpl .Values.master.extraInitContainers . | indent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.master.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.master.extraFlags }}" + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + {{- if not (empty .Values.db.user) }} + - name: MARIADB_USER + value: "{{ .Values.db.user }}" + {{- if .Values.db.injectSecretsAsVolume }} + - name: MARIADB_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-password" + {{- else }} + - name: MARIADB_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-password + {{- end }} + {{- end }} + - name: MARIADB_DATABASE + value: "{{ .Values.db.name }}" + {{- if .Values.replication.enabled }} + - name: MARIADB_REPLICATION_MODE + value: "master" + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- end }} + {{- if .Values.master.extraEnvVars }} + {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} + envFrom: + {{- if .Values.master.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.master.extraEnvVarsCM }} + {{- end }} + {{- if .Values.master.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.master.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.master.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.master.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.master.resources }} + resources: {{ toYaml .Values.master.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: {{ .Values.master.persistence.mountPath }} + {{- if .Values.master.persistence.subPath }} + subPath: {{ .Values.master.persistence.subPath }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.master.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.master.config }} + - name: config + configMap: + name: {{ template "master.fullname" . }} + {{- end }} + {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} + - name: custom-init-scripts + configMap: + name: {{ template "mariadb.initdbScriptsCM" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.db.injectSecretsAsVolume }} + - key: mariadb-password + path: mariadb-password + {{- end }} + {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} + - name: data + persistentVolumeClaim: + claimName: {{ .Values.master.persistence.existingClaim }} +{{- else if not .Values.master.persistence.enabled }} + - name: data + emptyDir: {} +{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.master.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.master.persistence.size | quote }} + {{ include "mariadb.master.storageClass" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/master-svc.yaml b/bitnami/mariadb/mariadb 105/templates/master-svc.yaml new file mode 100644 index 0000000..5b1be80 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/master-svc.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "master" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.master.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.master.service.annotations }} +{{ toYaml .Values.master.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.master }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if eq .Values.service.type "NodePort" }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.master }} + nodePort: {{ .Values.service.nodePort.master }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "master" + release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb 105/templates/role.yaml b/bitnami/mariadb/mariadb 105/templates/role.yaml new file mode 100644 index 0000000..296c439 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/role.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/rolebinding.yaml b/bitnami/mariadb/mariadb 105/templates/rolebinding.yaml new file mode 100644 index 0000000..223eda9 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/rolebinding.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.serviceAccount.create .Values.rbac.create }} +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "master.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +subjects: + - kind: ServiceAccount + name: {{ template "mariadb.serviceAccountName" . }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "master.fullname" . }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/secrets.yaml b/bitnami/mariadb/mariadb 105/templates/secrets.yaml new file mode 100644 index 0000000..8560837 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/secrets.yaml @@ -0,0 +1,39 @@ +{{- if (not .Values.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +type: Opaque +data: + {{- if not (empty .Values.rootUser.password) }} + mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" + {{- else if (not .Values.rootUser.forcePassword) }} + mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" + {{ else }} + mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} + {{- end }} + {{- if not (empty .Values.db.user) }} + {{- if not (empty .Values.db.password) }} + mariadb-password: "{{ .Values.db.password | b64enc }}" + {{- else if (not .Values.db.forcePassword) }} + mariadb-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} + {{- end }} + {{- end }} + {{- if .Values.replication.enabled }} + {{- if not (empty .Values.replication.password) }} + mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" + {{- else if (not .Values.replication.forcePassword) }} + mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" + {{- else }} + mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} + {{- end }} + {{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml new file mode 100644 index 0000000..5af7e45 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "mariadb.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml new file mode 100644 index 0000000..696a5c0 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml @@ -0,0 +1,35 @@ +{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "mariadb.fullname" . }} + {{- if .Values.metrics.serviceMonitor.namespace }} + namespace: {{ .Values.metrics.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name | quote }} + endpoints: + - port: metrics + {{- if .Values.metrics.serviceMonitor.interval }} + interval: {{ .Values.metrics.serviceMonitor.interval }} + {{- end }} + {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} + scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml new file mode 100644 index 0000000..21b0579 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.replication.enabled .Values.slave.config }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: "{{ template "mariadb.chart" . }}" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +data: + my.cnf: |- +{{ .Values.slave.config | indent 4 }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml new file mode 100644 index 0000000..40f3572 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml @@ -0,0 +1,27 @@ +{{- if .Values.replication.enabled }} +{{- if .Values.slave.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "mariadb.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +spec: +{{- if .Values.slave.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} +{{- end }} +{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} +{{- end }} + selector: + matchLabels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml new file mode 100644 index 0000000..09f5d67 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml @@ -0,0 +1,316 @@ +{{- if .Values.replication.enabled }} +apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} +kind: StatefulSet +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + component: slave + {{- include "mariadb.podLabels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + component: slave + serviceName: {{ template "slave.fullname" . }} + replicas: {{ .Values.slave.replicas }} + updateStrategy: + type: {{ .Values.slave.updateStrategy.type }} + {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} + rollingUpdate: null + {{- end }} + template: + metadata: + {{- if .Values.slave.annotations }} + annotations: + {{- range $key, $value := .Values.slave.annotations }} + {{ $key }}: {{ $value }} + {{- end }} + {{- end }} + labels: + app: {{ template "mariadb.name" . }} + chart: {{ template "mariadb.chart" . }} + release: {{ .Release.Name }} + component: slave + {{- include "mariadb.podLabels" . | nindent 8 }} + spec: + {{- if .Values.schedulerName }} + schedulerName: {{ .Values.schedulerName | quote }} + {{- end }} + serviceAccountName: {{ template "mariadb.serviceAccountName" . }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} + {{- if eq .Values.slave.antiAffinity "hard" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else if eq .Values.slave.antiAffinity "soft" }} + affinity: + {{- with .Values.slave.affinity }} +{{ toYaml . | indent 8 }} + {{- end }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: {{ template "mariadb.name" . }} + release: {{ .Release.Name }} + {{- else}} + {{- with .Values.slave.affinity }} + affinity: {{ toYaml . | nindent 8 }} + {{- end }} + {{- end }} + {{- if .Values.slave.nodeSelector }} + nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} + {{- end -}} + {{- with .Values.slave.tolerations }} + tolerations: {{ toYaml . | nindent 8 }} + {{- end }} +{{- include "mariadb.imagePullSecrets" . | indent 6 }} + initContainers: + {{- if .Values.master.extraInitContainers }} + {{- tpl .Values.master.extraInitContainers . | nindent 8 }} + {{- end }} + {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} + - name: volume-permissions + image: {{ template "mariadb.volumePermissions.image" . }} + imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} + command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] + securityContext: + runAsUser: 0 + resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- end }} + containers: + - name: "mariadb" + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + env: + {{- if .Values.image.debug}} + - name: BITNAMI_DEBUG + value: "true" + {{- end }} + {{- if .Values.slave.extraFlags }} + - name: MARIADB_EXTRA_FLAGS + value: "{{ .Values.slave.extraFlags }}" + {{- end }} + - name: MARIADB_REPLICATION_MODE + value: "slave" + - name: MARIADB_MASTER_HOST + value: {{ template "mariadb.fullname" . }} + - name: MARIADB_MASTER_PORT_NUMBER + value: "{{ .Values.service.port }}" + - name: MARIADB_MASTER_ROOT_USER + value: "root" + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_MASTER_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_MASTER_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + - name: MARIADB_REPLICATION_USER + value: "{{ .Values.replication.user }}" + {{- if .Values.replication.injectSecretsAsVolume }} + - name: MARIADB_REPLICATION_PASSWORD_FILE + value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" + {{- else }} + - name: MARIADB_REPLICATION_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-replication-password + {{- end }} + {{- if .Values.slave.extraEnvVars }} + {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} + {{- end }} + {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} + envFrom: + {{- if .Values.slave.extraEnvVarsCM }} + - configMapRef: + name: {{ .Values.slave.extraEnvVarsCM }} + {{- end }} + {{- if .Values.slave.extraEnvVarsSecret }} + - secretRef: + name: {{ .Values.slave.extraEnvVarsSecret }} + {{- end }} + {{- end }} + ports: + - name: mysql + containerPort: 3306 + {{- if .Values.slave.livenessProbe.enabled }} + livenessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.readinessProbe.enabled }} + readinessProbe: + exec: + command: + - sh + - -c + - | + password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) + fi + mysqladmin status -uroot -p$password_aux + initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.slave.resources }} + resources: {{ toYaml .Values.slave.resources | nindent 12 }} + {{- end }} + volumeMounts: + - name: data + mountPath: /bitnami/mariadb + {{- if .Values.slave.config }} + - name: config + mountPath: /opt/bitnami/mariadb/conf/my.cnf + subPath: my.cnf + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + mountPath: /opt/bitnami/mariadb/secrets/ + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + image: {{ template "mariadb.metrics.image" . }} + imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} + env: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - name: MARIADB_ROOT_PASSWORD_FILE + value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" + {{- else }} + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- end }} + command: + - sh + - -c + - | + password_aux="${MARIADB_ROOT_PASSWORD:-}" + if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then + password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) + fi + DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} + ports: + - name: metrics + containerPort: 9104 + {{- if .Values.metrics.livenessProbe.enabled }} + livenessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.readinessProbe.enabled }} + readinessProbe: + httpGet: + path: /metrics + port: metrics + initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} + successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} + failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: {{ toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.rootUser.injectSecretsAsVolume }} + volumeMounts: + - name: mariadb-credentials + mountPath: /opt/bitnami/mysqld-exporter/secrets/ + {{- end }} + {{- end }} + volumes: + {{- if .Values.slave.config }} + - name: config + configMap: + name: {{ template "slave.fullname" . }} + {{- end }} + {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} + - name: mariadb-credentials + secret: + secretName: {{ template "mariadb.fullname" . }} + items: + {{- if .Values.rootUser.injectSecretsAsVolume }} + - key: mariadb-root-password + path: mariadb-root-password + {{- end }} + {{- if .Values.replication.injectSecretsAsVolume }} + - key: mariadb-replication-password + path: mariadb-replication-password + {{- end }} + {{- end }} +{{- if not .Values.slave.persistence.enabled }} + - name: "data" + emptyDir: {} +{{- else }} + volumeClaimTemplates: + - metadata: + name: data + labels: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} + spec: + accessModes: + {{- range .Values.slave.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.slave.persistence.size | quote }} + {{ include "mariadb.slave.storageClass" . }} +{{- end }} +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/slave-svc.yaml b/bitnami/mariadb/mariadb 105/templates/slave-svc.yaml new file mode 100644 index 0000000..12fa7eb --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/slave-svc.yaml @@ -0,0 +1,49 @@ +{{- if .Values.replication.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "slave.fullname" . }} + namespace: {{ .Release.Namespace }} + labels: + app: "{{ template "mariadb.name" . }}" + chart: "{{ template "mariadb.chart" . }}" + component: "slave" + release: {{ .Release.Name | quote }} + heritage: {{ .Release.Service | quote }} +{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} + annotations: +{{- if .Values.metrics.enabled }} +{{ toYaml .Values.metrics.annotations | indent 4 }} +{{- end }} +{{- if .Values.slave.service.annotations }} +{{ toYaml .Values.slave.service.annotations | indent 4 }} +{{- end }} +{{- end }} +spec: + type: {{ .Values.service.type }} + {{- if eq .Values.service.type "ClusterIP" }} + {{- if .Values.service.clusterIp }} + clusterIP: {{ .Values.service.clusterIp.slave }} + {{- end }} + {{- end }} + ports: + - name: mysql + port: {{ .Values.service.port }} + targetPort: mysql + {{- if (eq .Values.service.type "NodePort") }} + {{- if .Values.service.nodePort }} + {{- if .Values.service.nodePort.slave }} + nodePort: {{ .Values.service.nodePort.slave }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.metrics.enabled }} + - name: metrics + port: 9104 + targetPort: metrics + {{- end }} + selector: + app: "{{ template "mariadb.name" . }}" + component: "slave" + release: "{{ .Release.Name }}" +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/test-runner.yaml b/bitnami/mariadb/mariadb 105/templates/test-runner.yaml new file mode 100644 index 0000000..bfb64cd --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/test-runner.yaml @@ -0,0 +1,53 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: Pod +metadata: + name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" + namespace: {{ .Release.Namespace }} + annotations: + "helm.sh/hook": test-success +spec: + initContainers: + - name: "test-framework" + image: {{ template "mariadb.tests.testFramework.image" . }} + command: + - "bash" + - "-c" + - | + set -ex + # copy bats to tools dir + cp -R /usr/local/libexec/ /tools/bats/ + {{- if .Values.tests.testFramework.resources }} + resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tools + name: tools + containers: + - name: mariadb-test + image: {{ template "mariadb.image" . }} + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + command: ["/tools/bats/bats", "-t", "/tests/run.sh"] + env: + - name: MARIADB_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "mariadb.secretName" . }} + key: mariadb-root-password + {{- if .Values.tests.resources }} + resources: {{ toYaml .Values.tests.resources | nindent 8 }} + {{- end }} + volumeMounts: + - mountPath: /tests + name: tests + readOnly: true + - mountPath: /tools + name: tools + volumes: + - name: tests + configMap: + name: {{ template "mariadb.fullname" . }}-tests + - name: tools + emptyDir: {} + restartPolicy: Never +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/templates/tests.yaml b/bitnami/mariadb/mariadb 105/templates/tests.yaml new file mode 100644 index 0000000..0da46d5 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/templates/tests.yaml @@ -0,0 +1,12 @@ +{{- if .Values.tests.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "mariadb.fullname" . }}-tests + namespace: {{ .Release.Namespace }} +data: + run.sh: |- + @test "Testing MariaDB is accessible" { + mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' + } +{{- end }} diff --git a/bitnami/mariadb/mariadb 105/values-ironbank.yaml b/bitnami/mariadb/mariadb 105/values-ironbank.yaml new file mode 100644 index 0000000..3d2e660 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/values-ironbank.yaml @@ -0,0 +1,70 @@ +image: + repository: registry1.dsop.io/opensource/mariadb + tag: 10.5.4 + pullPolicy: IfNotPresent + debug: false + +volumePermissions: + enabled: false + image: + repository: registry1.dsop.io/redhat/ubi/ubi8 + tag: 8.2 + pullPolicy: Always + +master: + + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + log-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + +slave: + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=127.0.0.1 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + local-infile=0 + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + \ No newline at end of file diff --git a/bitnami/mariadb/mariadb 105/values-production.yaml b/bitnami/mariadb/mariadb 105/values-production.yaml new file mode 100644 index 0000000..ad2965f --- /dev/null +++ b/bitnami/mariadb/mariadb 105/values-production.yaml @@ -0,0 +1,595 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: true + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: true + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +slave: + replicas: 2 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: --max-connect-errors=1000 --max_connections=155" + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + # extraEnvVars: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + +metrics: + enabled: true + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} diff --git a/bitnami/mariadb/mariadb 105/values.schema.json b/bitnami/mariadb/mariadb 105/values.schema.json new file mode 100644 index 0000000..b1b72e1 --- /dev/null +++ b/bitnami/mariadb/mariadb 105/values.schema.json @@ -0,0 +1,169 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "rootUser": { + "type": "object", + "properties": { + "password": { + "type": "string", + "title": "MariaDB admin password", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "db": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "MariaDB custom database", + "description": "Name of the custom database to be created during the 1st initialization of MariaDB", + "form": true + }, + "user": { + "type": "string", + "title": "MariaDB custom user", + "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", + "form": true + }, + "password": { + "type": "string", + "title": "Password for MariaDB custom user", + "form": true, + "description": "Defaults to a random 10-character alphanumeric string if not set", + "hidden": { + "value": false, + "path": "usePassword" + } + } + } + }, + "replication": { + "type": "object", + "title": "Replication configuration", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable replication configuration" + } + } + }, + "master": { + "type": "object", + "title": "Master replicas settings", + "form": true, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for master replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "slave": { + "type": "object", + "title": "Slave replicas settings", + "form": true, + "hidden": { + "value": false, + "path": "replication/enabled" + }, + "properties": { + "persistence": { + "type": "object", + "title": "Persistence for slave replicas", + "form": true, + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable persistence", + "description": "Enable persistence using Persistent Volume Claims" + }, + "size": { + "type": "string", + "title": "Persistent Volume Size", + "form": true, + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi", + "hidden": { + "value": false, + "path": "persistence/enabled" + } + } + } + } + } + }, + "volumePermissions": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "form": true, + "title": "Enable Init Containers", + "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" + } + } + }, + "metrics": { + "type": "object", + "form": true, + "title": "Prometheus metrics details", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus metrics exporter", + "description": "Create a side-car container to expose Prometheus metrics", + "form": true + }, + "serviceMonitor": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Create Prometheus Operator ServiceMonitor", + "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", + "form": true, + "hidden": { + "value": false, + "path": "metrics/enabled" + } + } + } + } + } + } + } +} diff --git a/bitnami/mariadb/mariadb 105/values.yaml b/bitnami/mariadb/mariadb 105/values.yaml new file mode 100644 index 0000000..0a678ee --- /dev/null +++ b/bitnami/mariadb/mariadb 105/values.yaml @@ -0,0 +1,583 @@ +## Global Docker image parameters +## Please, note that this will override the image parameters, including dependencies, configured to use the global value +## Current available global Docker image parameters: imageRegistry and imagePullSecrets +## +# global: +# imageRegistry: myRegistryName +# imagePullSecrets: +# - myRegistryKeySecretName +# storageClass: myStorageClass + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Bitnami MariaDB image +## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ +## +image: + registry: docker.io + repository: bitnami/mariadb + tag: 10.3.23-debian-10-r44 + ## Specify a imagePullPolicy + ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' + ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images + ## + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + + ## Set to true if you would like to see extra information on logs + ## It turns BASH and NAMI debugging in minideb + ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging + debug: false + +## String to partially override mariadb.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override mariadb.fullname template +## +# fullnameOverride: + +## Additional pod labels +## +# podLabels: + # extraLabel: extraValue + +## Init containers parameters: +## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. +## +volumePermissions: + enabled: false + image: + registry: docker.io + repository: bitnami/minideb + tag: buster + pullPolicy: Always + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + +service: + ## Kubernetes service type, ClusterIP and NodePort are supported at present + type: ClusterIP + # clusterIp: + # master: xx.xx.xx.xx + # slave: xx.xx.xx.xx + port: 3306 + ## Specify the nodePort value for the LoadBalancer and NodePort service types. + ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + ## + # nodePort: + # master: 30001 + # slave: 30002 + +## Pods Service Account +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ +serviceAccount: + ## Specifies whether a ServiceAccount should be created + ## + create: false + ## The name of the ServiceAccount to use. + ## If not set and create is true, a name is generated using the mariadb.fullname template + # name: + +## Role Based Access +## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ +## +rbac: + create: false + +## Pod Security Context +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ +## +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 + +## Use existing secret (ignores root, db and replication passwords) +## +# existingSecret: + +## MariaDB admin credentials +## +rootUser: + ## MariaDB admin password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount admin password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Custom user/db credentials +## +db: + ## MariaDB username and password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run + ## + user: "" + password: "" + ## Database to create + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run + ## + name: my_database + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## Replication configuration +## +replication: + ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a + ## master deployment would be created + ## + enabled: true + ## MariaDB replication user + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + user: replicator + ## MariaDB replication user password + ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster + ## + password: "" + ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. + ## If it is not force, a random password will be generated. + ## + forcePassword: false + ## Mount replication user password as a file instead of using an environment variable + ## + injectSecretsAsVolume: false + +## initdb scripts +## Specify dictionary of scripts to be run at first boot +## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory +## +# initdbScripts: +# my_init_script.sh: | +# #!/bin/sh +# echo "Do something." +# +## ConfigMap with scripts to be run at first boot +## Note: This will override initdbScripts +# initdbScriptsConfigMap: + +master: + ## Mariadb Master additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through master.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Master StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + ## Enable persistence using Persistent Volume Claims + ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ + ## + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # Enable persistence using an existing PVC + # existingClaim: + # Subdirectory of the volume to mount + # subPath: + mountPath: /bitnami/mariadb + ## Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + ## Persistent Volume Claim annotations + ## + annotations: {} + ## Persistent Volume Access Mode + ## + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init Containers (evaluated as a templ + ## + extraInitContainers: [] + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + plugin_dir=/opt/bitnami/mariadb/plugin + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + plugin_dir=/opt/bitnami/mariadb/plugin + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## Configure master resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: db.example.com + +slave: + replicas: 1 + + ## Mariadb Slave additional pod annotations + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + # annotations: + # key: value + # another-key: another-value + + ## MariaDB additional command line flags + ## Can be used to specify command line flags, for example: + ## + ## extraFlags: "--max-connect-errors=1000 --max_connections=155" + + ## Affinity for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + ## + affinity: {} + + ## Kept for backwards compatibility. You can now disable it by removing it. + ## if you wish to set it through slave.affinity.podAntiAffinity instead. + ## + antiAffinity: soft + + ## Node labels for pod assignment + ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ + ## + nodeSelector: {} + + ## Tolerations for pod assignment + ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ + ## + tolerations: [] + + ## updateStrategy for MariaDB Slave StatefulSet + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies + updateStrategy: + type: RollingUpdate + + persistence: + ## If true, use a Persistent Volume Claim, If false, use emptyDir + ## + enabled: true + # storageClass: "-" + annotations: + accessModes: + - ReadWriteOnce + ## Persistent Volume size + ## + size: 8Gi + + ## Add extra init containers + ## + extraInitContainers: + + ## An array to add extra environment variables + ## For example: + ## extraEnvVars: + ## - name: TZ + ## value: "Europe/Paris" + ## + extraEnvVars: + + ## ConfigMap with extra env vars: + ## + extraEnvVarsCM: + + ## Secret with extra env vars: + ## + extraEnvVarsSecret: + + ## Configure MySQL slave with a custom my.cnf file + ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file + ## + config: |- + [mysqld] + skip-name-resolve + explicit_defaults_for_timestamp + basedir=/opt/bitnami/mariadb + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + tmpdir=/opt/bitnami/mariadb/tmp + max_allowed_packet=16M + bind-address=0.0.0.0 + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + log-error=/opt/bitnami/mariadb/logs/mysqld.log + character-set-server=UTF8 + collation-server=utf8_general_ci + + [client] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + default-character-set=UTF8 + + [manager] + port=3306 + socket=/opt/bitnami/mariadb/tmp/mysql.sock + pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid + + ## + ## Configure slave resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + ## + resources: {} + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 45 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + podDisruptionBudget: + enabled: false + minAvailable: 1 + # maxUnavailable: 1 + + ## Allow customization of the service resource + ## + service: + ## Add custom annotations to the service + ## + annotations: {} + # external-dns.alpha.kubernetes.io/hostname: rodb.example.com + +metrics: + enabled: false + image: + registry: docker.io + repository: bitnami/mysqld-exporter + tag: 0.12.1-debian-10-r146 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + ## Secrets must be manually created in the namespace. + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + ## + # pullSecrets: + # - myRegistryKeySecretName + resources: {} + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "9104" + + ## Extra args to be passed to mysqld_exporter + ## ref: https://github.com/prometheus/mysqld_exporter/ + ## + extraArgs: + master: [] + slave: [] + # - --collect.auto_increment.columns + # - --collect.binlog_size + # - --collect.engine_innodb_status + # - --collect.engine_tokudb_status + # - --collect.global_status + # - --collect.global_variables + # - --collect.info_schema.clientstats + # - --collect.info_schema.innodb_metrics + # - --collect.info_schema.innodb_tablespaces + # - --collect.info_schema.innodb_cmp + # - --collect.info_schema.innodb_cmpmem + # - --collect.info_schema.processlist + # - --collect.info_schema.processlist.min_time + # - --collect.info_schema.query_response_time + # - --collect.info_schema.tables + # - --collect.info_schema.tables.databases + # - --collect.info_schema.tablestats + # - --collect.info_schema.userstats + # - --collect.perf_schema.eventsstatements + # - --collect.perf_schema.eventsstatements.digest_text_limit + # - --collect.perf_schema.eventsstatements.limit + # - --collect.perf_schema.eventsstatements.timelimit + # - --collect.perf_schema.eventswaits + # - --collect.perf_schema.file_events + # - --collect.perf_schema.file_instances + # - --collect.perf_schema.indexiowaits + # - --collect.perf_schema.tableiowaits + # - --collect.perf_schema.tablelocks + # - --collect.perf_schema.replication_group_member_stats + # - --collect.slave_status + # - --collect.slave_hosts + # - --collect.heartbeat + # - --collect.heartbeat.database + # - --collect.heartbeat.table + + livenessProbe: + enabled: true + ## + ## Initializing the database could take some time + initialDelaySeconds: 120 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + enabled: true + initialDelaySeconds: 30 + ## + ## Default Kubernetes values + periodSeconds: 10 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 3 + + # Enable this if you're using https://github.com/coreos/prometheus-operator + serviceMonitor: + enabled: false + ## Specify a namespace if needed + # namespace: monitoring + # fallback to the prometheus default unless specified + # interval: 10s + # scrapeTimeout: 10s + ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) + ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) + ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) + selector: + prometheus: kube-prometheus + +## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible +## See test-runner.yaml and tests.yaml for details. +## To run the tests after the deployment, enter "helm test ". +tests: + enabled: true + resources: {} + testFramework: + image: + registry: docker.io + repository: dduportal/bats + tag: 0.4.0 + resources: {} -- GitLab From d127d4b5bbe063799b27ee3d2aa4762964a0e656 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 16:02:51 +0000 Subject: [PATCH 22/31] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index a3d0aa9346d2b1cd502214d19e643ee51560effc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~-EPw`6vvOZvbsfxULbAa$~Q<{RH$tR)r62j=`MDGgb0EQKwCm87AcFTCZ&Q< zl-JH?MW?>>V7vep9}ky?d`0LJXUhw#!yeTRhmDwu>GwJ9THqN(N88zv|?B#>mnVG$zFg-iQ7do7n zZ`9R}fFrO-VBI{n)cL=A`u%?~$vrs&j=+CKfYpYZ}zg2Pn!^TxC?J kpt8rYZm6Sp3q>1zLN%bi)ygP(VD68A#^5SP;I|U^0qQ5a`v3p{ -- GitLab From 33ee3a98107a6099e28e0a02d63d31e0f5257cab Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Sun, 19 Jul 2020 16:03:02 +0000 Subject: [PATCH 23/31] Delete .DS_Store --- bitnami/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/.DS_Store diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store deleted file mode 100644 index 7ac0805f404699f5ac7a5599b6f34a8540691f6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T317w-vDmL63V8JoHelKL-&))q^)7q6ZaCOwmBhN}F1=R`MG9Mm~X$ zqcgkPf>w`;$_&hWli8U~_Dk5!0Dx$8q9uR|07z8ALJ7?$LgS<(QgD$mL}BI#AcAl= z(dS_@lFfnN$N;^&Nw|UlS`echzCRt}2z?eCsEe;g&>P7PyY1^RG1<@IbrQF;TJ1#? z#){(;lTwytdAfY!U+S)(1zD%v2wF#UwHIWUq4W2(PKJIE9>mS=X=Qdxr&$oE&6X*S zqb8;tAI52C~V`e~#Z< Date: Sun, 19 Jul 2020 16:03:10 +0000 Subject: [PATCH 24/31] Delete .DS_Store --- bitnami/mariadb/.DS_Store | Bin 10244 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/.DS_Store diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store deleted file mode 100644 index c8b339f0409ef77bd3ddf93d291eec092ba6d1d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHN%Wl&^6rE{Pa8eMJKq?CsMhK`x7KtB30wIME7Tp0sWkI2}o2apr*ijxt5Q4G* z2|fY70JeMrJHCJgf53tbD^_slK^_w)nW_qMn;B{5jO}}E&pC;&?@bUwIM*ts5z-Mt z8gzndr(g(a28h8QAqN$a3nxpX)R?u}p%_pMCqTK#eia<&j5Ko=+FsfIrbRRM+Xcv1pth}ZrWfDc>wj%Ic7Qb7*ba_C(9l%cf~x# zz|0+v>%<%|%dy9hxg*Tn5$0FMJVU|s>fonSbA+=D)u_xkGADqf?RN`1pi%dwRcCp9ghB~B-v6v{!n z&~%!uM$V}}CR_KMX4&QQhe1&3&mDKmE46pl&fN+8rsMggI(7DnB{123j>EEq9z3^a~^k6-Zezvu=^rn>bmLPo_ zq~Dk+y|q}A`v+{cLM#=`AVgZ9)3)QqtRtCA}>zy*(`b&+Usp zrb-Xi1LyMk#n+`z5+oWC zBQcYjBZ-CtiQjK2i-Bc!yE>`=-<|yX|Iu2Mx?9D7V&Fgw;8?zp&w;yN26SSZB1js{vmAR2VGp$b{$s!)t9~l~AN Date: Sun, 19 Jul 2020 10:06:53 -0600 Subject: [PATCH 25/31] Renamed file --- bitnami/mariadb/{mariadb101 => mariadb 101}/Chart.yaml | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/README-original.md | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/templates/NOTES.txt | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb101 => mariadb 101}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/master-pdb.yaml | 0 .../{mariadb101 => mariadb 101}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/templates/role.yaml | 0 .../{mariadb101 => mariadb 101}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/secrets.yaml | 0 .../{mariadb101 => mariadb 101}/templates/serviceaccount.yaml | 0 .../{mariadb101 => mariadb 101}/templates/servicemonitor.yaml | 0 .../{mariadb101 => mariadb 101}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/slave-pdb.yaml | 0 .../{mariadb101 => mariadb 101}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/templates/slave-svc.yaml | 0 .../{mariadb101 => mariadb 101}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/values-ironbank.yaml | 0 .../mariadb/{mariadb101 => mariadb 101}/values-production.yaml | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/values.schema.json | 0 bitnami/mariadb/{mariadb101 => mariadb 101}/values.yaml | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename bitnami/mariadb/{mariadb101 => mariadb 101}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/README-original.md (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/README.md (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/values.schema.json (100%) rename bitnami/mariadb/{mariadb101 => mariadb 101}/values.yaml (100%) diff --git a/bitnami/mariadb/mariadb101/Chart.yaml b/bitnami/mariadb/mariadb 101/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/Chart.yaml rename to bitnami/mariadb/mariadb 101/Chart.yaml diff --git a/bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb 101/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb 101/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb101/README-original.md b/bitnami/mariadb/mariadb 101/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb101/README-original.md rename to bitnami/mariadb/mariadb 101/README-original.md diff --git a/bitnami/mariadb/mariadb101/README.md b/bitnami/mariadb/mariadb 101/README.md similarity index 100% rename from bitnami/mariadb/mariadb101/README.md rename to bitnami/mariadb/mariadb 101/README.md diff --git a/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb 101/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb 101/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb 101/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb 101/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb101/templates/NOTES.txt b/bitnami/mariadb/mariadb 101/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb101/templates/NOTES.txt rename to bitnami/mariadb/mariadb 101/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb101/templates/_helpers.tpl b/bitnami/mariadb/mariadb 101/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb101/templates/_helpers.tpl rename to bitnami/mariadb/mariadb 101/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb 101/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb 101/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-configmap.yaml b/bitnami/mariadb/mariadb 101/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb 101/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-pdb.yaml b/bitnami/mariadb/mariadb 101/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb 101/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb 101/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb 101/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-svc.yaml b/bitnami/mariadb/mariadb 101/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-svc.yaml rename to bitnami/mariadb/mariadb 101/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb101/templates/role.yaml b/bitnami/mariadb/mariadb 101/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/role.yaml rename to bitnami/mariadb/mariadb 101/templates/role.yaml diff --git a/bitnami/mariadb/mariadb101/templates/rolebinding.yaml b/bitnami/mariadb/mariadb 101/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb 101/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb101/templates/secrets.yaml b/bitnami/mariadb/mariadb 101/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/secrets.yaml rename to bitnami/mariadb/mariadb 101/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb 101/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb 101/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb 101/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb 101/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb 101/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb 101/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb 101/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb 101/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb 101/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb 101/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-svc.yaml b/bitnami/mariadb/mariadb 101/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb 101/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb101/templates/test-runner.yaml b/bitnami/mariadb/mariadb 101/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/test-runner.yaml rename to bitnami/mariadb/mariadb 101/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb101/templates/tests.yaml b/bitnami/mariadb/mariadb 101/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/tests.yaml rename to bitnami/mariadb/mariadb 101/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb101/values-ironbank.yaml b/bitnami/mariadb/mariadb 101/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/values-ironbank.yaml rename to bitnami/mariadb/mariadb 101/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb101/values-production.yaml b/bitnami/mariadb/mariadb 101/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/values-production.yaml rename to bitnami/mariadb/mariadb 101/values-production.yaml diff --git a/bitnami/mariadb/mariadb101/values.schema.json b/bitnami/mariadb/mariadb 101/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb101/values.schema.json rename to bitnami/mariadb/mariadb 101/values.schema.json diff --git a/bitnami/mariadb/mariadb101/values.yaml b/bitnami/mariadb/mariadb 101/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/values.yaml rename to bitnami/mariadb/mariadb 101/values.yaml -- GitLab From de1d6e5c074f72a3b3abc80ec31d7c2f7d29af6c Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 07:47:30 -0600 Subject: [PATCH 26/31] renamed folders --- bitnami/mariadb/{mariadb 101 => mariadb101}/Chart.yaml | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/README-original.md | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/templates/NOTES.txt | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb 101 => mariadb101}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/master-pdb.yaml | 0 .../{mariadb 101 => mariadb101}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/templates/role.yaml | 0 .../{mariadb 101 => mariadb101}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/secrets.yaml | 0 .../{mariadb 101 => mariadb101}/templates/serviceaccount.yaml | 0 .../{mariadb 101 => mariadb101}/templates/servicemonitor.yaml | 0 .../{mariadb 101 => mariadb101}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/slave-pdb.yaml | 0 .../{mariadb 101 => mariadb101}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/templates/slave-svc.yaml | 0 .../{mariadb 101 => mariadb101}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/values-ironbank.yaml | 0 .../mariadb/{mariadb 101 => mariadb101}/values-production.yaml | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/values.schema.json | 0 bitnami/mariadb/{mariadb 101 => mariadb101}/values.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/Chart.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/README-original.md | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/templates/NOTES.txt | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb 102 => mariadb102}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/master-pdb.yaml | 0 .../{mariadb 102 => mariadb102}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/templates/role.yaml | 0 .../{mariadb 102 => mariadb102}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/secrets.yaml | 0 .../{mariadb 102 => mariadb102}/templates/serviceaccount.yaml | 0 .../{mariadb 102 => mariadb102}/templates/servicemonitor.yaml | 0 .../{mariadb 102 => mariadb102}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/slave-pdb.yaml | 0 .../{mariadb 102 => mariadb102}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/templates/slave-svc.yaml | 0 .../{mariadb 102 => mariadb102}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/values-ironbank.yaml | 0 .../mariadb/{mariadb 102 => mariadb102}/values-production.yaml | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/values.schema.json | 0 bitnami/mariadb/{mariadb 102 => mariadb102}/values.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/Chart.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/README-original.md | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/templates/NOTES.txt | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb 103 => mariadb103}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/master-pdb.yaml | 0 .../{mariadb 103 => mariadb103}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/templates/role.yaml | 0 .../{mariadb 103 => mariadb103}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/secrets.yaml | 0 .../{mariadb 103 => mariadb103}/templates/serviceaccount.yaml | 0 .../{mariadb 103 => mariadb103}/templates/servicemonitor.yaml | 0 .../{mariadb 103 => mariadb103}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/slave-pdb.yaml | 0 .../{mariadb 103 => mariadb103}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/templates/slave-svc.yaml | 0 .../{mariadb 103 => mariadb103}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/values-ironbank.yaml | 0 .../mariadb/{mariadb 103 => mariadb103}/values-production.yaml | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/values.schema.json | 0 bitnami/mariadb/{mariadb 103 => mariadb103}/values.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/Chart.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/README-original.md | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/templates/NOTES.txt | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb 104 => mariadb104}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/master-pdb.yaml | 0 .../{mariadb 104 => mariadb104}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/templates/role.yaml | 0 .../{mariadb 104 => mariadb104}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/secrets.yaml | 0 .../{mariadb 104 => mariadb104}/templates/serviceaccount.yaml | 0 .../{mariadb 104 => mariadb104}/templates/servicemonitor.yaml | 0 .../{mariadb 104 => mariadb104}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/slave-pdb.yaml | 0 .../{mariadb 104 => mariadb104}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/templates/slave-svc.yaml | 0 .../{mariadb 104 => mariadb104}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/values-ironbank.yaml | 0 .../mariadb/{mariadb 104 => mariadb104}/values-production.yaml | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/values.schema.json | 0 bitnami/mariadb/{mariadb 104 => mariadb104}/values.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/Chart.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/IRONBANK.md.gotmpl | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/README-original.md | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/README.md | 0 .../ci/values-production-with-rbac.yaml | 0 .../files/docker-entrypoint-initdb.d/README.md | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/templates/NOTES.txt | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../{mariadb 105 => mariadb105}/templates/master-configmap.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/master-pdb.yaml | 0 .../{mariadb 105 => mariadb105}/templates/master-statefulset.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/master-svc.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/templates/role.yaml | 0 .../{mariadb 105 => mariadb105}/templates/rolebinding.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/secrets.yaml | 0 .../{mariadb 105 => mariadb105}/templates/serviceaccount.yaml | 0 .../{mariadb 105 => mariadb105}/templates/servicemonitor.yaml | 0 .../{mariadb 105 => mariadb105}/templates/slave-configmap.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/slave-pdb.yaml | 0 .../{mariadb 105 => mariadb105}/templates/slave-statefulset.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/templates/slave-svc.yaml | 0 .../{mariadb 105 => mariadb105}/templates/test-runner.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/templates/tests.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/values-ironbank.yaml | 0 .../mariadb/{mariadb 105 => mariadb105}/values-production.yaml | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/values.schema.json | 0 bitnami/mariadb/{mariadb 105 => mariadb105}/values.yaml | 0 140 files changed, 0 insertions(+), 0 deletions(-) rename bitnami/mariadb/{mariadb 101 => mariadb101}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/README-original.md (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/README.md (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/values.schema.json (100%) rename bitnami/mariadb/{mariadb 101 => mariadb101}/values.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/README-original.md (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/README.md (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/values.schema.json (100%) rename bitnami/mariadb/{mariadb 102 => mariadb102}/values.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/README-original.md (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/README.md (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/values.schema.json (100%) rename bitnami/mariadb/{mariadb 103 => mariadb103}/values.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/README-original.md (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/README.md (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/values.schema.json (100%) rename bitnami/mariadb/{mariadb 104 => mariadb104}/values.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/Chart.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/README-original.md (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/README.md (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/files/docker-entrypoint-initdb.d/README.md (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/values-ironbank.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/values-production.yaml (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/values.schema.json (100%) rename bitnami/mariadb/{mariadb 105 => mariadb105}/values.yaml (100%) diff --git a/bitnami/mariadb/mariadb 101/Chart.yaml b/bitnami/mariadb/mariadb101/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/Chart.yaml rename to bitnami/mariadb/mariadb101/Chart.yaml diff --git a/bitnami/mariadb/mariadb 101/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb 101/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb101/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb 101/README-original.md b/bitnami/mariadb/mariadb101/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb 101/README-original.md rename to bitnami/mariadb/mariadb101/README-original.md diff --git a/bitnami/mariadb/mariadb 101/README.md b/bitnami/mariadb/mariadb101/README.md similarity index 100% rename from bitnami/mariadb/mariadb 101/README.md rename to bitnami/mariadb/mariadb101/README.md diff --git a/bitnami/mariadb/mariadb 101/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb101/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb 101/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb 101/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb101/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb 101/templates/NOTES.txt b/bitnami/mariadb/mariadb101/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/NOTES.txt rename to bitnami/mariadb/mariadb101/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb 101/templates/_helpers.tpl b/bitnami/mariadb/mariadb101/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/_helpers.tpl rename to bitnami/mariadb/mariadb101/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb 101/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/master-configmap.yaml b/bitnami/mariadb/mariadb101/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb101/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/master-pdb.yaml b/bitnami/mariadb/mariadb101/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb101/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb101/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/master-svc.yaml b/bitnami/mariadb/mariadb101/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/master-svc.yaml rename to bitnami/mariadb/mariadb101/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/role.yaml b/bitnami/mariadb/mariadb101/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/role.yaml rename to bitnami/mariadb/mariadb101/templates/role.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/rolebinding.yaml b/bitnami/mariadb/mariadb101/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb101/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/secrets.yaml b/bitnami/mariadb/mariadb101/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/secrets.yaml rename to bitnami/mariadb/mariadb101/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb101/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb101/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb101/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb101/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/slave-svc.yaml b/bitnami/mariadb/mariadb101/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb101/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/test-runner.yaml b/bitnami/mariadb/mariadb101/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/test-runner.yaml rename to bitnami/mariadb/mariadb101/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb 101/templates/tests.yaml b/bitnami/mariadb/mariadb101/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/templates/tests.yaml rename to bitnami/mariadb/mariadb101/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb 101/values-ironbank.yaml b/bitnami/mariadb/mariadb101/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/values-ironbank.yaml rename to bitnami/mariadb/mariadb101/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb 101/values-production.yaml b/bitnami/mariadb/mariadb101/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/values-production.yaml rename to bitnami/mariadb/mariadb101/values-production.yaml diff --git a/bitnami/mariadb/mariadb 101/values.schema.json b/bitnami/mariadb/mariadb101/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb 101/values.schema.json rename to bitnami/mariadb/mariadb101/values.schema.json diff --git a/bitnami/mariadb/mariadb 101/values.yaml b/bitnami/mariadb/mariadb101/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb 101/values.yaml rename to bitnami/mariadb/mariadb101/values.yaml diff --git a/bitnami/mariadb/mariadb 102/Chart.yaml b/bitnami/mariadb/mariadb102/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/Chart.yaml rename to bitnami/mariadb/mariadb102/Chart.yaml diff --git a/bitnami/mariadb/mariadb 102/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb102/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb 102/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb102/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb 102/README-original.md b/bitnami/mariadb/mariadb102/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb 102/README-original.md rename to bitnami/mariadb/mariadb102/README-original.md diff --git a/bitnami/mariadb/mariadb 102/README.md b/bitnami/mariadb/mariadb102/README.md similarity index 100% rename from bitnami/mariadb/mariadb 102/README.md rename to bitnami/mariadb/mariadb102/README.md diff --git a/bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb 102/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb 102/templates/NOTES.txt b/bitnami/mariadb/mariadb102/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/NOTES.txt rename to bitnami/mariadb/mariadb102/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb 102/templates/_helpers.tpl b/bitnami/mariadb/mariadb102/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/_helpers.tpl rename to bitnami/mariadb/mariadb102/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/master-configmap.yaml b/bitnami/mariadb/mariadb102/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb102/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/master-pdb.yaml b/bitnami/mariadb/mariadb102/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb102/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb102/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/master-svc.yaml b/bitnami/mariadb/mariadb102/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/master-svc.yaml rename to bitnami/mariadb/mariadb102/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/role.yaml b/bitnami/mariadb/mariadb102/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/role.yaml rename to bitnami/mariadb/mariadb102/templates/role.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/rolebinding.yaml b/bitnami/mariadb/mariadb102/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb102/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/secrets.yaml b/bitnami/mariadb/mariadb102/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/secrets.yaml rename to bitnami/mariadb/mariadb102/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb102/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb102/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb102/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb102/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/slave-svc.yaml b/bitnami/mariadb/mariadb102/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb102/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/test-runner.yaml b/bitnami/mariadb/mariadb102/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/test-runner.yaml rename to bitnami/mariadb/mariadb102/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb 102/templates/tests.yaml b/bitnami/mariadb/mariadb102/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/templates/tests.yaml rename to bitnami/mariadb/mariadb102/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb 102/values-ironbank.yaml b/bitnami/mariadb/mariadb102/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/values-ironbank.yaml rename to bitnami/mariadb/mariadb102/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb 102/values-production.yaml b/bitnami/mariadb/mariadb102/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/values-production.yaml rename to bitnami/mariadb/mariadb102/values-production.yaml diff --git a/bitnami/mariadb/mariadb 102/values.schema.json b/bitnami/mariadb/mariadb102/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb 102/values.schema.json rename to bitnami/mariadb/mariadb102/values.schema.json diff --git a/bitnami/mariadb/mariadb 102/values.yaml b/bitnami/mariadb/mariadb102/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb 102/values.yaml rename to bitnami/mariadb/mariadb102/values.yaml diff --git a/bitnami/mariadb/mariadb 103/Chart.yaml b/bitnami/mariadb/mariadb103/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/Chart.yaml rename to bitnami/mariadb/mariadb103/Chart.yaml diff --git a/bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb 103/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb 103/README-original.md b/bitnami/mariadb/mariadb103/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb 103/README-original.md rename to bitnami/mariadb/mariadb103/README-original.md diff --git a/bitnami/mariadb/mariadb 103/README.md b/bitnami/mariadb/mariadb103/README.md similarity index 100% rename from bitnami/mariadb/mariadb 103/README.md rename to bitnami/mariadb/mariadb103/README.md diff --git a/bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb 103/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb 103/templates/NOTES.txt b/bitnami/mariadb/mariadb103/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/NOTES.txt rename to bitnami/mariadb/mariadb103/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb 103/templates/_helpers.tpl b/bitnami/mariadb/mariadb103/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/_helpers.tpl rename to bitnami/mariadb/mariadb103/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/master-configmap.yaml b/bitnami/mariadb/mariadb103/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb103/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/master-pdb.yaml b/bitnami/mariadb/mariadb103/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb103/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb103/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/master-svc.yaml b/bitnami/mariadb/mariadb103/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/master-svc.yaml rename to bitnami/mariadb/mariadb103/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/role.yaml b/bitnami/mariadb/mariadb103/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/role.yaml rename to bitnami/mariadb/mariadb103/templates/role.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/rolebinding.yaml b/bitnami/mariadb/mariadb103/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb103/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/secrets.yaml b/bitnami/mariadb/mariadb103/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/secrets.yaml rename to bitnami/mariadb/mariadb103/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb103/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb103/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb103/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb103/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/slave-svc.yaml b/bitnami/mariadb/mariadb103/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb103/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/test-runner.yaml b/bitnami/mariadb/mariadb103/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/test-runner.yaml rename to bitnami/mariadb/mariadb103/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb 103/templates/tests.yaml b/bitnami/mariadb/mariadb103/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/templates/tests.yaml rename to bitnami/mariadb/mariadb103/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb 103/values-ironbank.yaml b/bitnami/mariadb/mariadb103/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/values-ironbank.yaml rename to bitnami/mariadb/mariadb103/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb 103/values-production.yaml b/bitnami/mariadb/mariadb103/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/values-production.yaml rename to bitnami/mariadb/mariadb103/values-production.yaml diff --git a/bitnami/mariadb/mariadb 103/values.schema.json b/bitnami/mariadb/mariadb103/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb 103/values.schema.json rename to bitnami/mariadb/mariadb103/values.schema.json diff --git a/bitnami/mariadb/mariadb 103/values.yaml b/bitnami/mariadb/mariadb103/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb 103/values.yaml rename to bitnami/mariadb/mariadb103/values.yaml diff --git a/bitnami/mariadb/mariadb 104/Chart.yaml b/bitnami/mariadb/mariadb104/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/Chart.yaml rename to bitnami/mariadb/mariadb104/Chart.yaml diff --git a/bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb 104/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb 104/README-original.md b/bitnami/mariadb/mariadb104/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb 104/README-original.md rename to bitnami/mariadb/mariadb104/README-original.md diff --git a/bitnami/mariadb/mariadb 104/README.md b/bitnami/mariadb/mariadb104/README.md similarity index 100% rename from bitnami/mariadb/mariadb 104/README.md rename to bitnami/mariadb/mariadb104/README.md diff --git a/bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb 104/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb 104/templates/NOTES.txt b/bitnami/mariadb/mariadb104/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/NOTES.txt rename to bitnami/mariadb/mariadb104/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb 104/templates/_helpers.tpl b/bitnami/mariadb/mariadb104/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/_helpers.tpl rename to bitnami/mariadb/mariadb104/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/master-configmap.yaml b/bitnami/mariadb/mariadb104/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb104/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/master-pdb.yaml b/bitnami/mariadb/mariadb104/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb104/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb104/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/master-svc.yaml b/bitnami/mariadb/mariadb104/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/master-svc.yaml rename to bitnami/mariadb/mariadb104/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/role.yaml b/bitnami/mariadb/mariadb104/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/role.yaml rename to bitnami/mariadb/mariadb104/templates/role.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/rolebinding.yaml b/bitnami/mariadb/mariadb104/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb104/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/secrets.yaml b/bitnami/mariadb/mariadb104/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/secrets.yaml rename to bitnami/mariadb/mariadb104/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb104/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb104/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb104/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb104/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/slave-svc.yaml b/bitnami/mariadb/mariadb104/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb104/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/test-runner.yaml b/bitnami/mariadb/mariadb104/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/test-runner.yaml rename to bitnami/mariadb/mariadb104/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb 104/templates/tests.yaml b/bitnami/mariadb/mariadb104/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/templates/tests.yaml rename to bitnami/mariadb/mariadb104/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb 104/values-ironbank.yaml b/bitnami/mariadb/mariadb104/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/values-ironbank.yaml rename to bitnami/mariadb/mariadb104/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb 104/values-production.yaml b/bitnami/mariadb/mariadb104/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/values-production.yaml rename to bitnami/mariadb/mariadb104/values-production.yaml diff --git a/bitnami/mariadb/mariadb 104/values.schema.json b/bitnami/mariadb/mariadb104/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb 104/values.schema.json rename to bitnami/mariadb/mariadb104/values.schema.json diff --git a/bitnami/mariadb/mariadb 104/values.yaml b/bitnami/mariadb/mariadb104/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb 104/values.yaml rename to bitnami/mariadb/mariadb104/values.yaml diff --git a/bitnami/mariadb/mariadb 105/Chart.yaml b/bitnami/mariadb/mariadb105/Chart.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/Chart.yaml rename to bitnami/mariadb/mariadb105/Chart.yaml diff --git a/bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl similarity index 100% rename from bitnami/mariadb/mariadb 105/IRONBANK.md.gotmpl rename to bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl diff --git a/bitnami/mariadb/mariadb 105/README-original.md b/bitnami/mariadb/mariadb105/README-original.md similarity index 100% rename from bitnami/mariadb/mariadb 105/README-original.md rename to bitnami/mariadb/mariadb105/README-original.md diff --git a/bitnami/mariadb/mariadb 105/README.md b/bitnami/mariadb/mariadb105/README.md similarity index 100% rename from bitnami/mariadb/mariadb 105/README.md rename to bitnami/mariadb/mariadb105/README.md diff --git a/bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/ci/values-production-with-rbac.yaml rename to bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml diff --git a/bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md similarity index 100% rename from bitnami/mariadb/mariadb 105/files/docker-entrypoint-initdb.d/README.md rename to bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md diff --git a/bitnami/mariadb/mariadb 105/templates/NOTES.txt b/bitnami/mariadb/mariadb105/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/NOTES.txt rename to bitnami/mariadb/mariadb105/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb 105/templates/_helpers.tpl b/bitnami/mariadb/mariadb105/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/_helpers.tpl rename to bitnami/mariadb/mariadb105/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/initialization-configmap.yaml rename to bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/master-configmap.yaml b/bitnami/mariadb/mariadb105/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/master-configmap.yaml rename to bitnami/mariadb/mariadb105/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/master-pdb.yaml b/bitnami/mariadb/mariadb105/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/master-pdb.yaml rename to bitnami/mariadb/mariadb105/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/master-statefulset.yaml rename to bitnami/mariadb/mariadb105/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/master-svc.yaml b/bitnami/mariadb/mariadb105/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/master-svc.yaml rename to bitnami/mariadb/mariadb105/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/role.yaml b/bitnami/mariadb/mariadb105/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/role.yaml rename to bitnami/mariadb/mariadb105/templates/role.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/rolebinding.yaml b/bitnami/mariadb/mariadb105/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/rolebinding.yaml rename to bitnami/mariadb/mariadb105/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/secrets.yaml b/bitnami/mariadb/mariadb105/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/secrets.yaml rename to bitnami/mariadb/mariadb105/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/serviceaccount.yaml rename to bitnami/mariadb/mariadb105/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/servicemonitor.yaml rename to bitnami/mariadb/mariadb105/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/slave-configmap.yaml rename to bitnami/mariadb/mariadb105/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/slave-pdb.yaml rename to bitnami/mariadb/mariadb105/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/slave-statefulset.yaml rename to bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/slave-svc.yaml b/bitnami/mariadb/mariadb105/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/slave-svc.yaml rename to bitnami/mariadb/mariadb105/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/test-runner.yaml b/bitnami/mariadb/mariadb105/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/test-runner.yaml rename to bitnami/mariadb/mariadb105/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb 105/templates/tests.yaml b/bitnami/mariadb/mariadb105/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/templates/tests.yaml rename to bitnami/mariadb/mariadb105/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb 105/values-ironbank.yaml b/bitnami/mariadb/mariadb105/values-ironbank.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/values-ironbank.yaml rename to bitnami/mariadb/mariadb105/values-ironbank.yaml diff --git a/bitnami/mariadb/mariadb 105/values-production.yaml b/bitnami/mariadb/mariadb105/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/values-production.yaml rename to bitnami/mariadb/mariadb105/values-production.yaml diff --git a/bitnami/mariadb/mariadb 105/values.schema.json b/bitnami/mariadb/mariadb105/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb 105/values.schema.json rename to bitnami/mariadb/mariadb105/values.schema.json diff --git a/bitnami/mariadb/mariadb 105/values.yaml b/bitnami/mariadb/mariadb105/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb 105/values.yaml rename to bitnami/mariadb/mariadb105/values.yaml -- GitLab From f8ec3235881f5a1650c939912fe9f92d58794623 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 13:22:21 -0600 Subject: [PATCH 27/31] Generalized mariadb versions --- .DS_Store | Bin 0 -> 6148 bytes bitnami/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/.DS_Store | Bin 0 -> 6148 bytes bitnami/mariadb/{mariadb101 => }/Chart.yaml | 0 .../{mariadb101 => }/IRONBANK.md.gotmpl | 0 .../{mariadb101 => }/README-original.md | 0 bitnami/mariadb/{mariadb101 => }/README.md | 4 + .../ci/values-production-with-rbac.yaml | 0 .../docker-entrypoint-initdb.d/README.md | 0 .../mariadb/mariadb101/values-ironbank.yaml | 70 --- bitnami/mariadb/mariadb102/Chart.yaml | 22 - bitnami/mariadb/mariadb102/IRONBANK.md.gotmpl | 23 - bitnami/mariadb/mariadb102/README-original.md | 342 ---------- bitnami/mariadb/mariadb102/README.md | 148 ----- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb102/templates/NOTES.txt | 49 -- .../mariadb/mariadb102/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb102/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb102/templates/master-svc.yaml | 47 -- .../mariadb/mariadb102/templates/role.yaml | 19 - .../mariadb102/templates/rolebinding.yaml | 19 - .../mariadb/mariadb102/templates/secrets.yaml | 39 -- .../mariadb102/templates/serviceaccount.yaml | 12 - .../mariadb102/templates/servicemonitor.yaml | 35 -- .../mariadb102/templates/slave-configmap.yaml | 16 - .../mariadb102/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb102/templates/slave-svc.yaml | 49 -- .../mariadb102/templates/test-runner.yaml | 53 -- .../mariadb/mariadb102/templates/tests.yaml | 12 - .../mariadb/mariadb102/values-ironbank.yaml | 70 --- .../mariadb/mariadb102/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb102/values.schema.json | 169 ----- bitnami/mariadb/mariadb102/values.yaml | 583 ----------------- bitnami/mariadb/mariadb103/Chart.yaml | 22 - bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl | 23 - bitnami/mariadb/mariadb103/README-original.md | 342 ---------- bitnami/mariadb/mariadb103/README.md | 148 ----- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb103/templates/NOTES.txt | 49 -- .../mariadb/mariadb103/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb103/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb103/templates/master-svc.yaml | 47 -- .../mariadb/mariadb103/templates/role.yaml | 19 - .../mariadb103/templates/rolebinding.yaml | 19 - .../mariadb/mariadb103/templates/secrets.yaml | 39 -- .../mariadb103/templates/serviceaccount.yaml | 12 - .../mariadb103/templates/servicemonitor.yaml | 35 -- .../mariadb103/templates/slave-configmap.yaml | 16 - .../mariadb103/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb103/templates/slave-svc.yaml | 49 -- .../mariadb103/templates/test-runner.yaml | 53 -- .../mariadb/mariadb103/templates/tests.yaml | 12 - .../mariadb/mariadb103/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb103/values.schema.json | 169 ----- bitnami/mariadb/mariadb103/values.yaml | 583 ----------------- bitnami/mariadb/mariadb104/Chart.yaml | 22 - bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl | 23 - bitnami/mariadb/mariadb104/README-original.md | 342 ---------- bitnami/mariadb/mariadb104/README.md | 148 ----- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb104/templates/NOTES.txt | 49 -- .../mariadb/mariadb104/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb104/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb104/templates/master-svc.yaml | 47 -- .../mariadb/mariadb104/templates/role.yaml | 19 - .../mariadb104/templates/rolebinding.yaml | 19 - .../mariadb/mariadb104/templates/secrets.yaml | 39 -- .../mariadb104/templates/serviceaccount.yaml | 12 - .../mariadb104/templates/servicemonitor.yaml | 35 -- .../mariadb104/templates/slave-configmap.yaml | 16 - .../mariadb104/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb104/templates/slave-svc.yaml | 49 -- .../mariadb104/templates/test-runner.yaml | 53 -- .../mariadb/mariadb104/templates/tests.yaml | 12 - .../mariadb/mariadb104/values-ironbank.yaml | 70 --- .../mariadb/mariadb104/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb104/values.schema.json | 169 ----- bitnami/mariadb/mariadb104/values.yaml | 583 ----------------- bitnami/mariadb/mariadb105/Chart.yaml | 22 - bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl | 23 - bitnami/mariadb/mariadb105/README-original.md | 342 ---------- bitnami/mariadb/mariadb105/README.md | 148 ----- .../ci/values-production-with-rbac.yaml | 31 - .../docker-entrypoint-initdb.d/README.md | 3 - .../mariadb/mariadb105/templates/NOTES.txt | 49 -- .../mariadb/mariadb105/templates/_helpers.tpl | 298 --------- .../templates/initialization-configmap.yaml | 27 - .../templates/master-configmap.yaml | 16 - .../mariadb105/templates/master-pdb.yaml | 25 - .../templates/master-statefulset.yaml | 344 ---------- .../mariadb105/templates/master-svc.yaml | 47 -- .../mariadb/mariadb105/templates/role.yaml | 19 - .../mariadb105/templates/rolebinding.yaml | 19 - .../mariadb/mariadb105/templates/secrets.yaml | 39 -- .../mariadb105/templates/serviceaccount.yaml | 12 - .../mariadb105/templates/servicemonitor.yaml | 35 -- .../mariadb105/templates/slave-configmap.yaml | 16 - .../mariadb105/templates/slave-pdb.yaml | 27 - .../templates/slave-statefulset.yaml | 316 ---------- .../mariadb105/templates/slave-svc.yaml | 49 -- .../mariadb105/templates/test-runner.yaml | 53 -- .../mariadb/mariadb105/templates/tests.yaml | 12 - .../mariadb/mariadb105/values-ironbank.yaml | 70 --- .../mariadb/mariadb105/values-production.yaml | 595 ------------------ bitnami/mariadb/mariadb105/values.schema.json | 169 ----- bitnami/mariadb/mariadb105/values.yaml | 583 ----------------- .../{mariadb101 => }/templates/NOTES.txt | 0 .../{mariadb101 => }/templates/_helpers.tpl | 0 .../templates/initialization-configmap.yaml | 0 .../templates/master-configmap.yaml | 0 .../templates/master-pdb.yaml | 0 .../templates/master-statefulset.yaml | 0 .../templates/master-svc.yaml | 0 .../{mariadb101 => }/templates/role.yaml | 0 .../templates/rolebinding.yaml | 0 .../{mariadb101 => }/templates/secrets.yaml | 0 .../templates/serviceaccount.yaml | 0 .../templates/servicemonitor.yaml | 0 .../templates/slave-configmap.yaml | 0 .../{mariadb101 => }/templates/slave-pdb.yaml | 0 .../templates/slave-statefulset.yaml | 0 .../{mariadb101 => }/templates/slave-svc.yaml | 0 .../templates/test-runner.yaml | 0 .../{mariadb101 => }/templates/tests.yaml | 0 .../{mariadb103 => }/values-ironbank.yaml | 2 +- .../{mariadb101 => }/values-production.yaml | 0 .../{mariadb101 => }/values.schema.json | 0 bitnami/mariadb/{mariadb101 => }/values.yaml | 0 143 files changed, 5 insertions(+), 13557 deletions(-) create mode 100644 .DS_Store create mode 100644 bitnami/.DS_Store create mode 100644 bitnami/mariadb/.DS_Store rename bitnami/mariadb/{mariadb101 => }/Chart.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/IRONBANK.md.gotmpl (100%) rename bitnami/mariadb/{mariadb101 => }/README-original.md (100%) rename bitnami/mariadb/{mariadb101 => }/README.md (96%) rename bitnami/mariadb/{mariadb101 => }/ci/values-production-with-rbac.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/files/docker-entrypoint-initdb.d/README.md (100%) delete mode 100644 bitnami/mariadb/mariadb101/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb102/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb102/IRONBANK.md.gotmpl delete mode 100644 bitnami/mariadb/mariadb102/README-original.md delete mode 100644 bitnami/mariadb/mariadb102/README.md delete mode 100644 bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb102/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb102/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb102/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb102/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb102/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb102/values.schema.json delete mode 100644 bitnami/mariadb/mariadb102/values.yaml delete mode 100644 bitnami/mariadb/mariadb103/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl delete mode 100644 bitnami/mariadb/mariadb103/README-original.md delete mode 100644 bitnami/mariadb/mariadb103/README.md delete mode 100644 bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb103/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb103/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb103/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb103/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb103/values.schema.json delete mode 100644 bitnami/mariadb/mariadb103/values.yaml delete mode 100644 bitnami/mariadb/mariadb104/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl delete mode 100644 bitnami/mariadb/mariadb104/README-original.md delete mode 100644 bitnami/mariadb/mariadb104/README.md delete mode 100644 bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb104/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb104/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb104/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb104/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb104/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb104/values.schema.json delete mode 100644 bitnami/mariadb/mariadb104/values.yaml delete mode 100644 bitnami/mariadb/mariadb105/Chart.yaml delete mode 100644 bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl delete mode 100644 bitnami/mariadb/mariadb105/README-original.md delete mode 100644 bitnami/mariadb/mariadb105/README.md delete mode 100644 bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml delete mode 100644 bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md delete mode 100644 bitnami/mariadb/mariadb105/templates/NOTES.txt delete mode 100644 bitnami/mariadb/mariadb105/templates/_helpers.tpl delete mode 100644 bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/master-svc.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/role.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/rolebinding.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/secrets.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/serviceaccount.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/servicemonitor.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-configmap.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-pdb.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/slave-svc.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/test-runner.yaml delete mode 100644 bitnami/mariadb/mariadb105/templates/tests.yaml delete mode 100644 bitnami/mariadb/mariadb105/values-ironbank.yaml delete mode 100644 bitnami/mariadb/mariadb105/values-production.yaml delete mode 100644 bitnami/mariadb/mariadb105/values.schema.json delete mode 100644 bitnami/mariadb/mariadb105/values.yaml rename bitnami/mariadb/{mariadb101 => }/templates/NOTES.txt (100%) rename bitnami/mariadb/{mariadb101 => }/templates/_helpers.tpl (100%) rename bitnami/mariadb/{mariadb101 => }/templates/initialization-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/master-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/master-pdb.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/master-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/master-svc.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/role.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/rolebinding.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/secrets.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/serviceaccount.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/servicemonitor.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/slave-configmap.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/slave-pdb.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/slave-statefulset.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/slave-svc.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/test-runner.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/templates/tests.yaml (100%) rename bitnami/mariadb/{mariadb103 => }/values-ironbank.yaml (98%) rename bitnami/mariadb/{mariadb101 => }/values-production.yaml (100%) rename bitnami/mariadb/{mariadb101 => }/values.schema.json (100%) rename bitnami/mariadb/{mariadb101 => }/values.yaml (100%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..cdee7dd1e6172a05cdb2e9d349e30fa6b566bc72 GIT binary patch literal 6148 zcmeHK!EO^V5FNK6b%GE%AhkzdkT^srC50Xk(l(@r9*_`=-~g!IWh1iEc3tgmh)M|B z-+({hQ}_Zt2j18QH3{X=145BU8o#k;#w$PXj@Lva29so$s6#{&%GhY5`Gc^ZbwxJZ z2s?$DBcfAEk23u>&Q_xRfM>un@V_y@-|iO0lu|`GUHE==3=fxuhtNAejKErnj;G~W zoSEov@mZFZRj>D5Y-~2JHMgW}%l3`-n{ceBVHH)Aau5}-xc4-w#<8=XYn}bJqxeNS znjUv@rTM5Z$!Rh|$m^GBp6Ka7Px7QR^MuwRWlOe>J3F&kzkk20`g`~0T{YX^ z?{(E)|G|9TlH0d;A03^Xo`0BqoPYXk7D56=%g9ZKzu*guB~sppMV{&W9Xy=Xq%p`U zK%Az+7Q9OdYtb`0qyrk#6X0Ex$Yd$wD`vb%ag$1HM}*lk8ZE|(?Z3sY>t-wvva}W8 z!^@QzaIe3-ex+=m?-L;eiO7 z3bd)hT``1B$GCEFfy3IOO()?lAHqFZxEqQvPsjYqgp&v?`qnex8CYas({?+2{vTd` z|6feo+QM>~+0-s_77&xpg SVg%xU1Pl$n@eKS^27UsZ literal 0 HcmV?d00001 diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7ac0805f404699f5ac7a5599b6f34a8540691f6f GIT binary patch literal 6148 zcmeHK%}T>S5T317w-vDmL63V8JoHelKL-&))q^)7q6ZaCOwmBhN}F1=R`MG9Mm~X$ zqcgkPf>w`;$_&hWli8U~_Dk5!0Dx$8q9uR|07z8ALJ7?$LgS<(QgD$mL}BI#AcAl= z(dS_@lFfnN$N;^&Nw|UlS`echzCRt}2z?eCsEe;g&>P7PyY1^RG1<@IbrQF;TJ1#? z#){(;lTwytdAfY!U+S)(1zD%v2wF#UwHIWUq4W2(PKJIE9>mS=X=Qdxr&$oE&6X*S zqb8;tAI52C~V`e~#Z<p{>BKBd}z=C~+FKA(b!v z2>1g&g)iub^aI+N-6>K+P!R`IMLW{$o86hW);`(0UH}lCVbTJq0f0m&ta#YWG0KzQ zvn3u`MHFU^2oi{)1x<8kP64OD|E>UiyB?fF1bs-cz59L-GyOTvbc}i09Cp#){5FQs z1Dtp?xM0q0e37MtqS^c@mX<3oR#v6-r1#SM6rSl(SVYBe(24pVsCN_KvZ zHQw22HdNc+o=mE8<8^EA@Z|jKxAEoV`;}P^2;9Jotuy|GYYgTJ^d;=)na)o!PuzJm zn=>NbVBNn&^rtyu;}M+p4CluqI9oHEUo#x+I$LZ7_?4Gyi@i*@I;VhB;0X%Q{-Dqa z1IE&#**dT>R{+Ec4jaRmeiw+N7z4)AB4*Hpr6O9Y;46l(bR1V)7ciC-Dm{vSMi|DPtgo>Ranuuuw!N;m9wa7lc&-dh}< uwF> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb102/README.md b/bitnami/mariadb/mariadb102/README.md deleted file mode 100644 index d57836a..0000000 --- a/bitnami/mariadb/mariadb102/README.md +++ /dev/null @@ -1,148 +0,0 @@ -mariadb -======= -Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. - -Version: 7.6.1 - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| db.forcePassword | bool | `false` | | -| db.injectSecretsAsVolume | bool | `false` | | -| db.name | string | `"my_database"` | | -| db.password | string | `""` | | -| db.user | string | `""` | | -| image.debug | bool | `false` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"docker.io"` | | -| image.repository | string | `"bitnami/mariadb"` | | -| image.tag | string | `"10.3.23-debian-10-r44"` | | -| master.affinity | object | `{}` | | -| master.antiAffinity | string | `"soft"` | | -| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| master.extraEnvVars | string | `nil` | | -| master.extraEnvVarsCM | string | `nil` | | -| master.extraEnvVarsSecret | string | `nil` | | -| master.extraInitContainers | list | `[]` | | -| master.livenessProbe.enabled | bool | `true` | | -| master.livenessProbe.failureThreshold | int | `3` | | -| master.livenessProbe.initialDelaySeconds | int | `120` | | -| master.livenessProbe.periodSeconds | int | `10` | | -| master.livenessProbe.successThreshold | int | `1` | | -| master.livenessProbe.timeoutSeconds | int | `1` | | -| master.nodeSelector | object | `{}` | | -| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| master.persistence.annotations | object | `{}` | | -| master.persistence.enabled | bool | `true` | | -| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | -| master.persistence.size | string | `"8Gi"` | | -| master.podDisruptionBudget.enabled | bool | `false` | | -| master.podDisruptionBudget.minAvailable | int | `1` | | -| master.readinessProbe.enabled | bool | `true` | | -| master.readinessProbe.failureThreshold | int | `3` | | -| master.readinessProbe.initialDelaySeconds | int | `30` | | -| master.readinessProbe.periodSeconds | int | `10` | | -| master.readinessProbe.successThreshold | int | `1` | | -| master.readinessProbe.timeoutSeconds | int | `1` | | -| master.resources | object | `{}` | | -| master.service.annotations | object | `{}` | | -| master.tolerations | list | `[]` | | -| master.updateStrategy.type | string | `"RollingUpdate"` | | -| metrics.annotations."prometheus.io/port" | string | `"9104"` | | -| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | -| metrics.enabled | bool | `false` | | -| metrics.extraArgs.master | list | `[]` | | -| metrics.extraArgs.slave | list | `[]` | | -| metrics.image.pullPolicy | string | `"IfNotPresent"` | | -| metrics.image.registry | string | `"docker.io"` | | -| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | -| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | -| metrics.livenessProbe.enabled | bool | `true` | | -| metrics.livenessProbe.failureThreshold | int | `3` | | -| metrics.livenessProbe.initialDelaySeconds | int | `120` | | -| metrics.livenessProbe.periodSeconds | int | `10` | | -| metrics.livenessProbe.successThreshold | int | `1` | | -| metrics.livenessProbe.timeoutSeconds | int | `1` | | -| metrics.readinessProbe.enabled | bool | `true` | | -| metrics.readinessProbe.failureThreshold | int | `3` | | -| metrics.readinessProbe.initialDelaySeconds | int | `30` | | -| metrics.readinessProbe.periodSeconds | int | `10` | | -| metrics.readinessProbe.successThreshold | int | `1` | | -| metrics.readinessProbe.timeoutSeconds | int | `1` | | -| metrics.resources | object | `{}` | | -| metrics.serviceMonitor.enabled | bool | `false` | | -| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | -| rbac.create | bool | `false` | | -| replication.enabled | bool | `true` | | -| replication.forcePassword | bool | `false` | | -| replication.injectSecretsAsVolume | bool | `false` | | -| replication.password | string | `""` | | -| replication.user | string | `"replicator"` | | -| rootUser.forcePassword | bool | `false` | | -| rootUser.injectSecretsAsVolume | bool | `false` | | -| rootUser.password | string | `""` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1001` | | -| securityContext.runAsUser | int | `1001` | | -| service.port | int | `3306` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `false` | | -| slave.affinity | object | `{}` | | -| slave.antiAffinity | string | `"soft"` | | -| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| slave.extraEnvVars | string | `nil` | | -| slave.extraEnvVarsCM | string | `nil` | | -| slave.extraEnvVarsSecret | string | `nil` | | -| slave.extraInitContainers | string | `nil` | | -| slave.livenessProbe.enabled | bool | `true` | | -| slave.livenessProbe.failureThreshold | int | `3` | | -| slave.livenessProbe.initialDelaySeconds | int | `120` | | -| slave.livenessProbe.periodSeconds | int | `10` | | -| slave.livenessProbe.successThreshold | int | `1` | | -| slave.livenessProbe.timeoutSeconds | int | `1` | | -| slave.nodeSelector | object | `{}` | | -| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| slave.persistence.annotations | string | `nil` | | -| slave.persistence.enabled | bool | `true` | | -| slave.persistence.size | string | `"8Gi"` | | -| slave.podDisruptionBudget.enabled | bool | `false` | | -| slave.podDisruptionBudget.minAvailable | int | `1` | | -| slave.readinessProbe.enabled | bool | `true` | | -| slave.readinessProbe.failureThreshold | int | `3` | | -| slave.readinessProbe.initialDelaySeconds | int | `45` | | -| slave.readinessProbe.periodSeconds | int | `10` | | -| slave.readinessProbe.successThreshold | int | `1` | | -| slave.readinessProbe.timeoutSeconds | int | `1` | | -| slave.replicas | int | `1` | | -| slave.resources | object | `{}` | | -| slave.service.annotations | object | `{}` | | -| slave.tolerations | list | `[]` | | -| slave.updateStrategy.type | string | `"RollingUpdate"` | | -| tests.enabled | bool | `true` | | -| tests.resources | object | `{}` | | -| tests.testFramework.image.registry | string | `"docker.io"` | | -| tests.testFramework.image.repository | string | `"dduportal/bats"` | | -| tests.testFramework.image.tag | string | `"0.4.0"` | | -| tests.testFramework.resources | object | `{}` | | -| volumePermissions.enabled | bool | `false` | | -| volumePermissions.image.pullPolicy | string | `"Always"` | | -| volumePermissions.image.registry | string | `"docker.io"` | | -| volumePermissions.image.repository | string | `"bitnami/minideb"` | | -| volumePermissions.image.tag | string | `"buster"` | | -| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb102/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb102/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb102/templates/NOTES.txt b/bitnami/mariadb/mariadb102/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb102/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/_helpers.tpl b/bitnami/mariadb/mariadb102/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb102/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb102/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-configmap.yaml b/bitnami/mariadb/mariadb102/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb102/templates/master-pdb.yaml b/bitnami/mariadb/mariadb102/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/master-svc.yaml b/bitnami/mariadb/mariadb102/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb102/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb102/templates/role.yaml b/bitnami/mariadb/mariadb102/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb102/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/rolebinding.yaml b/bitnami/mariadb/mariadb102/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb102/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/secrets.yaml b/bitnami/mariadb/mariadb102/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb102/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb102/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb102/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/slave-svc.yaml b/bitnami/mariadb/mariadb102/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb102/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/test-runner.yaml b/bitnami/mariadb/mariadb102/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb102/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb102/templates/tests.yaml b/bitnami/mariadb/mariadb102/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb102/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb102/values-ironbank.yaml b/bitnami/mariadb/mariadb102/values-ironbank.yaml deleted file mode 100644 index 5e22f85..0000000 --- a/bitnami/mariadb/mariadb102/values-ironbank.yaml +++ /dev/null @@ -1,70 +0,0 @@ -image: - repository: registry1.dsop.io/opensource/mariadb - tag: 10.2.32 - pullPolicy: IfNotPresent - debug: false - -volumePermissions: - enabled: false - image: - repository: registry1.dsop.io/redhat/ubi/ubi8 - tag: 8.2 - pullPolicy: Always - -master: - - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - log-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - -slave: - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - local-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - \ No newline at end of file diff --git a/bitnami/mariadb/mariadb102/values-production.yaml b/bitnami/mariadb/mariadb102/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb102/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb102/values.schema.json b/bitnami/mariadb/mariadb102/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb102/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb102/values.yaml b/bitnami/mariadb/mariadb102/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb102/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb103/Chart.yaml b/bitnami/mariadb/mariadb103/Chart.yaml deleted file mode 100644 index e8a6bd8..0000000 --- a/bitnami/mariadb/mariadb103/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -name: mariadb -version: 7.6.1 -appVersion: 10.3.23 -description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. -keywords: - - mariadb - - mysql - - database - - sql - - prometheus -home: https://mariadb.org -icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png -sources: - - https://github.com/bitnami/bitnami-docker-mariadb - - https://github.com/prometheus/mysqld_exporter -maintainers: - - name: Bitnami - email: containers@bitnami.com -engine: gotpl -annotations: - category: Database diff --git a/bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl deleted file mode 100644 index dd7ffed..0000000 --- a/bitnami/mariadb/mariadb103/IRONBANK.md.gotmpl +++ /dev/null @@ -1,23 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.description" . }} - -Version: {{ template "chart.version" . }} - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb103/README-original.md b/bitnami/mariadb/mariadb103/README-original.md deleted file mode 100644 index 80640c2..0000000 --- a/bitnami/mariadb/mariadb103/README-original.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR; - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb103/README.md b/bitnami/mariadb/mariadb103/README.md deleted file mode 100644 index d57836a..0000000 --- a/bitnami/mariadb/mariadb103/README.md +++ /dev/null @@ -1,148 +0,0 @@ -mariadb -======= -Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. - -Version: 7.6.1 - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| db.forcePassword | bool | `false` | | -| db.injectSecretsAsVolume | bool | `false` | | -| db.name | string | `"my_database"` | | -| db.password | string | `""` | | -| db.user | string | `""` | | -| image.debug | bool | `false` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"docker.io"` | | -| image.repository | string | `"bitnami/mariadb"` | | -| image.tag | string | `"10.3.23-debian-10-r44"` | | -| master.affinity | object | `{}` | | -| master.antiAffinity | string | `"soft"` | | -| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| master.extraEnvVars | string | `nil` | | -| master.extraEnvVarsCM | string | `nil` | | -| master.extraEnvVarsSecret | string | `nil` | | -| master.extraInitContainers | list | `[]` | | -| master.livenessProbe.enabled | bool | `true` | | -| master.livenessProbe.failureThreshold | int | `3` | | -| master.livenessProbe.initialDelaySeconds | int | `120` | | -| master.livenessProbe.periodSeconds | int | `10` | | -| master.livenessProbe.successThreshold | int | `1` | | -| master.livenessProbe.timeoutSeconds | int | `1` | | -| master.nodeSelector | object | `{}` | | -| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| master.persistence.annotations | object | `{}` | | -| master.persistence.enabled | bool | `true` | | -| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | -| master.persistence.size | string | `"8Gi"` | | -| master.podDisruptionBudget.enabled | bool | `false` | | -| master.podDisruptionBudget.minAvailable | int | `1` | | -| master.readinessProbe.enabled | bool | `true` | | -| master.readinessProbe.failureThreshold | int | `3` | | -| master.readinessProbe.initialDelaySeconds | int | `30` | | -| master.readinessProbe.periodSeconds | int | `10` | | -| master.readinessProbe.successThreshold | int | `1` | | -| master.readinessProbe.timeoutSeconds | int | `1` | | -| master.resources | object | `{}` | | -| master.service.annotations | object | `{}` | | -| master.tolerations | list | `[]` | | -| master.updateStrategy.type | string | `"RollingUpdate"` | | -| metrics.annotations."prometheus.io/port" | string | `"9104"` | | -| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | -| metrics.enabled | bool | `false` | | -| metrics.extraArgs.master | list | `[]` | | -| metrics.extraArgs.slave | list | `[]` | | -| metrics.image.pullPolicy | string | `"IfNotPresent"` | | -| metrics.image.registry | string | `"docker.io"` | | -| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | -| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | -| metrics.livenessProbe.enabled | bool | `true` | | -| metrics.livenessProbe.failureThreshold | int | `3` | | -| metrics.livenessProbe.initialDelaySeconds | int | `120` | | -| metrics.livenessProbe.periodSeconds | int | `10` | | -| metrics.livenessProbe.successThreshold | int | `1` | | -| metrics.livenessProbe.timeoutSeconds | int | `1` | | -| metrics.readinessProbe.enabled | bool | `true` | | -| metrics.readinessProbe.failureThreshold | int | `3` | | -| metrics.readinessProbe.initialDelaySeconds | int | `30` | | -| metrics.readinessProbe.periodSeconds | int | `10` | | -| metrics.readinessProbe.successThreshold | int | `1` | | -| metrics.readinessProbe.timeoutSeconds | int | `1` | | -| metrics.resources | object | `{}` | | -| metrics.serviceMonitor.enabled | bool | `false` | | -| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | -| rbac.create | bool | `false` | | -| replication.enabled | bool | `true` | | -| replication.forcePassword | bool | `false` | | -| replication.injectSecretsAsVolume | bool | `false` | | -| replication.password | string | `""` | | -| replication.user | string | `"replicator"` | | -| rootUser.forcePassword | bool | `false` | | -| rootUser.injectSecretsAsVolume | bool | `false` | | -| rootUser.password | string | `""` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1001` | | -| securityContext.runAsUser | int | `1001` | | -| service.port | int | `3306` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `false` | | -| slave.affinity | object | `{}` | | -| slave.antiAffinity | string | `"soft"` | | -| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| slave.extraEnvVars | string | `nil` | | -| slave.extraEnvVarsCM | string | `nil` | | -| slave.extraEnvVarsSecret | string | `nil` | | -| slave.extraInitContainers | string | `nil` | | -| slave.livenessProbe.enabled | bool | `true` | | -| slave.livenessProbe.failureThreshold | int | `3` | | -| slave.livenessProbe.initialDelaySeconds | int | `120` | | -| slave.livenessProbe.periodSeconds | int | `10` | | -| slave.livenessProbe.successThreshold | int | `1` | | -| slave.livenessProbe.timeoutSeconds | int | `1` | | -| slave.nodeSelector | object | `{}` | | -| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| slave.persistence.annotations | string | `nil` | | -| slave.persistence.enabled | bool | `true` | | -| slave.persistence.size | string | `"8Gi"` | | -| slave.podDisruptionBudget.enabled | bool | `false` | | -| slave.podDisruptionBudget.minAvailable | int | `1` | | -| slave.readinessProbe.enabled | bool | `true` | | -| slave.readinessProbe.failureThreshold | int | `3` | | -| slave.readinessProbe.initialDelaySeconds | int | `45` | | -| slave.readinessProbe.periodSeconds | int | `10` | | -| slave.readinessProbe.successThreshold | int | `1` | | -| slave.readinessProbe.timeoutSeconds | int | `1` | | -| slave.replicas | int | `1` | | -| slave.resources | object | `{}` | | -| slave.service.annotations | object | `{}` | | -| slave.tolerations | list | `[]` | | -| slave.updateStrategy.type | string | `"RollingUpdate"` | | -| tests.enabled | bool | `true` | | -| tests.resources | object | `{}` | | -| tests.testFramework.image.registry | string | `"docker.io"` | | -| tests.testFramework.image.repository | string | `"dduportal/bats"` | | -| tests.testFramework.image.tag | string | `"0.4.0"` | | -| tests.testFramework.resources | object | `{}` | | -| volumePermissions.enabled | bool | `false` | | -| volumePermissions.image.pullPolicy | string | `"Always"` | | -| volumePermissions.image.registry | string | `"docker.io"` | | -| volumePermissions.image.repository | string | `"bitnami/minideb"` | | -| volumePermissions.image.tag | string | `"buster"` | | -| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb103/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb103/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb103/templates/NOTES.txt b/bitnami/mariadb/mariadb103/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb103/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/_helpers.tpl b/bitnami/mariadb/mariadb103/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb103/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb103/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-configmap.yaml b/bitnami/mariadb/mariadb103/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb103/templates/master-pdb.yaml b/bitnami/mariadb/mariadb103/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/master-svc.yaml b/bitnami/mariadb/mariadb103/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb103/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb103/templates/role.yaml b/bitnami/mariadb/mariadb103/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb103/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/rolebinding.yaml b/bitnami/mariadb/mariadb103/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb103/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/secrets.yaml b/bitnami/mariadb/mariadb103/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb103/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb103/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb103/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/slave-svc.yaml b/bitnami/mariadb/mariadb103/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb103/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/test-runner.yaml b/bitnami/mariadb/mariadb103/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb103/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb103/templates/tests.yaml b/bitnami/mariadb/mariadb103/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb103/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb103/values-production.yaml b/bitnami/mariadb/mariadb103/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb103/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb103/values.schema.json b/bitnami/mariadb/mariadb103/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb103/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb103/values.yaml b/bitnami/mariadb/mariadb103/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb103/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb104/Chart.yaml b/bitnami/mariadb/mariadb104/Chart.yaml deleted file mode 100644 index e8a6bd8..0000000 --- a/bitnami/mariadb/mariadb104/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -name: mariadb -version: 7.6.1 -appVersion: 10.3.23 -description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. -keywords: - - mariadb - - mysql - - database - - sql - - prometheus -home: https://mariadb.org -icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png -sources: - - https://github.com/bitnami/bitnami-docker-mariadb - - https://github.com/prometheus/mysqld_exporter -maintainers: - - name: Bitnami - email: containers@bitnami.com -engine: gotpl -annotations: - category: Database diff --git a/bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl deleted file mode 100644 index dd7ffed..0000000 --- a/bitnami/mariadb/mariadb104/IRONBANK.md.gotmpl +++ /dev/null @@ -1,23 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.description" . }} - -Version: {{ template "chart.version" . }} - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb104/README-original.md b/bitnami/mariadb/mariadb104/README-original.md deleted file mode 100644 index 80640c2..0000000 --- a/bitnami/mariadb/mariadb104/README-original.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR; - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb104/README.md b/bitnami/mariadb/mariadb104/README.md deleted file mode 100644 index d57836a..0000000 --- a/bitnami/mariadb/mariadb104/README.md +++ /dev/null @@ -1,148 +0,0 @@ -mariadb -======= -Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. - -Version: 7.6.1 - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| db.forcePassword | bool | `false` | | -| db.injectSecretsAsVolume | bool | `false` | | -| db.name | string | `"my_database"` | | -| db.password | string | `""` | | -| db.user | string | `""` | | -| image.debug | bool | `false` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"docker.io"` | | -| image.repository | string | `"bitnami/mariadb"` | | -| image.tag | string | `"10.3.23-debian-10-r44"` | | -| master.affinity | object | `{}` | | -| master.antiAffinity | string | `"soft"` | | -| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| master.extraEnvVars | string | `nil` | | -| master.extraEnvVarsCM | string | `nil` | | -| master.extraEnvVarsSecret | string | `nil` | | -| master.extraInitContainers | list | `[]` | | -| master.livenessProbe.enabled | bool | `true` | | -| master.livenessProbe.failureThreshold | int | `3` | | -| master.livenessProbe.initialDelaySeconds | int | `120` | | -| master.livenessProbe.periodSeconds | int | `10` | | -| master.livenessProbe.successThreshold | int | `1` | | -| master.livenessProbe.timeoutSeconds | int | `1` | | -| master.nodeSelector | object | `{}` | | -| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| master.persistence.annotations | object | `{}` | | -| master.persistence.enabled | bool | `true` | | -| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | -| master.persistence.size | string | `"8Gi"` | | -| master.podDisruptionBudget.enabled | bool | `false` | | -| master.podDisruptionBudget.minAvailable | int | `1` | | -| master.readinessProbe.enabled | bool | `true` | | -| master.readinessProbe.failureThreshold | int | `3` | | -| master.readinessProbe.initialDelaySeconds | int | `30` | | -| master.readinessProbe.periodSeconds | int | `10` | | -| master.readinessProbe.successThreshold | int | `1` | | -| master.readinessProbe.timeoutSeconds | int | `1` | | -| master.resources | object | `{}` | | -| master.service.annotations | object | `{}` | | -| master.tolerations | list | `[]` | | -| master.updateStrategy.type | string | `"RollingUpdate"` | | -| metrics.annotations."prometheus.io/port" | string | `"9104"` | | -| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | -| metrics.enabled | bool | `false` | | -| metrics.extraArgs.master | list | `[]` | | -| metrics.extraArgs.slave | list | `[]` | | -| metrics.image.pullPolicy | string | `"IfNotPresent"` | | -| metrics.image.registry | string | `"docker.io"` | | -| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | -| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | -| metrics.livenessProbe.enabled | bool | `true` | | -| metrics.livenessProbe.failureThreshold | int | `3` | | -| metrics.livenessProbe.initialDelaySeconds | int | `120` | | -| metrics.livenessProbe.periodSeconds | int | `10` | | -| metrics.livenessProbe.successThreshold | int | `1` | | -| metrics.livenessProbe.timeoutSeconds | int | `1` | | -| metrics.readinessProbe.enabled | bool | `true` | | -| metrics.readinessProbe.failureThreshold | int | `3` | | -| metrics.readinessProbe.initialDelaySeconds | int | `30` | | -| metrics.readinessProbe.periodSeconds | int | `10` | | -| metrics.readinessProbe.successThreshold | int | `1` | | -| metrics.readinessProbe.timeoutSeconds | int | `1` | | -| metrics.resources | object | `{}` | | -| metrics.serviceMonitor.enabled | bool | `false` | | -| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | -| rbac.create | bool | `false` | | -| replication.enabled | bool | `true` | | -| replication.forcePassword | bool | `false` | | -| replication.injectSecretsAsVolume | bool | `false` | | -| replication.password | string | `""` | | -| replication.user | string | `"replicator"` | | -| rootUser.forcePassword | bool | `false` | | -| rootUser.injectSecretsAsVolume | bool | `false` | | -| rootUser.password | string | `""` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1001` | | -| securityContext.runAsUser | int | `1001` | | -| service.port | int | `3306` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `false` | | -| slave.affinity | object | `{}` | | -| slave.antiAffinity | string | `"soft"` | | -| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| slave.extraEnvVars | string | `nil` | | -| slave.extraEnvVarsCM | string | `nil` | | -| slave.extraEnvVarsSecret | string | `nil` | | -| slave.extraInitContainers | string | `nil` | | -| slave.livenessProbe.enabled | bool | `true` | | -| slave.livenessProbe.failureThreshold | int | `3` | | -| slave.livenessProbe.initialDelaySeconds | int | `120` | | -| slave.livenessProbe.periodSeconds | int | `10` | | -| slave.livenessProbe.successThreshold | int | `1` | | -| slave.livenessProbe.timeoutSeconds | int | `1` | | -| slave.nodeSelector | object | `{}` | | -| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| slave.persistence.annotations | string | `nil` | | -| slave.persistence.enabled | bool | `true` | | -| slave.persistence.size | string | `"8Gi"` | | -| slave.podDisruptionBudget.enabled | bool | `false` | | -| slave.podDisruptionBudget.minAvailable | int | `1` | | -| slave.readinessProbe.enabled | bool | `true` | | -| slave.readinessProbe.failureThreshold | int | `3` | | -| slave.readinessProbe.initialDelaySeconds | int | `45` | | -| slave.readinessProbe.periodSeconds | int | `10` | | -| slave.readinessProbe.successThreshold | int | `1` | | -| slave.readinessProbe.timeoutSeconds | int | `1` | | -| slave.replicas | int | `1` | | -| slave.resources | object | `{}` | | -| slave.service.annotations | object | `{}` | | -| slave.tolerations | list | `[]` | | -| slave.updateStrategy.type | string | `"RollingUpdate"` | | -| tests.enabled | bool | `true` | | -| tests.resources | object | `{}` | | -| tests.testFramework.image.registry | string | `"docker.io"` | | -| tests.testFramework.image.repository | string | `"dduportal/bats"` | | -| tests.testFramework.image.tag | string | `"0.4.0"` | | -| tests.testFramework.resources | object | `{}` | | -| volumePermissions.enabled | bool | `false` | | -| volumePermissions.image.pullPolicy | string | `"Always"` | | -| volumePermissions.image.registry | string | `"docker.io"` | | -| volumePermissions.image.repository | string | `"bitnami/minideb"` | | -| volumePermissions.image.tag | string | `"buster"` | | -| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb104/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb104/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb104/templates/NOTES.txt b/bitnami/mariadb/mariadb104/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb104/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/_helpers.tpl b/bitnami/mariadb/mariadb104/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb104/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb104/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-configmap.yaml b/bitnami/mariadb/mariadb104/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb104/templates/master-pdb.yaml b/bitnami/mariadb/mariadb104/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/master-svc.yaml b/bitnami/mariadb/mariadb104/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb104/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb104/templates/role.yaml b/bitnami/mariadb/mariadb104/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb104/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/rolebinding.yaml b/bitnami/mariadb/mariadb104/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb104/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/secrets.yaml b/bitnami/mariadb/mariadb104/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb104/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb104/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb104/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/slave-svc.yaml b/bitnami/mariadb/mariadb104/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb104/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/test-runner.yaml b/bitnami/mariadb/mariadb104/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb104/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb104/templates/tests.yaml b/bitnami/mariadb/mariadb104/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb104/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb104/values-ironbank.yaml b/bitnami/mariadb/mariadb104/values-ironbank.yaml deleted file mode 100644 index 8db5958..0000000 --- a/bitnami/mariadb/mariadb104/values-ironbank.yaml +++ /dev/null @@ -1,70 +0,0 @@ -image: - repository: registry1.dsop.io/opensource/mariadb - tag: 10.4.13 - pullPolicy: IfNotPresent - debug: false - -volumePermissions: - enabled: false - image: - repository: registry1.dsop.io/redhat/ubi/ubi8 - tag: 8.2 - pullPolicy: Always - -master: - - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - log-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - -slave: - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - local-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - \ No newline at end of file diff --git a/bitnami/mariadb/mariadb104/values-production.yaml b/bitnami/mariadb/mariadb104/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb104/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb104/values.schema.json b/bitnami/mariadb/mariadb104/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb104/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb104/values.yaml b/bitnami/mariadb/mariadb104/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb104/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb105/Chart.yaml b/bitnami/mariadb/mariadb105/Chart.yaml deleted file mode 100644 index e8a6bd8..0000000 --- a/bitnami/mariadb/mariadb105/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -name: mariadb -version: 7.6.1 -appVersion: 10.3.23 -description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. -keywords: - - mariadb - - mysql - - database - - sql - - prometheus -home: https://mariadb.org -icon: https://bitnami.com/assets/stacks/mariadb/img/mariadb-stack-220x234.png -sources: - - https://github.com/bitnami/bitnami-docker-mariadb - - https://github.com/prometheus/mysqld_exporter -maintainers: - - name: Bitnami - email: containers@bitnami.com -engine: gotpl -annotations: - category: Database diff --git a/bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl b/bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl deleted file mode 100644 index dd7ffed..0000000 --- a/bitnami/mariadb/mariadb105/IRONBANK.md.gotmpl +++ /dev/null @@ -1,23 +0,0 @@ -{{ template "chart.header" . }} -{{ template "chart.description" . }} - -Version: {{ template "chart.version" . }} - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -{{ template "chart.valuesTable" . }} \ No newline at end of file diff --git a/bitnami/mariadb/mariadb105/README-original.md b/bitnami/mariadb/mariadb105/README-original.md deleted file mode 100644 index 80640c2..0000000 --- a/bitnami/mariadb/mariadb105/README-original.md +++ /dev/null @@ -1,342 +0,0 @@ -# MariaDB - -[MariaDB](https://mariadb.org) is one of the most popular database servers in the world. It’s made by the original developers of MySQL and guaranteed to stay open source. Notable users include Wikipedia, Facebook and Google. - -MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. The latest versions of MariaDB also include GIS and JSON features. - -## TL;DR; - -```bash -$ helm repo add bitnami https://charts.bitnami.com/bitnami -$ helm install my-release bitnami/mariadb -``` - -## Introduction - -This chart bootstraps a [MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) replication cluster deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.12+ -- Helm 2.12+ or Helm 3.0-beta3+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install my-release bitnami/mariadb -``` - -The command deploys MariaDB on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Parameters - -The following table lists the configurable parameters of the MariaDB chart and their default values. - -| Parameter | Description | Default | -|----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `global.storageClass` | Global storage class for dynamic provisioning | `nil` | -| `image.registry` | MariaDB image registry | `docker.io` | -| `image.repository` | MariaDB Image name | `bitnami/mariadb` | -| `image.tag` | MariaDB Image tag | `{TAG_NAME}` | -| `image.pullPolicy` | MariaDB image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `image.debug` | Specify if debug logs should be enabled | `false` | -| `nameOverride` | String to partially override mariadb.fullname template with a string (will prepend the release name) | `nil` | -| `fullnameOverride` | String to fully override mariadb.fullname template with a string | `nil` | -| `podLabels` | Additional pod labels | `{}` | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the data directory (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `buster` | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `Always` | -| `volumePermissions.resources` | Init container resource requests/limit | `nil` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.clusterIp.master` | Specific cluster IP for master when service type is cluster IP. Use None for headless service | `nil` | -| `service.clusterIp.slave` | Specific cluster IP for slave when service type is cluster IP. Use None for headless service | `nil` | -| `service.port` | MySQL service port | `3306` | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the mariadb.fullname template | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `rbac.create` | Create and use RBAC resources | `false` | -| `securityContext.enabled` | Enable security context | `true` | -| `securityContext.fsGroup` | Group ID for the container | `1001` | -| `securityContext.runAsUser` | User ID for the container | `1001` | -| `existingSecret` | Use existing secret for password details (`rootUser.password`, `db.password`, `replication.password` will be ignored and picked up from this secret). The secret has to contain the keys `mariadb-root-password`, `mariadb-replication-password` and `mariadb-password`. | `nil` | -| `rootUser.password` | Password for the `root` user. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `rootUser.forcePassword` | Force users to specify a password | `false` | -| `rootUser.injectSecretsAsVolume` | Mount admin user password as a file instead of using an environment variable | `false` | -| `db.name` | Name for new database to create | `my_database` | -| `db.user` | Username of new user to create | `""` | -| `db.password` | Password for the new user. Ignored if existing secret is provided. | _random 10 character alphanumeric string if `db.user` is defined_ | -| `db.forcePassword` | Force users to specify a password | `false` | -| `db.injectSecretsAsVolume` | Mount user password as a file instead of using an environment variable | `false` | -| `replication.enabled` | MariaDB replication enabled | `true` | -| `replication.user` | MariaDB replication user | `replicator` | -| `replication.password` | MariaDB replication user password. Ignored if existing secret is provided. | _random 10 character alphanumeric string_ | -| `replication.forcePassword` | Force users to specify a password | `false` | -| `replication.injectSecretsAsVolume` | Mount replication user password as a file instead of using an environment variable | `false` | -| `initdbScripts` | Dictionary of initdb scripts | `nil` | -| `initdbScriptsConfigMap` | ConfigMap with the initdb scripts (Note: Overrides `initdbScripts`) | `nil` | -| `master.annotations[].key` | key for the the annotation list item | `nil` | -| `master.annotations[].value` | value for the the annotation list item | `nil` | -| `master.extraFlags` | MariaDB master additional command line flags | `nil` | -| `master.affinity` | Master affinity (in addition to master.antiAffinity when set) | `{}` | -| `master.antiAffinity` | Master pod anti-affinity policy | `soft` | -| `master.nodeSelector` | Master node labels for pod assignment | `{}` | -| `master.tolerations` | List of node taints to tolerate (master) | `[]` | -| `master.updateStrategy` | Master statefulset update strategy policy | `RollingUpdate` | -| `master.persistence.enabled` | Enable persistence using PVC | `true` | -| `master.persistence.existingClaim` | Provide an existing `PersistentVolumeClaim` | `nil` | -| `master.persistence.subPath` | Subdirectory of the volume to mount | `nil` | -| `master.persistence.mountPath` | Path to mount the volume at | `/bitnami/mariadb` | -| `master.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `master.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `master.persistence.size` | Persistent Volume Size | `8Gi` | -| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | | -| `master.extraEnvVars` | Array containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsCM` | Configmap containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB master replicas | `nil` | -| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` | -| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (master) | `120` | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (master) | `true` | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (master) | `30` | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (master) | `10` | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (master) | `1` | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (master) | `1` | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (master) | `3` | -| `master.podDisruptionBudget.enabled` | If true, create a pod disruption budget for master pods. | `false` | -| `master.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `master.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `master.service.annotations` | Master service annotations | `{}` | -| `slave.replicas` | Desired number of slave replicas | `1` | -| `slave.annotations[].key` | key for the the annotation list item | `nil` | -| `slave.annotations[].value` | value for the the annotation list item | `nil` | -| `slave.extraFlags` | MariaDB slave additional command line flags | `nil` | -| `slave.affinity` | Slave affinity (in addition to slave.antiAffinity when set) | `{}` | -| `slave.antiAffinity` | Slave pod anti-affinity policy | `soft` | -| `slave.nodeSelector` | Slave node labels for pod assignment | `{}` | -| `slave.tolerations` | List of node taints to tolerate for (slave) | `[]` | -| `slave.updateStrategy` | Slave statefulset update strategy policy | `RollingUpdate` | -| `slave.persistence.enabled` | Enable persistence using a `PersistentVolumeClaim` | `true` | -| `slave.persistence.annotations` | Persistent Volume Claim annotations | `{}` | -| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | -| `slave.persistence.size` | Persistent Volume Size | `8Gi` | -| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | `nil` | -| `slave.extraEnvVars` | Array containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsCM` | ConfigMap containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.extraEnvVarsSecret` | Secret containing extra env vars to configure MariaDB slave replicas | `nil` | -| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` | -| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (slave) | `120` | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.readinessProbe.enabled` | Turn on and off readiness probe (slave) | `true` | -| `slave.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (slave) | `45` | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (slave) | `10` | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (slave) | `1` | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (slave) | `1` | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (slave) | `3` | -| `slave.podDisruptionBudget.enabled` | If true, create a pod disruption budget for slave pods. | `false` | -| `slave.podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | -| `slave.podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `nil` | -| `slave.service.annotations` | Slave service annotations | `{}` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image.registry` | Exporter image registry | `docker.io` | -| `metrics.image.repository` | Exporter image name | `bitnami/mysqld-exporter` | -| `metrics.image.tag` | Exporter image tag | `{TAG_NAME}` | -| `metrics.image.pullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | `nil` | -| `metrics.extraArgs.master` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.extraArgs.slave` | Extra args to be passed to mysqld_exporter | `[]` | -| `metrics.livenessProbe.enabled` | Turn on and off liveness probe (metrics) | `true` | -| `metrics.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (metrics) | `120` | -| `metrics.livenessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.livenessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.livenessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.readinessProbe.enabled` | Turn on and off readiness probe (metrics) | `true` | -| `metrics.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (metrics) | `30` | -| `metrics.readinessProbe.periodSeconds` | How often to perform the probe (metrics) | `10` | -| `metrics.readinessProbe.timeoutSeconds` | When the probe times out (metrics) | `1` | -| `metrics.readinessProbe.successThreshold` | Minimum consecutive successes for the probe (metrics) | `1` | -| `metrics.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe (metrics) | `3` | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | -| `tests.enabled` | Provide tests to check if connect and authentication is possible | `true` | -| `tests.resources` | Resource definition for the test-runner pod | `nil` | -| `tests.testFramework.image.registry` | Test framework image registry (init container) | `docker.io` | -| `tests.testFramework.image.repository` | Test framework image name | `dduportal/bats` | -| `tests.testFramework.image.tag` | Test framework image tag | `0.4.0` | -| `tests.testFramework.resources` | Resource definition for the test framework | `nil` | - -The above parameters map to the env variables defined in [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb). For more information please refer to the [bitnami/mariadb](http://github.com/bitnami/bitnami-docker-mariadb) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install my-release \ - --set rootUser.password=secretpassword,db.user=app_database \ - bitnami/mariadb -``` - -The above command sets the MariaDB `root` account password to `secretpassword`. Additionally it creates a database named `my_database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install my-release -f values.yaml bitnami/mariadb -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Configuration and installation details - -### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) - -It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. - -Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. - -### Production configuration - -This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one. - -- Force users to specify a password and mount secrets as volumes instead of using environment variables: - -```diff -- rootUser.forcePassword: false -- rootUser.injectSecretsAsVolume: false -+ rootUser.forcePassword: true -+ rootUser.injectSecretsAsVolume: true -- db.forcePassword: false -- db.injectSecretsAsVolume: false -+ db.forcePassword: true -+ db.injectSecretsAsVolume: true -- replication.forcePassword: false -- replication.injectSecretsAsVolume: false -+ replication.forcePassword: true -+ replication.injectSecretsAsVolume: true -``` - -- Desired number of slave replicas: - -```diff -- slave.replicas: 1 -+ slave.replicas: 2 -``` - -- Start a side-car prometheus exporter: - -```diff -- metrics.enabled: false -+ metrics.enabled: true -``` - -### Change MariaDB version - -To modify the MariaDB version used in this chart you can specify a [valid image tag](https://hub.docker.com/r/bitnami/mariadb/tags/) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters. - -### Initialize a fresh instance - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder `files/docker-entrypoint-initdb.d` so they can be consumed as a ConfigMap. - -Alternatively, you can specify custom scripts using the `initdbScripts` parameter as dict. - -In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the `initdbScriptsConfigMap` parameter. Note that this will override the two previous options. - -The allowed extensions are `.sh`, `.sql` and `.sql.gz`. - -### Extra Init Containers - -The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting. -`values.yaml` -```yaml -master: - extraInitContainers: | - - name: initcontainer - image: bitnami/minideb:buster - command: ["/bin/sh", "-c"] - args: - - install_packages curl && curl http://api-service.local/db/starting; -``` - -## Persistence - -The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image stores the MariaDB data and configurations at the `/bitnami/mariadb` path of the container. - -The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined. - -### Adjust permissions of persistent volume mountpoint - -As the image run as non-root by default, it is necessary to adjust the ownership of the persistent volume so that the container can write data into it. - -By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. -As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination. - -You can enable this initContainer by setting `volumePermissions.enabled` to `true`. - -## Upgrading - -It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart: - -```bash -$ helm upgrade my-release bitnami/mariadb --set rootUser.password=[ROOT_PASSWORD] -``` - -| Note: you need to substitute the placeholder _[ROOT_PASSWORD]_ with the value obtained in the installation notes. - -### To 7.0.0 - -Helm performs a lookup for the object based on its group (apps), version (v1), and kind (Deployment). Also known as its GroupVersionKind, or GVK. Changing the GVK is considered a compatibility breaker from Kubernetes' point of view, so you cannot "upgrade" those objects to the new GVK in-place. Earlier versions of Helm 3 did not perform the lookup correctly which has since been fixed to match the spec. - -In https://github.com/helm/charts/pull/17308 the `apiVersion` of the statefulset resources was updated to `apps/v1` in tune with the api's deprecated, resulting in compatibility breakage. - -This major version bump signifies this change. - -### To 6.0.0 - -MariaDB version was updated from 10.1 to 10.3, there are no changes in the chart itself. According to the official documentation, upgrading from 10.1 should be painless. However, there are some things that have changed which could affect an upgrade: - -- [Incompatible changes upgrading from MariaDB 10.1 to MariaDB 10.2](https://mariadb.com/kb/en/library/upgrading-from-mariadb-101-to-mariadb-102//#incompatible-changes-between-101-and-102) -- [Incompatible changes upgrading from MariaDB 10.2 to MariaDB 10.3](https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#incompatible-changes-between-102-and-103) - -### To 5.0.0 - -Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. -Use the workaround below to upgrade from versions previous to 5.0.0. The following example assumes that the release name is mariadb: - -```console -$ kubectl delete statefulset opencart-mariadb --cascade=false -``` diff --git a/bitnami/mariadb/mariadb105/README.md b/bitnami/mariadb/mariadb105/README.md deleted file mode 100644 index d57836a..0000000 --- a/bitnami/mariadb/mariadb105/README.md +++ /dev/null @@ -1,148 +0,0 @@ -mariadb -======= -Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster. - -Version: 7.6.1 - -This repository tracks the upstream [bitnami/mariadb](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) Helm chart. - -A `values-ironbank.yaml` file is included with required parameters for deployment. - -- sets `bind-address` to `localhost` -- sets `local-infile` to `0` - -Reference the original [README](./README-original.md) for additional configuration options. - -## Installation - -```shell -helm install ./ --name mariadb -f values-ironbank.yaml -``` - -## Configuration - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| db.forcePassword | bool | `false` | | -| db.injectSecretsAsVolume | bool | `false` | | -| db.name | string | `"my_database"` | | -| db.password | string | `""` | | -| db.user | string | `""` | | -| image.debug | bool | `false` | | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.registry | string | `"docker.io"` | | -| image.repository | string | `"bitnami/mariadb"` | | -| image.tag | string | `"10.3.23-debian-10-r44"` | | -| master.affinity | object | `{}` | | -| master.antiAffinity | string | `"soft"` | | -| master.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nplugin_dir=/opt/bitnami/mariadb/plugin\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\nplugin_dir=/opt/bitnami/mariadb/plugin\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| master.extraEnvVars | string | `nil` | | -| master.extraEnvVarsCM | string | `nil` | | -| master.extraEnvVarsSecret | string | `nil` | | -| master.extraInitContainers | list | `[]` | | -| master.livenessProbe.enabled | bool | `true` | | -| master.livenessProbe.failureThreshold | int | `3` | | -| master.livenessProbe.initialDelaySeconds | int | `120` | | -| master.livenessProbe.periodSeconds | int | `10` | | -| master.livenessProbe.successThreshold | int | `1` | | -| master.livenessProbe.timeoutSeconds | int | `1` | | -| master.nodeSelector | object | `{}` | | -| master.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| master.persistence.annotations | object | `{}` | | -| master.persistence.enabled | bool | `true` | | -| master.persistence.mountPath | string | `"/bitnami/mariadb"` | | -| master.persistence.size | string | `"8Gi"` | | -| master.podDisruptionBudget.enabled | bool | `false` | | -| master.podDisruptionBudget.minAvailable | int | `1` | | -| master.readinessProbe.enabled | bool | `true` | | -| master.readinessProbe.failureThreshold | int | `3` | | -| master.readinessProbe.initialDelaySeconds | int | `30` | | -| master.readinessProbe.periodSeconds | int | `10` | | -| master.readinessProbe.successThreshold | int | `1` | | -| master.readinessProbe.timeoutSeconds | int | `1` | | -| master.resources | object | `{}` | | -| master.service.annotations | object | `{}` | | -| master.tolerations | list | `[]` | | -| master.updateStrategy.type | string | `"RollingUpdate"` | | -| metrics.annotations."prometheus.io/port" | string | `"9104"` | | -| metrics.annotations."prometheus.io/scrape" | string | `"true"` | | -| metrics.enabled | bool | `false` | | -| metrics.extraArgs.master | list | `[]` | | -| metrics.extraArgs.slave | list | `[]` | | -| metrics.image.pullPolicy | string | `"IfNotPresent"` | | -| metrics.image.registry | string | `"docker.io"` | | -| metrics.image.repository | string | `"bitnami/mysqld-exporter"` | | -| metrics.image.tag | string | `"0.12.1-debian-10-r146"` | | -| metrics.livenessProbe.enabled | bool | `true` | | -| metrics.livenessProbe.failureThreshold | int | `3` | | -| metrics.livenessProbe.initialDelaySeconds | int | `120` | | -| metrics.livenessProbe.periodSeconds | int | `10` | | -| metrics.livenessProbe.successThreshold | int | `1` | | -| metrics.livenessProbe.timeoutSeconds | int | `1` | | -| metrics.readinessProbe.enabled | bool | `true` | | -| metrics.readinessProbe.failureThreshold | int | `3` | | -| metrics.readinessProbe.initialDelaySeconds | int | `30` | | -| metrics.readinessProbe.periodSeconds | int | `10` | | -| metrics.readinessProbe.successThreshold | int | `1` | | -| metrics.readinessProbe.timeoutSeconds | int | `1` | | -| metrics.resources | object | `{}` | | -| metrics.serviceMonitor.enabled | bool | `false` | | -| metrics.serviceMonitor.selector.prometheus | string | `"kube-prometheus"` | | -| rbac.create | bool | `false` | | -| replication.enabled | bool | `true` | | -| replication.forcePassword | bool | `false` | | -| replication.injectSecretsAsVolume | bool | `false` | | -| replication.password | string | `""` | | -| replication.user | string | `"replicator"` | | -| rootUser.forcePassword | bool | `false` | | -| rootUser.injectSecretsAsVolume | bool | `false` | | -| rootUser.password | string | `""` | | -| securityContext.enabled | bool | `true` | | -| securityContext.fsGroup | int | `1001` | | -| securityContext.runAsUser | int | `1001` | | -| service.port | int | `3306` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.create | bool | `false` | | -| slave.affinity | object | `{}` | | -| slave.antiAffinity | string | `"soft"` | | -| slave.config | string | `"[mysqld]\nskip-name-resolve\nexplicit_defaults_for_timestamp\nbasedir=/opt/bitnami/mariadb\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ntmpdir=/opt/bitnami/mariadb/tmp\nmax_allowed_packet=16M\nbind-address=0.0.0.0\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid\nlog-error=/opt/bitnami/mariadb/logs/mysqld.log\ncharacter-set-server=UTF8\ncollation-server=utf8_general_ci\n\n[client]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\ndefault-character-set=UTF8\n\n[manager]\nport=3306\nsocket=/opt/bitnami/mariadb/tmp/mysql.sock\npid-file=/opt/bitnami/mariadb/tmp/mysqld.pid"` | | -| slave.extraEnvVars | string | `nil` | | -| slave.extraEnvVarsCM | string | `nil` | | -| slave.extraEnvVarsSecret | string | `nil` | | -| slave.extraInitContainers | string | `nil` | | -| slave.livenessProbe.enabled | bool | `true` | | -| slave.livenessProbe.failureThreshold | int | `3` | | -| slave.livenessProbe.initialDelaySeconds | int | `120` | | -| slave.livenessProbe.periodSeconds | int | `10` | | -| slave.livenessProbe.successThreshold | int | `1` | | -| slave.livenessProbe.timeoutSeconds | int | `1` | | -| slave.nodeSelector | object | `{}` | | -| slave.persistence.accessModes[0] | string | `"ReadWriteOnce"` | | -| slave.persistence.annotations | string | `nil` | | -| slave.persistence.enabled | bool | `true` | | -| slave.persistence.size | string | `"8Gi"` | | -| slave.podDisruptionBudget.enabled | bool | `false` | | -| slave.podDisruptionBudget.minAvailable | int | `1` | | -| slave.readinessProbe.enabled | bool | `true` | | -| slave.readinessProbe.failureThreshold | int | `3` | | -| slave.readinessProbe.initialDelaySeconds | int | `45` | | -| slave.readinessProbe.periodSeconds | int | `10` | | -| slave.readinessProbe.successThreshold | int | `1` | | -| slave.readinessProbe.timeoutSeconds | int | `1` | | -| slave.replicas | int | `1` | | -| slave.resources | object | `{}` | | -| slave.service.annotations | object | `{}` | | -| slave.tolerations | list | `[]` | | -| slave.updateStrategy.type | string | `"RollingUpdate"` | | -| tests.enabled | bool | `true` | | -| tests.resources | object | `{}` | | -| tests.testFramework.image.registry | string | `"docker.io"` | | -| tests.testFramework.image.repository | string | `"dduportal/bats"` | | -| tests.testFramework.image.tag | string | `"0.4.0"` | | -| tests.testFramework.resources | object | `{}` | | -| volumePermissions.enabled | bool | `false` | | -| volumePermissions.image.pullPolicy | string | `"Always"` | | -| volumePermissions.image.registry | string | `"docker.io"` | | -| volumePermissions.image.repository | string | `"bitnami/minideb"` | | -| volumePermissions.image.tag | string | `"buster"` | | -| volumePermissions.resources | object | `{}` | | \ No newline at end of file diff --git a/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml b/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml deleted file mode 100644 index 3e71d77..0000000 --- a/bitnami/mariadb/mariadb105/ci/values-production-with-rbac.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Test values file for generating all of the yaml and check that -# the rendering is correct - -metrics: - enabled: true - -podDisruptionBudget: - create: true - -master: - extraEnvVars: - - name: TEST - value: "3" - - extraEnvVarsSecret: example-secret - extraEnvVarsCM: example-cm - -slave: - extraEnvVars: - - name: TEST - value: "2" - - extraEnvVarsSecret: example-secret-2 - extraEnvVarsCM: example-cm-2 - -rbac: - create: true - -serviceAccount: - create: true - name: mariadb-galera-service-account diff --git a/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md b/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md deleted file mode 100644 index aaddde3..0000000 --- a/bitnami/mariadb/mariadb105/files/docker-entrypoint-initdb.d/README.md +++ /dev/null @@ -1,3 +0,0 @@ -You can copy here your custom .sh, .sql or .sql.gz file so they are executed during the first boot of the image. - -More info in the [bitnami-docker-mariadb](https://github.com/bitnami/bitnami-docker-mariadb#initializing-a-new-instance) repository. \ No newline at end of file diff --git a/bitnami/mariadb/mariadb105/templates/NOTES.txt b/bitnami/mariadb/mariadb105/templates/NOTES.txt deleted file mode 100644 index 9cf93ae..0000000 --- a/bitnami/mariadb/mariadb105/templates/NOTES.txt +++ /dev/null @@ -1,49 +0,0 @@ - -Please be patient while the chart is being deployed - -Tip: - - Watch the deployment status using the command: kubectl get pods -w --namespace {{ .Release.Namespace }} -l release={{ .Release.Name }} - -Services: - - echo Master: {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- if .Values.replication.enabled }} - echo Slave: {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }} -{{- end }} - -Administrator credentials: - - Username: root - Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - -To connect to your database: - - 1. Run a pod that you can use as a client: - - kubectl run {{ template "mariadb.fullname" . }}-client --rm --tty -i --restart='Never' --image {{ template "mariadb.image" . }} --namespace {{ .Release.Namespace }} --command -- bash - - 2. To connect to master service (read/write): - - mysql -h {{ template "mariadb.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} - -{{- if .Values.replication.enabled }} - - 3. To connect to slave service (read-only): - - mysql -h {{ template "slave.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -uroot -p {{ .Values.db.name }} -{{- end }} - -To upgrade this helm chart: - - 1. Obtain the password as described on the 'Administrator credentials' section and set the 'rootUser.password' parameter as shown below: - - ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.secretName" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) - helm upgrade {{ .Release.Name }} bitnami/mariadb --set rootUser.password=$ROOT_PASSWORD - -{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }} - -WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment. -+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/ - -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/_helpers.tpl b/bitnami/mariadb/mariadb105/templates/_helpers.tpl deleted file mode 100644 index 27d629f..0000000 --- a/bitnami/mariadb/mariadb105/templates/_helpers.tpl +++ /dev/null @@ -1,298 +0,0 @@ -{{/* -Return the appropriate apiVersion for statefulset. -*/}} -{{- define "mariadb.statefulset.apiVersion" -}} -{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "apps/v1beta1" -}} -{{- else -}} -{{- print "apps/v1" -}} -{{- end -}} -{{- end -}} - -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "mariadb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "mariadb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{- define "master.fullname" -}} -{{- if .Values.replication.enabled -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "master" | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- include "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} - -{{- define "slave.fullname" -}} -{{- printf "%s-%s" (include "mariadb.fullname" .) "slave" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "mariadb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create pod labels for mariadb -*/}} -{{- define "mariadb.podLabels" -}} -{{- if .Values.podLabels }} -{{ toYaml .Values.podLabels }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper MariaDB image name -*/}} -{{- define "mariadb.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper metrics image name -*/}} -{{- define "mariadb.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{ template "mariadb.initdbScriptsCM" . }} -{{/* -Get the initialization scripts ConfigMap name. -*/}} -{{- define "mariadb.initdbScriptsCM" -}} -{{- if .Values.initdbScriptsConfigMap -}} -{{- printf "%s" .Values.initdbScriptsConfigMap -}} -{{- else -}} -{{- printf "%s-init-scripts" (include "master.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "mariadb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "mariadb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "mariadb.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} - -{{/* -Return the proper test image name -*/}} -{{- define "mariadb.tests.testFramework.image" -}} -{{- $registryName := .Values.tests.testFramework.image.registry -}} -{{- $repositoryName := .Values.tests.testFramework.image.repository -}} -{{- $tag := .Values.tests.testFramework.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "mariadb.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the master -*/}} -{{- define "mariadb.master.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.master.persistence.storageClass -}} - {{- if (eq "-" .Values.master.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.master.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Storage Class for the slave -*/}} -{{- define "mariadb.slave.storageClass" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -*/}} -{{- if .Values.global -}} - {{- if .Values.global.storageClass -}} - {{- if (eq "-" .Values.global.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.global.storageClass -}} - {{- end -}} - {{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} - {{- end -}} -{{- else -}} - {{- if .Values.slave.persistence.storageClass -}} - {{- if (eq "-" .Values.slave.persistence.storageClass) -}} - {{- printf "storageClassName: \"\"" -}} - {{- else }} - {{- printf "storageClassName: %s" .Values.slave.persistence.storageClass -}} - {{- end -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the name of the Secret used to store the passwords -*/}} -{{- define "mariadb.secretName" -}} -{{- if .Values.existingSecret -}} -{{ .Values.existingSecret }} -{{- else -}} -{{ template "mariadb.fullname" . -}} -{{- end -}} -{{- end -}} diff --git a/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml b/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml deleted file mode 100644 index 2dbeb2d..0000000 --- a/bitnami/mariadb/mariadb105/templates/initialization-configmap.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if and (or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScripts) (not .Values.initdbScriptsConfigMap) }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }}-init-scripts - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - component: "master" -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz") (not .Values.initdbScriptsConfigMap) }} -binaryData: -{{- $root := . }} -{{- range $path, $bytes := .Files.Glob "files/docker-entrypoint-initdb.d/*.sql.gz" }} - {{ base $path }}: {{ $root.Files.Get $path | b64enc | quote }} -{{- end }} -{{- end }} -data: -{{- if and (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}") (not .Values.initdbScriptsConfigMap) }} -{{ (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql}").AsConfig | indent 2 }} -{{- end }} -{{- with .Values.initdbScripts }} -{{ toYaml . | indent 2 }} -{{- end }} -{{ end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-configmap.yaml b/bitnami/mariadb/mariadb105/templates/master-configmap.yaml deleted file mode 100644 index 3620743..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.master.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.master.config | indent 4 }} -{{- end -}} diff --git a/bitnami/mariadb/mariadb105/templates/master-pdb.yaml b/bitnami/mariadb/mariadb105/templates/master-pdb.yaml deleted file mode 100644 index 012d09a..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.master.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.master.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.master.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml deleted file mode 100644 index 03bbd48..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-statefulset.yaml +++ /dev/null @@ -1,344 +0,0 @@ -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: master - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: master - serviceName: {{ template "master.fullname" . }} - replicas: 1 - updateStrategy: - type: {{ .Values.master.updateStrategy.type }} - {{- if (eq "Recreate" .Values.master.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- with .Values.master.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: master - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.master.antiAffinity "hard" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.master.antiAffinity "soft" }} - affinity: - {{- with .Values.master.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.master.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: {{ toYaml .Values.master.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.master.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} -{{ tpl .Values.master.extraInitContainers . | indent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.master.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.mountPath }}"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.master.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.master.extraFlags }}" - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - {{- if not (empty .Values.db.user) }} - - name: MARIADB_USER - value: "{{ .Values.db.user }}" - {{- if .Values.db.injectSecretsAsVolume }} - - name: MARIADB_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-password" - {{- else }} - - name: MARIADB_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-password - {{- end }} - {{- end }} - - name: MARIADB_DATABASE - value: "{{ .Values.db.name }}" - {{- if .Values.replication.enabled }} - - name: MARIADB_REPLICATION_MODE - value: "master" - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- end }} - {{- if .Values.master.extraEnvVars }} - {{- tpl (toYaml .Values.master.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }} - envFrom: - {{- if .Values.master.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.master.extraEnvVarsCM }} - {{- end }} - {{- if .Values.master.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.master.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.master.resources }} - resources: {{ toYaml .Values.master.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: {{ .Values.master.persistence.mountPath }} - {{- if .Values.master.persistence.subPath }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.master.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.master }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.master.config }} - - name: config - configMap: - name: {{ template "master.fullname" . }} - {{- end }} - {{- if or (.Files.Glob "files/docker-entrypoint-initdb.d/*.{sh,sql,sql.gz}") .Values.initdbScriptsConfigMap .Values.initdbScripts }} - - name: custom-init-scripts - configMap: - name: {{ template "mariadb.initdbScriptsCM" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.db.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.db.injectSecretsAsVolume }} - - key: mariadb-password - path: mariadb-password - {{- end }} - {{- if and .Values.replication.enabled .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if and .Values.master.persistence.enabled .Values.master.persistence.existingClaim }} - - name: data - persistentVolumeClaim: - claimName: {{ .Values.master.persistence.existingClaim }} -{{- else if not .Values.master.persistence.enabled }} - - name: data - emptyDir: {} -{{- else if and .Values.master.persistence.enabled (not .Values.master.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{ include "mariadb.master.storageClass" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/master-svc.yaml b/bitnami/mariadb/mariadb105/templates/master-svc.yaml deleted file mode 100644 index 5b1be80..0000000 --- a/bitnami/mariadb/mariadb105/templates/master-svc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "master" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.master.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.master.service.annotations }} -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.master }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if eq .Values.service.type "NodePort" }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.master }} - nodePort: {{ .Values.service.nodePort.master }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "master" - release: "{{ .Release.Name }}" diff --git a/bitnami/mariadb/mariadb105/templates/role.yaml b/bitnami/mariadb/mariadb105/templates/role.yaml deleted file mode 100644 index 296c439..0000000 --- a/bitnami/mariadb/mariadb105/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -rules: - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/rolebinding.yaml b/bitnami/mariadb/mariadb105/templates/rolebinding.yaml deleted file mode 100644 index 223eda9..0000000 --- a/bitnami/mariadb/mariadb105/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.serviceAccount.create .Values.rbac.create }} -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "master.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -subjects: - - kind: ServiceAccount - name: {{ template "mariadb.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "master.fullname" . }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/secrets.yaml b/bitnami/mariadb/mariadb105/templates/secrets.yaml deleted file mode 100644 index 8560837..0000000 --- a/bitnami/mariadb/mariadb105/templates/secrets.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -type: Opaque -data: - {{- if not (empty .Values.rootUser.password) }} - mariadb-root-password: "{{ .Values.rootUser.password | b64enc }}" - {{- else if (not .Values.rootUser.forcePassword) }} - mariadb-root-password: "{{ randAlphaNum 10 | b64enc }}" - {{ else }} - mariadb-root-password: {{ required "A MariaDB Root Password is required!" .Values.rootUser.password }} - {{- end }} - {{- if not (empty .Values.db.user) }} - {{- if not (empty .Values.db.password) }} - mariadb-password: "{{ .Values.db.password | b64enc }}" - {{- else if (not .Values.db.forcePassword) }} - mariadb-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-password: {{ required "A MariaDB Database Password is required!" .Values.db.password }} - {{- end }} - {{- end }} - {{- if .Values.replication.enabled }} - {{- if not (empty .Values.replication.password) }} - mariadb-replication-password: "{{ .Values.replication.password | b64enc }}" - {{- else if (not .Values.replication.forcePassword) }} - mariadb-replication-password: "{{ randAlphaNum 10 | b64enc }}" - {{- else }} - mariadb-replication-password: {{ required "A MariaDB Replication Password is required!" .Values.replication.password }} - {{- end }} - {{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml b/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml deleted file mode 100644 index 5af7e45..0000000 --- a/bitnami/mariadb/mariadb105/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "mariadb.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml b/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml deleted file mode 100644 index 696a5c0..0000000 --- a/bitnami/mariadb/mariadb105/templates/servicemonitor.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "mariadb.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name | quote }} - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} - {{- end }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml b/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml deleted file mode 100644 index 21b0579..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-configmap.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.replication.enabled .Values.slave.config }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: "{{ template "mariadb.chart" . }}" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -data: - my.cnf: |- -{{ .Values.slave.config | indent 4 }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml b/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml deleted file mode 100644 index 40f3572..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-pdb.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.replication.enabled }} -{{- if .Values.slave.podDisruptionBudget.enabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "mariadb.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -spec: -{{- if .Values.slave.podDisruptionBudget.minAvailable }} - minAvailable: {{ .Values.slave.podDisruptionBudget.minAvailable }} -{{- end }} -{{- if .Values.slave.podDisruptionBudget.maxUnavailable }} - maxUnavailable: {{ .Values.slave.podDisruptionBudget.maxUnavailable }} -{{- end }} - selector: - matchLabels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml b/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml deleted file mode 100644 index 09f5d67..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-statefulset.yaml +++ /dev/null @@ -1,316 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: {{ template "mariadb.statefulset.apiVersion" . }} -kind: StatefulSet -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - component: slave - {{- include "mariadb.podLabels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - component: slave - serviceName: {{ template "slave.fullname" . }} - replicas: {{ .Values.slave.replicas }} - updateStrategy: - type: {{ .Values.slave.updateStrategy.type }} - {{- if (eq "Recreate" .Values.slave.updateStrategy.type) }} - rollingUpdate: null - {{- end }} - template: - metadata: - {{- if .Values.slave.annotations }} - annotations: - {{- range $key, $value := .Values.slave.annotations }} - {{ $key }}: {{ $value }} - {{- end }} - {{- end }} - labels: - app: {{ template "mariadb.name" . }} - chart: {{ template "mariadb.chart" . }} - release: {{ .Release.Name }} - component: slave - {{- include "mariadb.podLabels" . | nindent 8 }} - spec: - {{- if .Values.schedulerName }} - schedulerName: {{ .Values.schedulerName | quote }} - {{- end }} - serviceAccountName: {{ template "mariadb.serviceAccountName" . }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - {{- if eq .Values.slave.antiAffinity "hard" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else if eq .Values.slave.antiAffinity "soft" }} - affinity: - {{- with .Values.slave.affinity }} -{{ toYaml . | indent 8 }} - {{- end }} - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 1 - podAffinityTerm: - topologyKey: kubernetes.io/hostname - labelSelector: - matchLabels: - app: {{ template "mariadb.name" . }} - release: {{ .Release.Name }} - {{- else}} - {{- with .Values.slave.affinity }} - affinity: {{ toYaml . | nindent 8 }} - {{- end }} - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: {{ toYaml .Values.slave.nodeSelector | nindent 8 }} - {{- end -}} - {{- with .Values.slave.tolerations }} - tolerations: {{ toYaml . | nindent 8 }} - {{- end }} -{{- include "mariadb.imagePullSecrets" . | indent 6 }} - initContainers: - {{- if .Values.master.extraInitContainers }} - {{- tpl .Values.master.extraInitContainers . | nindent 8 }} - {{- end }} - {{- if and .Values.volumePermissions.enabled .Values.slave.persistence.enabled }} - - name: volume-permissions - image: {{ template "mariadb.volumePermissions.image" . }} - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/bitnami/mariadb"] - securityContext: - runAsUser: 0 - resources: {{ toYaml .Values.volumePermissions.resources | nindent 12 }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- end }} - containers: - - name: "mariadb" - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - env: - {{- if .Values.image.debug}} - - name: BITNAMI_DEBUG - value: "true" - {{- end }} - {{- if .Values.slave.extraFlags }} - - name: MARIADB_EXTRA_FLAGS - value: "{{ .Values.slave.extraFlags }}" - {{- end }} - - name: MARIADB_REPLICATION_MODE - value: "slave" - - name: MARIADB_MASTER_HOST - value: {{ template "mariadb.fullname" . }} - - name: MARIADB_MASTER_PORT_NUMBER - value: "{{ .Values.service.port }}" - - name: MARIADB_MASTER_ROOT_USER - value: "root" - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_MASTER_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_MASTER_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - - name: MARIADB_REPLICATION_USER - value: "{{ .Values.replication.user }}" - {{- if .Values.replication.injectSecretsAsVolume }} - - name: MARIADB_REPLICATION_PASSWORD_FILE - value: "/opt/bitnami/mariadb/secrets/mariadb-replication-password" - {{- else }} - - name: MARIADB_REPLICATION_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-replication-password - {{- end }} - {{- if .Values.slave.extraEnvVars }} - {{- tpl (toYaml .Values.slave.extraEnvVars) $ | nindent 12 }} - {{- end }} - {{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }} - envFrom: - {{- if .Values.slave.extraEnvVarsCM }} - - configMapRef: - name: {{ .Values.slave.extraEnvVarsCM }} - {{- end }} - {{- if .Values.slave.extraEnvVarsSecret }} - - secretRef: - name: {{ .Values.slave.extraEnvVarsSecret }} - {{- end }} - {{- end }} - ports: - - name: mysql - containerPort: 3306 - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - exec: - command: - - sh - - -c - - | - password_aux="${MARIADB_MASTER_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_MASTER_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_MASTER_ROOT_PASSWORD_FILE) - fi - mysqladmin status -uroot -p$password_aux - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.slave.resources }} - resources: {{ toYaml .Values.slave.resources | nindent 12 }} - {{- end }} - volumeMounts: - - name: data - mountPath: /bitnami/mariadb - {{- if .Values.slave.config }} - - name: config - mountPath: /opt/bitnami/mariadb/conf/my.cnf - subPath: my.cnf - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - mountPath: /opt/bitnami/mariadb/secrets/ - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - image: {{ template "mariadb.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - env: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - name: MARIADB_ROOT_PASSWORD_FILE - value: "/opt/bitnami/mysqld-exporter/secrets/mariadb-root-password" - {{- else }} - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- end }} - command: - - sh - - -c - - | - password_aux="${MARIADB_ROOT_PASSWORD:-}" - if [ -f "${MARIADB_ROOT_PASSWORD_FILE:-}" ]; then - password_aux=$(cat $MARIADB_ROOT_PASSWORD_FILE) - fi - DATA_SOURCE_NAME="root:${password_aux}@(localhost:3306)/" /bin/mysqld_exporter {{- range .Values.metrics.extraArgs.slave }} {{ . }} {{- end }} - ports: - - name: metrics - containerPort: 9104 - {{- if .Values.metrics.livenessProbe.enabled }} - livenessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.readinessProbe.enabled }} - readinessProbe: - httpGet: - path: /metrics - port: metrics - initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} - {{- end }} - {{- if .Values.metrics.resources }} - resources: {{ toYaml .Values.metrics.resources | nindent 12 }} - {{- end }} - {{- if .Values.rootUser.injectSecretsAsVolume }} - volumeMounts: - - name: mariadb-credentials - mountPath: /opt/bitnami/mysqld-exporter/secrets/ - {{- end }} - {{- end }} - volumes: - {{- if .Values.slave.config }} - - name: config - configMap: - name: {{ template "slave.fullname" . }} - {{- end }} - {{- if or .Values.rootUser.injectSecretsAsVolume .Values.replication.injectSecretsAsVolume }} - - name: mariadb-credentials - secret: - secretName: {{ template "mariadb.fullname" . }} - items: - {{- if .Values.rootUser.injectSecretsAsVolume }} - - key: mariadb-root-password - path: mariadb-root-password - {{- end }} - {{- if .Values.replication.injectSecretsAsVolume }} - - key: mariadb-replication-password - path: mariadb-replication-password - {{- end }} - {{- end }} -{{- if not .Values.slave.persistence.enabled }} - - name: "data" - emptyDir: {} -{{- else }} - volumeClaimTemplates: - - metadata: - name: data - labels: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{ include "mariadb.slave.storageClass" . }} -{{- end }} -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/slave-svc.yaml b/bitnami/mariadb/mariadb105/templates/slave-svc.yaml deleted file mode 100644 index 12fa7eb..0000000 --- a/bitnami/mariadb/mariadb105/templates/slave-svc.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.replication.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "slave.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: "{{ template "mariadb.name" . }}" - chart: "{{ template "mariadb.chart" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} -{{- if or .Values.metrics.enabled .Values.slave.service.annotations }} - annotations: -{{- if .Values.metrics.enabled }} -{{ toYaml .Values.metrics.annotations | indent 4 }} -{{- end }} -{{- if .Values.slave.service.annotations }} -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -{{- end }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "ClusterIP" }} - {{- if .Values.service.clusterIp }} - clusterIP: {{ .Values.service.clusterIp.slave }} - {{- end }} - {{- end }} - ports: - - name: mysql - port: {{ .Values.service.port }} - targetPort: mysql - {{- if (eq .Values.service.type "NodePort") }} - {{- if .Values.service.nodePort }} - {{- if .Values.service.nodePort.slave }} - nodePort: {{ .Values.service.nodePort.slave }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9104 - targetPort: metrics - {{- end }} - selector: - app: "{{ template "mariadb.name" . }}" - component: "slave" - release: "{{ .Release.Name }}" -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/test-runner.yaml b/bitnami/mariadb/mariadb105/templates/test-runner.yaml deleted file mode 100644 index bfb64cd..0000000 --- a/bitnami/mariadb/mariadb105/templates/test-runner.yaml +++ /dev/null @@ -1,53 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: Pod -metadata: - name: "{{ template "mariadb.fullname" . }}-test-{{ randAlphaNum 5 | lower }}" - namespace: {{ .Release.Namespace }} - annotations: - "helm.sh/hook": test-success -spec: - initContainers: - - name: "test-framework" - image: {{ template "mariadb.tests.testFramework.image" . }} - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - {{- if .Values.tests.testFramework.resources }} - resources: {{ toYaml .Values.tests.testFramework.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tools - name: tools - containers: - - name: mariadb-test - image: {{ template "mariadb.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - env: - - name: MARIADB_ROOT_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "mariadb.secretName" . }} - key: mariadb-root-password - {{- if .Values.tests.resources }} - resources: {{ toYaml .Values.tests.resources | nindent 8 }} - {{- end }} - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "mariadb.fullname" . }}-tests - - name: tools - emptyDir: {} - restartPolicy: Never -{{- end }} diff --git a/bitnami/mariadb/mariadb105/templates/tests.yaml b/bitnami/mariadb/mariadb105/templates/tests.yaml deleted file mode 100644 index 0da46d5..0000000 --- a/bitnami/mariadb/mariadb105/templates/tests.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.tests.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "mariadb.fullname" . }}-tests - namespace: {{ .Release.Namespace }} -data: - run.sh: |- - @test "Testing MariaDB is accessible" { - mysql -h {{ template "mariadb.fullname" . }} -uroot -p$MARIADB_ROOT_PASSWORD -e 'show databases;' - } -{{- end }} diff --git a/bitnami/mariadb/mariadb105/values-ironbank.yaml b/bitnami/mariadb/mariadb105/values-ironbank.yaml deleted file mode 100644 index 3d2e660..0000000 --- a/bitnami/mariadb/mariadb105/values-ironbank.yaml +++ /dev/null @@ -1,70 +0,0 @@ -image: - repository: registry1.dsop.io/opensource/mariadb - tag: 10.5.4 - pullPolicy: IfNotPresent - debug: false - -volumePermissions: - enabled: false - image: - repository: registry1.dsop.io/redhat/ubi/ubi8 - tag: 8.2 - pullPolicy: Always - -master: - - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - log-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - -slave: - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=127.0.0.1 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - local-infile=0 - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - \ No newline at end of file diff --git a/bitnami/mariadb/mariadb105/values-production.yaml b/bitnami/mariadb/mariadb105/values-production.yaml deleted file mode 100644 index ad2965f..0000000 --- a/bitnami/mariadb/mariadb105/values-production.yaml +++ /dev/null @@ -1,595 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: true - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: true - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -slave: - replicas: 2 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: --max-connect-errors=1000 --max_connections=155" - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - # extraEnvVars: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - -metrics: - enabled: true - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb105/values.schema.json b/bitnami/mariadb/mariadb105/values.schema.json deleted file mode 100644 index b1b72e1..0000000 --- a/bitnami/mariadb/mariadb105/values.schema.json +++ /dev/null @@ -1,169 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "rootUser": { - "type": "object", - "properties": { - "password": { - "type": "string", - "title": "MariaDB admin password", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "db": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "MariaDB custom database", - "description": "Name of the custom database to be created during the 1st initialization of MariaDB", - "form": true - }, - "user": { - "type": "string", - "title": "MariaDB custom user", - "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database", - "form": true - }, - "password": { - "type": "string", - "title": "Password for MariaDB custom user", - "form": true, - "description": "Defaults to a random 10-character alphanumeric string if not set", - "hidden": { - "value": false, - "path": "usePassword" - } - } - } - }, - "replication": { - "type": "object", - "title": "Replication configuration", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable replication configuration" - } - } - }, - "master": { - "type": "object", - "title": "Master replicas settings", - "form": true, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for master replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "slave": { - "type": "object", - "title": "Slave replicas settings", - "form": true, - "hidden": { - "value": false, - "path": "replication/enabled" - }, - "properties": { - "persistence": { - "type": "object", - "title": "Persistence for slave replicas", - "form": true, - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable persistence", - "description": "Enable persistence using Persistent Volume Claims" - }, - "size": { - "type": "string", - "title": "Persistent Volume Size", - "form": true, - "render": "slider", - "sliderMin": 1, - "sliderMax": 100, - "sliderUnit": "Gi", - "hidden": { - "value": false, - "path": "persistence/enabled" - } - } - } - } - } - }, - "volumePermissions": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "form": true, - "title": "Enable Init Containers", - "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination" - } - } - }, - "metrics": { - "type": "object", - "form": true, - "title": "Prometheus metrics details", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus metrics exporter", - "description": "Create a side-car container to expose Prometheus metrics", - "form": true - }, - "serviceMonitor": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "title": "Create Prometheus Operator ServiceMonitor", - "description": "Create a ServiceMonitor to track metrics using Prometheus Operator", - "form": true, - "hidden": { - "value": false, - "path": "metrics/enabled" - } - } - } - } - } - } - } -} diff --git a/bitnami/mariadb/mariadb105/values.yaml b/bitnami/mariadb/mariadb105/values.yaml deleted file mode 100644 index 0a678ee..0000000 --- a/bitnami/mariadb/mariadb105/values.yaml +++ /dev/null @@ -1,583 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName -# storageClass: myStorageClass - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Bitnami MariaDB image -## ref: https://hub.docker.com/r/bitnami/mariadb/tags/ -## -image: - registry: docker.io - repository: bitnami/mariadb - tag: 10.3.23-debian-10-r44 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - ## Set to true if you would like to see extra information on logs - ## It turns BASH and NAMI debugging in minideb - ## ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging - debug: false - -## String to partially override mariadb.fullname template (will maintain the release name) -## -# nameOverride: - -## String to fully override mariadb.fullname template -## -# fullnameOverride: - -## Additional pod labels -## -# podLabels: - # extraLabel: extraValue - -## Init containers parameters: -## volumePermissions: Change the owner and group of the persistent volume mountpoint to runAsUser:fsGroup values from the securityContext section. -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: buster - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - -service: - ## Kubernetes service type, ClusterIP and NodePort are supported at present - type: ClusterIP - # clusterIp: - # master: xx.xx.xx.xx - # slave: xx.xx.xx.xx - port: 3306 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - # master: 30001 - # slave: 30002 - -## Pods Service Account -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the mariadb.fullname template - # name: - -## Role Based Access -## Ref: https://kubernetes.io/docs/admin/authorization/rbac/ -## -rbac: - create: false - -## Pod Security Context -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ -## -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use existing secret (ignores root, db and replication passwords) -## -# existingSecret: - -## MariaDB admin credentials -## -rootUser: - ## MariaDB admin password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount admin password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Custom user/db credentials -## -db: - ## MariaDB username and password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-user-on-first-run - ## - user: "" - password: "" - ## Database to create - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#creating-a-database-on-first-run - ## - name: my_database - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## Replication configuration -## -replication: - ## Enable replication. This enables the creation of replicas of MariaDB. If false, only a - ## master deployment would be created - ## - enabled: true - ## MariaDB replication user - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - user: replicator - ## MariaDB replication user password - ## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster - ## - password: "" - ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly. - ## If it is not force, a random password will be generated. - ## - forcePassword: false - ## Mount replication user password as a file instead of using an environment variable - ## - injectSecretsAsVolume: false - -## initdb scripts -## Specify dictionary of scripts to be run at first boot -## Alternatively, you can put your scripts under the files/docker-entrypoint-initdb.d directory -## -# initdbScripts: -# my_init_script.sh: | -# #!/bin/sh -# echo "Do something." -# -## ConfigMap with scripts to be run at first boot -## Note: This will override initdbScripts -# initdbScriptsConfigMap: - -master: - ## Mariadb Master additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through master.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Master StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # Enable persistence using an existing PVC - # existingClaim: - # Subdirectory of the volume to mount - # subPath: - mountPath: /bitnami/mariadb - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - ## Persistent Volume Claim annotations - ## - annotations: {} - ## Persistent Volume Access Mode - ## - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init Containers (evaluated as a templ - ## - extraInitContainers: [] - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - plugin_dir=/opt/bitnami/mariadb/plugin - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - plugin_dir=/opt/bitnami/mariadb/plugin - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## Configure master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: db.example.com - -slave: - replicas: 1 - - ## Mariadb Slave additional pod annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # key: value - # another-key: another-value - - ## MariaDB additional command line flags - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: "--max-connect-errors=1000 --max_connections=155" - - ## Affinity for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## - affinity: {} - - ## Kept for backwards compatibility. You can now disable it by removing it. - ## if you wish to set it through slave.affinity.podAntiAffinity instead. - ## - antiAffinity: soft - - ## Node labels for pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Tolerations for pod assignment - ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - ## - tolerations: [] - - ## updateStrategy for MariaDB Slave StatefulSet - ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies - updateStrategy: - type: RollingUpdate - - persistence: - ## If true, use a Persistent Volume Claim, If false, use emptyDir - ## - enabled: true - # storageClass: "-" - annotations: - accessModes: - - ReadWriteOnce - ## Persistent Volume size - ## - size: 8Gi - - ## Add extra init containers - ## - extraInitContainers: - - ## An array to add extra environment variables - ## For example: - ## extraEnvVars: - ## - name: TZ - ## value: "Europe/Paris" - ## - extraEnvVars: - - ## ConfigMap with extra env vars: - ## - extraEnvVarsCM: - - ## Secret with extra env vars: - ## - extraEnvVarsSecret: - - ## Configure MySQL slave with a custom my.cnf file - ## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file - ## - config: |- - [mysqld] - skip-name-resolve - explicit_defaults_for_timestamp - basedir=/opt/bitnami/mariadb - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - tmpdir=/opt/bitnami/mariadb/tmp - max_allowed_packet=16M - bind-address=0.0.0.0 - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - log-error=/opt/bitnami/mariadb/logs/mysqld.log - character-set-server=UTF8 - collation-server=utf8_general_ci - - [client] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - default-character-set=UTF8 - - [manager] - port=3306 - socket=/opt/bitnami/mariadb/tmp/mysql.sock - pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid - - ## - ## Configure slave resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 45 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - podDisruptionBudget: - enabled: false - minAvailable: 1 - # maxUnavailable: 1 - - ## Allow customization of the service resource - ## - service: - ## Add custom annotations to the service - ## - annotations: {} - # external-dns.alpha.kubernetes.io/hostname: rodb.example.com - -metrics: - enabled: false - image: - registry: docker.io - repository: bitnami/mysqld-exporter - tag: 0.12.1-debian-10-r146 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9104" - - ## Extra args to be passed to mysqld_exporter - ## ref: https://github.com/prometheus/mysqld_exporter/ - ## - extraArgs: - master: [] - slave: [] - # - --collect.auto_increment.columns - # - --collect.binlog_size - # - --collect.engine_innodb_status - # - --collect.engine_tokudb_status - # - --collect.global_status - # - --collect.global_variables - # - --collect.info_schema.clientstats - # - --collect.info_schema.innodb_metrics - # - --collect.info_schema.innodb_tablespaces - # - --collect.info_schema.innodb_cmp - # - --collect.info_schema.innodb_cmpmem - # - --collect.info_schema.processlist - # - --collect.info_schema.processlist.min_time - # - --collect.info_schema.query_response_time - # - --collect.info_schema.tables - # - --collect.info_schema.tables.databases - # - --collect.info_schema.tablestats - # - --collect.info_schema.userstats - # - --collect.perf_schema.eventsstatements - # - --collect.perf_schema.eventsstatements.digest_text_limit - # - --collect.perf_schema.eventsstatements.limit - # - --collect.perf_schema.eventsstatements.timelimit - # - --collect.perf_schema.eventswaits - # - --collect.perf_schema.file_events - # - --collect.perf_schema.file_instances - # - --collect.perf_schema.indexiowaits - # - --collect.perf_schema.tableiowaits - # - --collect.perf_schema.tablelocks - # - --collect.perf_schema.replication_group_member_stats - # - --collect.slave_status - # - --collect.slave_hosts - # - --collect.heartbeat - # - --collect.heartbeat.database - # - --collect.heartbeat.table - - livenessProbe: - enabled: true - ## - ## Initializing the database could take some time - initialDelaySeconds: 120 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - readinessProbe: - enabled: true - initialDelaySeconds: 30 - ## - ## Default Kubernetes values - periodSeconds: 10 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 3 - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - # scrapeTimeout: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -## Bats Framework (= Bash Automated Testing System) is needed to test if MariaDB is accessible -## See test-runner.yaml and tests.yaml for details. -## To run the tests after the deployment, enter "helm test ". -tests: - enabled: true - resources: {} - testFramework: - image: - registry: docker.io - repository: dduportal/bats - tag: 0.4.0 - resources: {} diff --git a/bitnami/mariadb/mariadb101/templates/NOTES.txt b/bitnami/mariadb/templates/NOTES.txt similarity index 100% rename from bitnami/mariadb/mariadb101/templates/NOTES.txt rename to bitnami/mariadb/templates/NOTES.txt diff --git a/bitnami/mariadb/mariadb101/templates/_helpers.tpl b/bitnami/mariadb/templates/_helpers.tpl similarity index 100% rename from bitnami/mariadb/mariadb101/templates/_helpers.tpl rename to bitnami/mariadb/templates/_helpers.tpl diff --git a/bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml b/bitnami/mariadb/templates/initialization-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/initialization-configmap.yaml rename to bitnami/mariadb/templates/initialization-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-configmap.yaml b/bitnami/mariadb/templates/master-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-configmap.yaml rename to bitnami/mariadb/templates/master-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-pdb.yaml b/bitnami/mariadb/templates/master-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-pdb.yaml rename to bitnami/mariadb/templates/master-pdb.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-statefulset.yaml b/bitnami/mariadb/templates/master-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-statefulset.yaml rename to bitnami/mariadb/templates/master-statefulset.yaml diff --git a/bitnami/mariadb/mariadb101/templates/master-svc.yaml b/bitnami/mariadb/templates/master-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/master-svc.yaml rename to bitnami/mariadb/templates/master-svc.yaml diff --git a/bitnami/mariadb/mariadb101/templates/role.yaml b/bitnami/mariadb/templates/role.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/role.yaml rename to bitnami/mariadb/templates/role.yaml diff --git a/bitnami/mariadb/mariadb101/templates/rolebinding.yaml b/bitnami/mariadb/templates/rolebinding.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/rolebinding.yaml rename to bitnami/mariadb/templates/rolebinding.yaml diff --git a/bitnami/mariadb/mariadb101/templates/secrets.yaml b/bitnami/mariadb/templates/secrets.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/secrets.yaml rename to bitnami/mariadb/templates/secrets.yaml diff --git a/bitnami/mariadb/mariadb101/templates/serviceaccount.yaml b/bitnami/mariadb/templates/serviceaccount.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/serviceaccount.yaml rename to bitnami/mariadb/templates/serviceaccount.yaml diff --git a/bitnami/mariadb/mariadb101/templates/servicemonitor.yaml b/bitnami/mariadb/templates/servicemonitor.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/servicemonitor.yaml rename to bitnami/mariadb/templates/servicemonitor.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-configmap.yaml b/bitnami/mariadb/templates/slave-configmap.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-configmap.yaml rename to bitnami/mariadb/templates/slave-configmap.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-pdb.yaml b/bitnami/mariadb/templates/slave-pdb.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-pdb.yaml rename to bitnami/mariadb/templates/slave-pdb.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml b/bitnami/mariadb/templates/slave-statefulset.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-statefulset.yaml rename to bitnami/mariadb/templates/slave-statefulset.yaml diff --git a/bitnami/mariadb/mariadb101/templates/slave-svc.yaml b/bitnami/mariadb/templates/slave-svc.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/slave-svc.yaml rename to bitnami/mariadb/templates/slave-svc.yaml diff --git a/bitnami/mariadb/mariadb101/templates/test-runner.yaml b/bitnami/mariadb/templates/test-runner.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/test-runner.yaml rename to bitnami/mariadb/templates/test-runner.yaml diff --git a/bitnami/mariadb/mariadb101/templates/tests.yaml b/bitnami/mariadb/templates/tests.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/templates/tests.yaml rename to bitnami/mariadb/templates/tests.yaml diff --git a/bitnami/mariadb/mariadb103/values-ironbank.yaml b/bitnami/mariadb/values-ironbank.yaml similarity index 98% rename from bitnami/mariadb/mariadb103/values-ironbank.yaml rename to bitnami/mariadb/values-ironbank.yaml index 826520a..2cae891 100644 --- a/bitnami/mariadb/mariadb103/values-ironbank.yaml +++ b/bitnami/mariadb/values-ironbank.yaml @@ -1,6 +1,6 @@ image: repository: registry1.dsop.io/opensource/mariadb - tag: 10.3.23 + tag: SPECIFY_THIS pullPolicy: IfNotPresent debug: false diff --git a/bitnami/mariadb/mariadb101/values-production.yaml b/bitnami/mariadb/values-production.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/values-production.yaml rename to bitnami/mariadb/values-production.yaml diff --git a/bitnami/mariadb/mariadb101/values.schema.json b/bitnami/mariadb/values.schema.json similarity index 100% rename from bitnami/mariadb/mariadb101/values.schema.json rename to bitnami/mariadb/values.schema.json diff --git a/bitnami/mariadb/mariadb101/values.yaml b/bitnami/mariadb/values.yaml similarity index 100% rename from bitnami/mariadb/mariadb101/values.yaml rename to bitnami/mariadb/values.yaml -- GitLab From b8854e15de799f0a39857b8dea6a1702a65f072f Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 19:22:51 +0000 Subject: [PATCH 28/31] Delete .DS_Store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index cdee7dd1e6172a05cdb2e9d349e30fa6b566bc72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!EO^V5FNK6b%GE%AhkzdkT^srC50Xk(l(@r9*_`=-~g!IWh1iEc3tgmh)M|B z-+({hQ}_Zt2j18QH3{X=145BU8o#k;#w$PXj@Lva29so$s6#{&%GhY5`Gc^ZbwxJZ z2s?$DBcfAEk23u>&Q_xRfM>un@V_y@-|iO0lu|`GUHE==3=fxuhtNAejKErnj;G~W zoSEov@mZFZRj>D5Y-~2JHMgW}%l3`-n{ceBVHH)Aau5}-xc4-w#<8=XYn}bJqxeNS znjUv@rTM5Z$!Rh|$m^GBp6Ka7Px7QR^MuwRWlOe>J3F&kzkk20`g`~0T{YX^ z?{(E)|G|9TlH0d;A03^Xo`0BqoPYXk7D56=%g9ZKzu*guB~sppMV{&W9Xy=Xq%p`U zK%Az+7Q9OdYtb`0qyrk#6X0Ex$Yd$wD`vb%ag$1HM}*lk8ZE|(?Z3sY>t-wvva}W8 z!^@QzaIe3-ex+=m?-L;eiO7 z3bd)hT``1B$GCEFfy3IOO()?lAHqFZxEqQvPsjYqgp&v?`qnex8CYas({?+2{vTd` z|6feo+QM>~+0-s_77&xpg SVg%xU1Pl$n@eKS^27UsZ -- GitLab From 817e43919a5afaa194b28671008fec57faaae049 Mon Sep 17 00:00:00 2001 From: Michael Simmons Date: Mon, 20 Jul 2020 19:22:59 +0000 Subject: [PATCH 29/31] Delete .DS_Store --- bitnami/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/.DS_Store diff --git a/bitnami/.DS_Store b/bitnami/.DS_Store deleted file mode 100644 index 7ac0805f404699f5ac7a5599b6f34a8540691f6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%}T>S5T317w-vDmL63V8JoHelKL-&))q^)7q6ZaCOwmBhN}F1=R`MG9Mm~X$ zqcgkPf>w`;$_&hWli8U~_Dk5!0Dx$8q9uR|07z8ALJ7?$LgS<(QgD$mL}BI#AcAl= z(dS_@lFfnN$N;^&Nw|UlS`echzCRt}2z?eCsEe;g&>P7PyY1^RG1<@IbrQF;TJ1#? z#){(;lTwytdAfY!U+S)(1zD%v2wF#UwHIWUq4W2(PKJIE9>mS=X=Qdxr&$oE&6X*S zqb8;tAI52C~V`e~#Z< Date: Mon, 20 Jul 2020 19:23:20 +0000 Subject: [PATCH 30/31] Delete .DS_Store --- bitnami/mariadb/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 bitnami/mariadb/.DS_Store diff --git a/bitnami/mariadb/.DS_Store b/bitnami/mariadb/.DS_Store deleted file mode 100644 index 38f1476950a8370831610d770d04ada9fda2cc96..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK!A{#i5S@h-HbxaWR3gW{RO%sz1P3@EBrAjiHzZf>p{>BKBd}z=C~+FKA(b!v z2>1g&g)iub^aI+N-6>K+P!R`IMLW{$o86hW);`(0UH}lCVbTJq0f0m&ta#YWG0KzQ zvn3u`MHFU^2oi{)1x<8kP64OD|E>UiyB?fF1bs-cz59L-GyOTvbc}i09Cp#){5FQs z1Dtp?xM0q0e37MtqS^c@mX<3oR#v6-r1#SM6rSl(SVYBe(24pVsCN_KvZ zHQw22HdNc+o=mE8<8^EA@Z|jKxAEoV`;}P^2;9Jotuy|GYYgTJ^d;=)na)o!PuzJm zn=>NbVBNn&^rtyu;}M+p4CluqI9oHEUo#x+I$LZ7_?4Gyi@i*@I;VhB;0X%Q{-Dqa z1IE&#**dT>R{+Ec4jaRmeiw+N7z4)AB4*Hpr6O9Y;46l(bR1V)7ciC-Dm{vSMi|DPtgo>Ranuuuw!N;m9wa7lc&-dh}< uwF> Date: Mon, 20 Jul 2020 13:43:31 -0600 Subject: [PATCH 31/31] Added tag --- bitnami/mariadb/values-ironbank.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitnami/mariadb/values-ironbank.yaml b/bitnami/mariadb/values-ironbank.yaml index 2cae891..3d2e660 100644 --- a/bitnami/mariadb/values-ironbank.yaml +++ b/bitnami/mariadb/values-ironbank.yaml @@ -1,6 +1,6 @@ image: repository: registry1.dsop.io/opensource/mariadb - tag: SPECIFY_THIS + tag: 10.5.4 pullPolicy: IfNotPresent debug: false -- GitLab