-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to merge users.txt file into bootstrap.yaml (#265)
This adds a routine to merge the supuser secrets into the bootstrap.yaml read when performing post install/update jobs. This is needed due to the bootstrap user additions added in [this commit](redpanda-data/helm-charts@081c08b#diff-84c6555620e4e5f79262384a9fa3e8f4876b36bb3a64748cbd8fbdcb66e8c1b9R247) causing redpanda-data/helm-charts#1566. What is essentially occuring is this: 1. When creating a bootstrap user via the `REDPANDA_BOOTSTRAP_USER` environment variable said user isn't marked automatically as a superuser 2. If you want to use something like `admin_api_require_auth` then the _only_ way you can actually run management operations on your installation is to pass in the above user in to the nodes' `bootstrap.yaml` so that the user is immediately marked as a superuser and all of the config-watcher scripts that manage other specified users can leverage it to create the rest of the users. 3. The bootstrap user changes that added the user to `bootstrap.yaml` uncovered that setting any sort of `superusers` values in the bootstrap.yaml is incompatible with the users created by a pre-existing users secret. This is due to the `superusers` entry found in the bootstrap.yaml not containing them. When an upgrade finishes the jobs reset the configuration to only contain what is found in `superusers` without regard to anything managed by the pre-existing secret/config-watcher. 4. The above manifested in all users from a pre-existing secret getting unmarked as superusers when an upgrade occurred. Restarting any StatefulSet pod clears this up. Since we _must_ still set the bootstrap user in the `superusers` section of `bootstrap.yaml` in order for `admin_api_require_auth` to function correctly on installations, this makes the config synchronization code aware of our users secret. It needs to be coupled with a change in the `helm-charts` code to add in a `--users-directory` flag as needed and an additional secrets mount to mount the users secret into our job containers.
- Loading branch information
1 parent
60373ad
commit deb4a85
Showing
2 changed files
with
143 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters