-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
K8SPSMDB-780: Unsafe improvements (#1504)
* K8SPSMDB-780: Unsafe flags These changes attempt to fix the overloaded `allowUnsafeConfigurations` flag. In previous implementation, `allowUnsafeConfigurations` wasn't just allow unsafe configuration but make everything unsafe by disabling TLS, allowing backups in unhealthy clusters, etc... without user's explicit intent. With these changes, we decouple those things from the unsafe flag and remove all implicit behaviors. We introduce a new section called `unsafeFlags`: ``` unsafeFlags: tls: false replsetSize: false mongosSize: false terminationGracePeriod: false backupIfUnhealthy: false ``` Starting from `v1.16.0`, `allowUnsafeConfigurations` is deprecated and won't have any affect. **TLS Mode** This decoupling required a special attention to the TLS configuration. Before these changes only way to disable TLS is setting `allowUnsafeConfigurations` to true. Now, we introduce a new field: ``` spec: tls: mode: disabled ``` This field accepts the following values: `disabled`, `allowTLS`, `preferTLS` and `requireTLS`. If user sets mode to `disabled`, the operator will throw an error: `TLS must be enabled. Set spec.unsafeFlags.tls to true to disable this check.` Since the use of TLS flags and reconciling TLS secrets depends on `tls.mode` field, we need to block users to set `net.tls.mode` in custom MongoDB configuration. If user sets a custom configuration like: ``` spec: replsets: - name: rs0 size: 3 configuration: | net: tls: mode: allowTLS ``` the operator will throw an error: `tlsMode must be set using spec.tls.mode`. * fix tests * fix tests * fix tests * fix tests * fix tests * fix pvc-resize * fix custom-replset-name * address review comments * fix cluster deletion * comment unsafe flags
- Loading branch information
Showing
195 changed files
with
980 additions
and
486 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
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
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
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
Oops, something went wrong.