Commit Graph

34 Commits

Author SHA1 Message Date
Dan P. 66f321dc77
Implement new Config system (#50)
* 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>
2025-10-21 11:05:59 -04:00
Dan P. a1d57bc3bb
General refactors fixes (#49)
* 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>
2025-10-13 16:14:16 -04:00
Dan P. a9cbb61fd5
Improve failed registration logging and logic (#47)
* 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
2025-09-26 11:29:39 -04:00
Dan P. 17c4b29d68
Improve logging (#42)
* Change empty login to debug level and improve text

* Adjust logs levels and text clarity
2025-09-23 14:09:42 -04:00
Diogo Souza acc11ae99c
Merge pull request #40 from diogoasouza/issue-28
using namehash instead of contenthash to fetch registration when deleting
2025-09-23 11:43:43 -03:00
Dan P. 695a0a256d
Minor Refactors: Improve readability of controller logic (#39)
* Small code refactor to invert logic check

* nit: do less in init

* Correct Watcher to only watch Secrets
2025-09-16 21:37:19 -04:00
Diogo Souza e960103768
using namehash instead of contenthash to fetch registration when deleting 2025-09-15 20:57:58 -03:00
Julia Bier f09db1d227 fix: have condition message as const 2025-09-08 11:22:32 -04:00
Julia Bier 49bb58b87c fix: reset offline registration when certificate is removed from entrypoint secret 2025-09-05 16:15:38 -04:00
Dan P. 643722bf46
Merge pull request #17 from mallardduck/canonical-status-condition
[main] Add field for canonical status condition
2025-08-12 10:08:47 -04:00
Dan Pock fe7e88d392 Fix nil access causing lots of logs 2025-08-11 16:07:04 -04:00
Dan Pock d351f0f3af Add and utilize new helper to track "currentCondition" value 2025-08-11 14:30:27 -04:00
Dan Pock e8197040f3 Also set Activated condition to false to match SyncNow logic 2025-08-08 14:13:57 -04:00
Dan Pock 22640a094b Add initial basic health/ready check 2025-08-07 21:06:04 -04:00
Dan Pock 0b036fe857 fix CI 2025-08-07 21:01:39 -04:00
Dan Pock 6ae90ee548 Clean up offline validator 2025-08-07 20:52:50 -04:00
Dan Pock 9a4fd4b4c2 Fix bug with SCC Dereg race condition 2025-08-07 20:36:53 -04:00
Dan Pock 74952952fb MVP: working Online telemetry 2025-08-07 20:21:26 -04:00
Dan Pock 27d488e513 Refactor to use RunOptions consistently thru controller 2025-08-07 18:31:22 -04:00
Dan Pock ecfa5dc846 Refactor wrangler polyfill 2025-08-07 11:37:19 -04:00
Dan Pock 21a1c59930 Remove built-in telemetry 2025-08-07 00:57:54 -04:00
Dan Pock 73a0cec8f3 use more meaningful names where needed 2025-07-30 19:43:30 -04:00
Dan Pock 8d78731c42 Cleanup code to make CI happy 2025-07-30 19:33:07 -04:00
Dan Pock 968ac1f125 mass clean goimports 2025-07-30 17:59:52 -04:00
Dan Pock 08fe316cb3 Make the Registration controllers scoped to the operators "shouldManage" items 2025-07-30 17:11:17 -04:00
Dan Pock a983dc2690 refactor Ownership helpers and add tests 2025-07-30 16:25:40 -04:00
Dan Pock c87730bcdf track operator managed-by for entrypoint secrets 2025-07-29 19:34:58 -04:00
Dan Pock 4a45013d09 refactor: adjust scoped controller defs 2025-07-29 19:23:58 -04:00
Dan Pock 8bf9f34b1f refactor: move wrangler polyfills to dedicated file 2025-07-29 19:23:58 -04:00
Dan Pock 1e2de34d38 Rename `rancher-sandbox` to `rancher` 2025-07-21 12:53:04 -04:00
Dan Pock 84809f2d96 finish MVP standalone operator 2025-07-17 14:04:11 -04:00
Dan Pock f46d774b48 Add back setting based features and infoProvider 2025-07-16 18:31:02 -04:00
Dan Pock f3918e421b Bring in core SCC code minus r/r core dependent parts 2025-07-15 21:47:28 -04:00
Dan Pock 5f5493ec4a Add core SCC operator foundation 2025-07-15 19:16:50 -04:00