Commit 19d7955
committed
use system MariaDBAccount for the galera server's root pw
This commit ties together the previous ones to create a new
MariaDBAccount when a Galera instance is created, and then to
use the password from that account/secret in the mariadb
bootstrap/maintenance scripts.
Galera gets bootstrapped with this secret, then the mariadbaccount
controller, who is waiting for galera to be available to set up this
new "root" account, wakes up when galera is running, and changes
the root password to itself, establishing the initial job hash
for the mariadbaccount.
As we now have a mariadbaccount linked to the outermost lifecycle
of a galera instance, some hardening of the deletion process has been
added to clarify that mariadbaccount will run deletion jobs only if
Galera is not marked for deletion. If galera is marked for deletion,
then we have to assume the service/pods are gone and no more drops can
take place, even if the Galera CR is still present (chainsaw
conveniently adds its own finalizer to Galera when running, preventing
it from being fully deleted, which exposed this issue).1 parent 4174fa8 commit 19d7955
File tree
17 files changed
+351
-62
lines changed- api
- bases
- v1beta1
- config/crd/bases
- controllers
- templates/galera/bin
- tests
- chainsaw/common
- kuttl
- common
- tests
- account_create
- create_system_account
- database_create
- galera_deploy_external_tls
- galera_log_to_disk
17 files changed
+351
-62
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
140 | 147 | | |
141 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
| |||
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
180 | | - | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| |||
296 | 305 | | |
297 | 306 | | |
298 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
299 | 311 | | |
300 | 312 | | |
301 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| |||
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
| |||
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
116 | 129 | | |
117 | 130 | | |
118 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
544 | 588 | | |
545 | 589 | | |
546 | 590 | | |
| |||
572 | 616 | | |
573 | 617 | | |
574 | 618 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | 619 | | |
596 | 620 | | |
597 | 621 | | |
| |||
811 | 835 | | |
812 | 836 | | |
813 | 837 | | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
814 | 864 | | |
815 | 865 | | |
816 | 866 | | |
| |||
822 | 872 | | |
823 | 873 | | |
824 | 874 | | |
825 | | - | |
826 | | - | |
827 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
828 | 889 | | |
829 | 890 | | |
830 | 891 | | |
| |||
837 | 898 | | |
838 | 899 | | |
839 | 900 | | |
840 | | - | |
841 | | - | |
842 | | - | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
843 | 905 | | |
844 | 906 | | |
845 | 907 | | |
| |||
849 | 911 | | |
850 | 912 | | |
851 | 913 | | |
| 914 | + | |
852 | 915 | | |
853 | 916 | | |
854 | 917 | | |
| |||
858 | 921 | | |
859 | 922 | | |
860 | 923 | | |
861 | | - | |
862 | | - | |
863 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
864 | 932 | | |
865 | 933 | | |
866 | 934 | | |
| |||
874 | 942 | | |
875 | 943 | | |
876 | 944 | | |
877 | | - | |
| 945 | + | |
878 | 946 | | |
879 | 947 | | |
880 | 948 | | |
| |||
890 | 958 | | |
891 | 959 | | |
892 | 960 | | |
| 961 | + | |
893 | 962 | | |
894 | 963 | | |
895 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
140 | 147 | | |
141 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
| |||
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
180 | | - | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| |||
296 | 305 | | |
297 | 306 | | |
298 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
299 | 311 | | |
300 | 312 | | |
301 | 313 | | |
| |||
0 commit comments