* Add new config tooling
* Adopt new Env/Flag/ConfigMap based config system across operator
- CI flag is intentionally mapped to "override" without that in the flag
* Split up Cattle/Rancher DevMode and SCC Operator's DevMode
* Make fatal config init more obvious
* fix linter
* Add more rancher-bias TODOs
* Update internal/config/resolver.go
Co-authored-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
* add SetConfigMapData to resolver to make things more testable
* Correct wip version of flag logic and fix flag value bug
* refactor: adjust Option to use default from initial creation and remove from getter
---------
Co-authored-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
* clean up jitterbug to use correct log builder strategy
* refactor: code re-org
* refactor: scc URL consts and add bias notes
* Adjust logger to correct component context
* refactor: remove the SystemNamespace context initializer
This initializer is now redundant with how the config settings work. It was only actually used (to fetch the value) in a few spots.
So ultimately we were already circumventing it a lot and the new mechanism should work just as well without it.
* refactor: adjust helpers structure
* Fix refactor bug
* Update pkg/controllers/helpers/ownership.go
Co-authored-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
* Correct ownership helper issues per Sam feedback
* small refactors
* Update pkg/controllers/helpers/ownership.go
Co-authored-by: Diogo Souza <diogo.souza@suse.com>
* fix test nit
---------
Co-authored-by: Samuel Vasconcelos <samuel.vasconcelos@suse.com>
Co-authored-by: Diogo Souza <diogo.souza@suse.com>
* Improve the RegistrationIsFailed error logs and prevent infinite re-queue of failed objects
* Fix namespace in-case using custom setting
* only use additional failure context when currentCondition is set