Commit Graph

22 Commits

Author SHA1 Message Date
Qing Hao
c516beffa6 Add addon conversion webhook for v1alpha1/v1beta1 API migration (#1289)
Some checks failed
Post / images (amd64, addon-manager) (push) Failing after 46s
Post / images (amd64, placement) (push) Failing after 41s
Post / images (amd64, registration-operator) (push) Failing after 39s
Post / images (amd64, work) (push) Failing after 42s
Post / images (arm64, addon-manager) (push) Failing after 39s
Post / images (arm64, placement) (push) Failing after 39s
Post / images (arm64, registration) (push) Failing after 40s
Post / images (arm64, registration-operator) (push) Failing after 42s
Post / images (arm64, work) (push) Failing after 39s
Post / images (amd64, registration) (push) Failing after 7m46s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 14m33s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m25s
Close stale issues and PRs / stale (push) Successful in 46s
* Add addon conversion webhook for v1alpha1/v1beta1 API migration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Qing Hao <qhao@redhat.com>

* Fix GroupVersion compatibility issues after API dependency update

This commit fixes compilation and test errors introduced by updating
the API dependency to use native conversion functions from PR #411.

Changes include:

1. Fix GroupVersion type mismatches across the codebase:
   - Updated OwnerReference creation to use schema.GroupVersion
   - Fixed webhook scheme registration to use proper GroupVersion type
   - Applied fixes to addon, placement, migration, work, and registration controllers

2. Enhance addon conversion webhook:
   - Use native API conversion functions from addon/v1beta1/conversion.go
   - Fix InstallNamespace annotation key to match expected format
   - Add custom logic to populate deprecated ConfigReferent field in ConfigReferences
   - Properly preserve annotations during v1alpha1 <-> v1beta1 conversion

3. Remove duplicate conversion code:
   - Deleted pkg/addon/webhook/conversion/ directory (~500 lines)
   - Now using native conversion functions from the API repository

4. Patch vendored addon-framework:
   - Fixed GroupVersion errors in agentdeploy utils

All unit tests pass successfully (97 packages, 0 failures).

Signed-off-by: Qing Hao <qhao@redhat.com>

---------

Signed-off-by: Qing Hao <qhao@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-24 08:26:35 +00:00
Wei Liu
405adb61cd starting grpc server with config file (#1071)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-07-16 02:13:37 +00:00
Wei Liu
7924226eba grpc server (#1058)
Some checks failed
Post / coverage (push) Failing after 36m50s
Post / images (amd64) (push) Failing after 8m47s
Post / images (arm64) (push) Failing after 8m15s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m8s
Close stale issues and PRs / stale (push) Successful in 50s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-07-09 08:59:10 +00:00
Ankit Kurmi
cd8827572e feat: updated golang to v1.23.6 and related k8s.io packages (#870)
Signed-off-by: Ankit152 <ankitkurmi152@gmail.com>
2025-04-09 07:46:27 +00:00
xuezhao
424eb1156c Remove unnecessary random seed initialization. (#820)
Some checks failed
Post / coverage (push) Failing after 26m38s
Post / images (amd64) (push) Failing after 6m59s
Post / images (arm64) (push) Failing after 7m2s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m53s
Close stale issues and PRs / stale (push) Successful in 26s
Signed-off-by: xuezhaojun <zxue@redhat.com>
2025-02-05 01:29:40 +00:00
Qing Hao
4221f6eabb enable log flags for placement (#540)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-06-25 03:05:52 +00:00
Jian Qiu
88f6f4dd17 Refactor code to start managers with shared informers (#232)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-08-21 00:03:58 -02:30
Jian Qiu
f7cd1402e9 run work and registration as a single binary (#201)
* run registratin/work together

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Fix integration test and lint issue

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Update operator to deploy singleton mode

Signed-off-by: Jian Qiu <jqiu@redhat.com>

* Update deps

Signed-off-by: Jian Qiu <jqiu@redhat.com>

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-07-14 04:56:48 +02:00
Jian Zhu
a78d9f457d 🌱 Move addon manager from addon-framework to ocm repo (#196)
* update vendor to add addon-framework

Signed-off-by: zhujian <jiazhu@redhat.com>

* Move addon manager from addon-framework to ocm repo

Signed-off-by: zhujian <jiazhu@redhat.com>

* add integration tests for addon manager

Signed-off-by: zhujian <jiazhu@redhat.com>

* push addon manager image post commit

Signed-off-by: zhujian <jiazhu@redhat.com>

* use library-go to refactor addon controllers

Signed-off-by: zhujian <jiazhu@redhat.com>

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-06-27 03:59:54 +02:00
Jian Zhu
7332a585c0 🌱 add a verify rule for golang files import order (#177)
* 🌱 add a verify rule for golang files import order

This PR uses the [gci tool](https://github.com/daixiang0/gci) to make all go files' import section with a specific order, it will organize import with group with order:
1. standard library modules
2. 3rd party modules
3. modules in OCM org, like the `open-cluster-management.io/api`
4. current project `open-cluster-management.io/ocm` modules

developers can use the `make fmt-imports` to format the import automatically and the `make verify-fmt-imports` to check for any violation.

Signed-off-by: zhujian <jiazhu@redhat.com>

* 🌱 format the go files import

Signed-off-by: zhujian <jiazhu@redhat.com>

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-06-12 10:23:04 -04:00
Jian Qiu
116ae8cc28 Refactor version/feature/cmd packages (#148)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-05-30 02:07:32 -04:00
xuezhaojun
ad38b9465f Relocate pkgs. (#146)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-05-29 07:20:55 -04:00
xuezhaojun
2fc048a096 Setup images build and github actions(without release).
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-05-25 12:43:57 +08:00
xuezhaojun
ce598a00ef relocate to staging: registration-operator
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-05-25 12:39:38 +08:00
Wei Liu
a6bb10cb90 enable log flags (#249)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2022-06-15 16:18:19 +00:00
Jian Qiu
ef338a1b0b Update deps and enable action
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2021-06-21 11:42:45 +08:00
Zhiwei Yin
609465f787 fix Remediate Static Scan Findings 2020-09-10 14:24:03 +08:00
Paul Morie
70bbbcd855 Rename nucleus binary -> registration-operator 2020-06-06 13:32:40 -04:00
Paul Morie
626b1f0894 Rename nucleus -> registration-operator in .go files 2020-06-06 11:31:20 -04:00
Michael D. Elder
399a6b9a73 Adopt ManagedCluster & Klusterlet API in nucleus 2020-06-03 19:25:14 -04:00
Jian Qiu
4e8f44fdd6 Split hub/spoke operator to two cmds 2020-05-18 10:36:11 +08:00
Jian Qiu
1f05d9bd96 Add scaffold for nucleus operator 2020-04-29 15:29:31 +08:00