Commit Graph

163 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
Diogo Souza f9fb21a280
Merge pull request #54 from diogoasouza/fix-finalizer-patch
Retry on finalizer conflict
2025-10-08 10:51:45 -03:00
Diogo Souza f19fc09bd3
retry on finalizer conflict 2025-10-07 20:52:09 -03:00
Samuel Vasconcelos e79d181106
Merge pull request #52 from susesamu/ci-improve
add staling and labeling workflows
2025-10-01 18:09:29 -03:00
Samuel Vasconcelos 27c6f9f1f6 add staling and labeling workflows 2025-10-01 17:51:46 -03: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. c56087fbb9
[ci] Fix codeowners (#44)
* Move codeowner to GH folder for cleaner root

* Fix team name
2025-09-24 14:19:58 -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 2fc347ea16
Merge pull request #37 from jbiers/fix-resetting-registration
[main] reset offline registration when certificate is removed from entrypoint secret
2025-09-08 12:49:27 -04: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. 66f464bc2b
[ci] Improve initializer dx and testing (#31)
* Add tests to cover Initializer

* Add tests for contexthelpers

* Add tests for consts

* Add tests only method for overriding contexthelpers
2025-08-29 14:35:55 -04:00
Dan P. 63b5b51678
Fix Workflow name for other org processes (#35) 2025-08-29 14:12:04 -04:00
Dan P. ed4dcd4db0
Merge pull request #33 from mallardduck/hotfix-rancherversion-prefix
[main] Correct bug where Rancher "product version" includes a "v" prefix
2025-08-29 09:26:53 -04:00
Dan Pock 1d223d27be Add unit tests and modify fix method 2025-08-29 09:24:49 -04:00
Dan Pock 8b14cbb753 Ensure that Metrics wrapper handles Rancher version translation for SCC product 2025-08-29 09:08:50 -04:00
Dan P. 14b6bfc38e
Merge pull request #30 from mallardduck/secret-repo-units
[ci] Add more unit tests
2025-08-28 14:58:26 -04:00
Dan Pock 0d8139511f Add units for settings helper too 2025-08-28 12:00:30 -04:00
Dan Pock 9661f2020b Add units to cover secrets repo code 2025-08-28 11:36:04 -04:00
Dan P. 01c808cc02
Merge pull request #23 from mallardduck/main-devmode-fix
[main] Add fix for SCC Operator DevMode context
2025-08-26 23:11:54 -04:00
Dan Pock 91cd08d146 cleanup logic around Log Level setting 2025-08-26 10:47:41 -04:00
Dan Pock bf0f74b7c8 Correct log typo 2025-08-26 10:46:53 -04:00
Dan Pock 14be8fd2d8 Add fix for SCC Operator DevMode context 2025-08-26 10:44:57 -04:00
Samuel Vasconcelos ff58507426
Merge pull request #21 from susesamu/51449
[main] fix default reference to the operator name and namespace
2025-08-19 11:07:28 -03:00
Samuel Vasconcelos 6a6600a4cd fix MetricsSecret reference to the namespace 2025-08-18 12:29:45 -03:00
Samuel Vasconcelos 3805dd3d36 fix sccStarter incorrect reference to the operator name 2025-08-15 16:21:13 -03:00
Dan P. 727474e808
Merge pull request #20 from mallardduck/scc-library-update
Bump to newest SCC library
2025-08-14 08:21:16 -04:00
Dan Pock f184a1f937 Bump to newest SCC library 2025-08-14 08:13:03 -04:00
Dan P. 1d905a1188
Merge pull request #19 from jbiers/dereference-logger-pointers
[main] Dereference string pointers in logger
2025-08-12 11:21:13 -04:00
Julia Bier 0fb184d3ba dereference-logger-string-pointers 2025-08-12 11:13:31 -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 P. 5970869d42
Merge pull request #18 from mallardduck/fix-nil-accessor
[main] Fix nil access causing lots of logs
2025-08-11 16:37:17 -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 7be02b6c79 Add new status field for "currentConditoin" to improve UI 2025-08-11 14:03:11 -04:00
Dan P. 7162e76d18
Merge pull request #16 from mallardduck/ci-name-fixes
[ci] Correct GHA job title
2025-08-08 17:43:48 -04:00
Dan Pock b610be3707 Correct GHA job title 2025-08-08 14:32:47 -04:00
Dan P. ceeb682bd8
Merge pull request #15 from mallardduck/fix-rancherurl-scc
[main] Fix RancherURL used with SCC
2025-08-08 14:17:33 -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 e43068691c Correct bug with Online mode using RegistrationURL for RancherURL 2025-08-08 14:13:57 -04:00
Dan P. 55c84c940c
Merge pull request #14 from mallardduck/telemetry-secret-broker
[main] feat: Implement the `r/r` SecretRequest based telemetry & add health check
2025-08-08 12:55:26 -04:00
Dan Pock 58d4dcffc6 Add codeowners file 2025-08-08 10:13:29 -04:00
Dan Pock cb13fbb0b7 Fix offline reg request 2025-08-07 23:17:24 -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