Commit Graph

20 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
Zhiwei Yin
ce7d226bdd 🐛 fix the labels of hub deployments cannot be updated from the clustermanager (#1046)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m33s
Post / coverage (push) Failing after 33m53s
Post / images (amd64) (push) Failing after 8m23s
Post / images (arm64) (push) Failing after 7m54s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Has been cancelled
* remove labels from spec.selector for cluster manager deployments

Signed-off-by: Zhiwei Yin <zyin@redhat.com>

* refactor labels of operators

Signed-off-by: Zhiwei Yin <zyin@redhat.com>

---------

Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-06-26 03:44:57 +00:00
Jeffrey
215cfed77e Adding support for enableSyncLabels for clustermanager operator and registration controller (#1021)
Signed-off-by: Jeffrey Wong <jeffreywong0417@gmail.com>
2025-06-12 02:32:36 +00:00
Amrutha Harikumar
c4e706f123 Make ocm changes to tag aws resources by OCM hub (#862)
* Implementing aws resource tags

Signed-off-by: Amrutha <amrutha.hari12@gmail.com>
Signed-off-by: Alex <alexchan2988@gmail.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

* Fixing tests

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

---------

Signed-off-by: Amrutha <amrutha.hari12@gmail.com>
Signed-off-by: Alex <alexchan2988@gmail.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
2025-03-06 19:29:29 +00:00
jaswalkiranavtar
27bc922b1c 🐛 ARN pattern should be comma separated string instead of a string enclosed in square brackets (#865)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 46s
Post / images (amd64) (push) Failing after 5m48s
Post / images (arm64) (push) Failing after 5m31s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 27m6s
* ARN pattern should be comma separated string

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

* Addressing review comment

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

* Addressing review comments

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

---------

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: Amrutha <amrutha.hari12@gmail.com>
2025-03-06 03:13:32 +00:00
jaswalkiranavtar
f62242d047 Assume prerequisite role on hub if initailize with aws-irsa (#807)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m28s
Post / coverage (push) Failing after 26m43s
Post / images (amd64) (push) Failing after 6m50s
Post / images (arm64) (push) Failing after 6m49s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 35s
* Adding managedcluster identity creator role arn

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

* Addressing review comments

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>

---------

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: Amrutha <amrutha.hari12@gmail.com>
2025-01-17 16:37:47 +00:00
Jian Qiu
b568123849 Start import in registration by feature gate. (#775)
* Update clustermanager operator to support capi

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

* Update operator to start importer

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-12-20 01:12:10 +00:00
Rokibul Hasan
369f3fb6ff Update api dependency and remove unnecessary featureGate enabling part (#687)
Signed-off-by: Rokibul Hasan <mdrokibulhasan@appscode.com>
2024-11-14 07:12:14 +00:00
Qing Hao
d9ab25283e sync between ManagedCluster and cluster inventory API (#615)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-10-15 04:04:41 +00:00
Chunlin Yang
4117a4b302 upgrade sdk to support Kafka as a cloudevents driver (#460)
* upgrade sdk to support Kafka as a cloudevents driver

Signed-off-by: clyang82 <chuyang@redhat.com>

* fix format issue

Signed-off-by: clyang82 <chuyang@redhat.com>

---------

Signed-off-by: clyang82 <chuyang@redhat.com>
2024-05-14 02:03:34 +00:00
Morven Cao
7154863106 support work driver config for cluster manager. (#381)
* support work driver config for cluster manager.

Signed-off-by: morvencao <lcao@redhat.com>

* address comments.

Signed-off-by: morvencao <lcao@redhat.com>

---------

Signed-off-by: morvencao <lcao@redhat.com>
2024-04-24 08:33:13 +00:00
xuezhaojun
a46086d819 Removal v1beta1 webhook. (#316)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-11-23 08:06:19 +00:00
Jian Qiu
e810520961 🌱 Refactor code to fix lint warning (#218)
* Refactor code to fix lint warning

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

* enable lint for testing files

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-07-25 07:12:34 +02:00
Jian Zhu
8d974c2df8 🐛 Failed to sync sa work-controller-sa in cluster manger hosted mode (#223)
* Failed to sync sa work-controller-sa in cluster manger hosted mode

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

* add secret addon-manager-controller-sa-kubeconfig getting permission

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

* add tests for hosted mode work controller

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-07-17 04:45:48 +02:00
Jian Zhu
9ff0948184 enable addon management feature gate by default (#222)
Signed-off-by: zhujian <jiazhu@redhat.com>
2023-07-14 09:45:35 +02:00
Jian Zhu
9450d14759 🌱 add e2e tests for addon manager (#199)
* add e2e tests for addon manager

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

* test image override and node placement for addon manager

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-06-28 15:45:43 +02:00
Jian Zhu
023cdfd0c3 🌱 Update api to install addon template CRD (#170)
Signed-off-by: zhujian <jiazhu@redhat.com>
2023-06-14 02:26:35 -04: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
62efbf935b Build common options for agent (#163)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-06-08 02:55:43 -04:00
Jian Qiu
8a05d4b030 Refactore integration test (#150)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-05-31 02:34:06 -04:00