133 Commits

Author SHA1 Message Date
Wei Liu
109bde1f93 increase the test timeout to avoid flaky test (#1378)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2026-02-10 06:31:23 +00:00
Jian Qiu
b5e1bbf727 Bump api to v1.2.0 (#1361)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 20s
Post / images (amd64, addon-manager) (push) Failing after 49s
Post / images (amd64, placement) (push) Failing after 43s
Post / images (amd64, registration) (push) Failing after 44s
Post / images (amd64, work) (push) Failing after 48s
Post / images (arm64, addon-manager) (push) Failing after 45s
Post / images (arm64, placement) (push) Failing after 44s
Post / images (arm64, registration) (push) Failing after 48s
Post / images (arm64, registration-operator) (push) Failing after 45s
Post / images (arm64, work) (push) Failing after 44s
Post / images (amd64, registration-operator) (push) Failing after 5m46s
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 38m59s
Close stale issues and PRs / stale (push) Successful in 4s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2026-01-29 13:41:21 +00:00
Wei Liu
8fd640694e enable grpc e2e (#1354)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2026-01-27 10:26:32 +00:00
Yang Le
e421f20040 upgrade to the latest api (#1349)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m17s
Post / coverage (push) Failing after 7m19s
Post / images (amd64, registration) (push) Failing after 47s
Post / images (amd64, registration-operator) (push) Failing after 41s
Post / images (amd64, work) (push) Failing after 39s
Post / images (amd64, placement) (push) Failing after 8m13s
Post / images (arm64, addon-manager) (push) Failing after 43s
Post / images (arm64, registration) (push) Failing after 41s
Post / images (arm64, registration-operator) (push) Failing after 41s
Post / images (arm64, work) (push) Failing after 40s
Post / images (amd64, addon-manager) (push) Failing after 15m57s
Post / images (arm64, placement) (push) Failing after 7m30s
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
Close stale issues and PRs / stale (push) Successful in 4s
Signed-off-by: Yang Le <yangle@redhat.com>
2026-01-26 04:21:04 +00:00
Wei Liu
5740147dba add token request service (#1339)
Some checks failed
Post / images (amd64, placement) (push) Failing after 46s
Post / images (amd64, registration) (push) Failing after 42s
Post / images (amd64, registration-operator) (push) Failing after 39s
Post / images (amd64, work) (push) Failing after 39s
Post / images (arm64, addon-manager) (push) Failing after 41s
Post / images (arm64, placement) (push) Failing after 40s
Post / images (arm64, registration) (push) Failing after 41s
Post / images (arm64, registration-operator) (push) Failing after 40s
Post / images (arm64, work) (push) Failing after 42s
Post / images (amd64, addon-manager) (push) Failing after 7m44s
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 10m19s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 23s
Close stale issues and PRs / stale (push) Successful in 44s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2026-01-20 03:19:41 +00:00
Yang Le
d165060162 🌱 upgrade addon API to include driver in addon status (#1336)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 17s
Post / images (amd64, placement) (push) Failing after 48s
Post / images (amd64, registration) (push) Failing after 41s
Post / images (amd64, registration-operator) (push) Failing after 41s
Post / images (amd64, work) (push) Failing after 40s
Post / images (arm64, addon-manager) (push) Failing after 51s
Post / images (arm64, placement) (push) Failing after 41s
Post / images (arm64, registration) (push) Failing after 39s
Post / images (arm64, registration-operator) (push) Failing after 39s
Post / images (arm64, work) (push) Failing after 41s
Post / images (amd64, addon-manager) (push) Failing after 20m22s
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 39m15s
Signed-off-by: Yang Le <yangle@redhat.com>
2026-01-19 04:26:49 +00:00
Wei Liu
d5e677414c add options to grpc broker (#1326)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2026-01-12 12:50:14 +00:00
Qing Hao
8e401c34a9 chore: update dependencies to contain v1beta1 addondeploymentconfig api and sdk-go (#1315)
🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Qing Hao <qhao@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-08 12:22:34 +00:00
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
a25659d82c upgrade sdk-go (#1303)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1s
Post / images (amd64, placement) (push) Failing after 1s
Post / images (amd64, registration) (push) Failing after 1s
Post / images (amd64, registration-operator) (push) Failing after 1s
Post / images (amd64, work) (push) Failing after 1s
Post / images (arm64, addon-manager) (push) Failing after 1s
Post / images (arm64, placement) (push) Failing after 1s
Post / images (arm64, registration) (push) Failing after 1s
Post / images (arm64, registration-operator) (push) Failing after 1s
Post / images (arm64, work) (push) Failing after 1s
Post / images (amd64, addon-manager) (push) Failing after 7m56s
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 19m40s
Close stale issues and PRs / stale (push) Successful in 44s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-12-19 02:08:36 +00:00
Jian Qiu
78daf0d2ae fix: skip GC for ManifestWorks managed by ManifestWorkReplicaSet (#1299)
Skip garbage collection for ManifestWorks that have the
ManifestWorkReplicaSet controller label, as these should be
managed exclusively by the ManifestWorkReplicaSet controller.

Changes:
- Fix logic bug in controller to properly check for ReplicaSet label
- Add unit tests for label-based GC skip behavior
- Add integration test to verify GC skip for ReplicaSet-managed works

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

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 08:56:07 +00:00
Morven Cao
6d5d82c1a2 upgrade sdk-go. (#1286)
Some checks failed
Post / coverage (push) Failing after 36m56s
Post / images (amd64, addon-manager) (push) Failing after 7m41s
Post / images (amd64, placement) (push) Failing after 7m12s
Post / images (amd64, registration) (push) Failing after 7m2s
Post / images (amd64, registration-operator) (push) Failing after 7m6s
Post / images (amd64, work) (push) Failing after 7m11s
Post / images (arm64, addon-manager) (push) Failing after 7m22s
Post / images (arm64, placement) (push) Failing after 7m11s
Post / images (arm64, registration) (push) Failing after 7m2s
Post / images (arm64, registration-operator) (push) Failing after 7m8s
Post / images (arm64, work) (push) Failing after 7m5s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m35s
Close stale issues and PRs / stale (push) Successful in 42s
Signed-off-by: Morven Cao <lcao@redhat.com>
2025-12-09 04:04:14 +00:00
Jian Qiu
a06e37e65c 🌱 Integrate SDK logging tracing into work agent controllers (#1277)
This change adds log tracing support to the work agent controllers by:
- Upgrading SDK to version with logging.SetLogTracingByObject helper
- Setting tracing keys from ManifestWork objects in all work controllers
- Adding clusterName to the base logger for better log context
- Propagating tracing context through cloud events

The tracing keys enable better correlation of logs across the work
lifecycle from source to agent.

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

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-04 13:12:38 +00:00
Jian Qiu
8f8cd01b52 Update dependencies: k8s 0.34.1, controller-runtime 0.22.3, and OCM libs (#1267)
Some checks failed
Post / coverage (push) Failing after 37m28s
Post / images (amd64, addon-manager) (push) Failing after 7m29s
Post / images (amd64, placement) (push) Failing after 7m1s
Post / images (amd64, registration) (push) Failing after 7m7s
Post / images (amd64, registration-operator) (push) Failing after 7m22s
Post / images (amd64, work) (push) Failing after 7m25s
Post / images (arm64, addon-manager) (push) Failing after 7m5s
Post / images (arm64, placement) (push) Failing after 7m4s
Post / images (arm64, registration) (push) Failing after 7m20s
Post / images (arm64, registration-operator) (push) Failing after 7m9s
Post / images (arm64, work) (push) Failing after 7m12s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 59s
Close stale issues and PRs / stale (push) Successful in 29s
- Update k8s.io/* libraries to v0.34.1
- Update sigs.k8s.io/controller-runtime to v0.22.3
- Update open-cluster-management.io/api to 2337d27c3b7f
- Update open-cluster-management.io/sdk-go to a185f88d7b1b
- Update open-cluster-management.io/addon-framework to 1a0a9be61322
- Update openshift libraries (api, client-go, library-go) to latest commits
  for structured-merge-diff v6 compatibility
- Add Recorder() method to FakeSDKSyncContext with adapter pattern to bridge
  openshift/library-go and SDK event recorder interfaces
- Update vendor directory and regenerate CRDs

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

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-26 05:56:58 +00:00
Jian Qiu
eb033993c2 🌱 Use base controller in sdk-go (#1251)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m11s
Post / coverage (push) Failing after 37m30s
Post / images (amd64, addon-manager) (push) Failing after 7m29s
Post / images (amd64, placement) (push) Failing after 6m57s
Post / images (amd64, registration) (push) Failing after 7m5s
Post / images (amd64, registration-operator) (push) Failing after 7m5s
Post / images (amd64, work) (push) Failing after 7m2s
Post / images (arm64, addon-manager) (push) Failing after 7m18s
Post / images (arm64, placement) (push) Failing after 7m7s
Post / images (arm64, registration) (push) Failing after 7m13s
Post / images (arm64, registration-operator) (push) Failing after 7m6s
Post / images (arm64, work) (push) Failing after 7m2s
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
Close stale issues and PRs / stale (push) Successful in 45s
* Use base controller in sdk-go

We can leverage contextual logger in base controller.

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

* Fix integration test error

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-11-20 07:53:42 +00:00
Wei Liu
b928d9f2a9 update sdk-go (#1257)
Some checks failed
Post / coverage (push) Failing after 38m23s
Post / images (amd64, addon-manager) (push) Failing after 7m53s
Post / images (amd64, placement) (push) Failing after 6m57s
Post / images (amd64, registration) (push) Failing after 7m7s
Post / images (amd64, registration-operator) (push) Failing after 7m1s
Post / images (amd64, work) (push) Failing after 7m8s
Post / images (arm64, addon-manager) (push) Failing after 7m10s
Post / images (arm64, placement) (push) Failing after 7m11s
Post / images (arm64, registration) (push) Failing after 6m58s
Post / images (arm64, registration-operator) (push) Failing after 7m17s
Post / images (arm64, work) (push) Failing after 7m18s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m15s
Close stale issues and PRs / stale (push) Successful in 41s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-11-19 04:08:16 +00:00
Zhiwei Yin
76449f862c support loadBalancer for grpc endpoint type (#1255)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-11-19 02:39:54 +00:00
Jian Qiu
2867c26891 Bump library to v1.1.0 (#1216)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 28s
Post / coverage (push) Failing after 17s
Post / images (amd64, addon-manager) (push) Failing after 19s
Post / images (amd64, placement) (push) Failing after 26s
Post / images (amd64, registration) (push) Failing after 20s
Post / images (amd64, registration-operator) (push) Failing after 20s
Post / images (amd64, work) (push) Failing after 26s
Post / images (arm64, addon-manager) (push) Failing after 18s
Post / images (arm64, placement) (push) Failing after 17s
Post / images (arm64, registration) (push) Failing after 26s
Post / images (arm64, registration-operator) (push) Failing after 26s
Post / images (arm64, work) (push) Failing after 24s
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
Close stale issues and PRs / stale (push) Failing after 44s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-10-21 04:51:21 +00:00
Wei Liu
f1e7905b16 using mw finalizer instead of resource finalizer (#1211)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 32s
Post / coverage (push) Failing after 25s
Post / images (amd64, addon-manager) (push) Failing after 30s
Post / images (amd64, placement) (push) Failing after 15s
Post / images (amd64, registration) (push) Failing after 20s
Post / images (amd64, registration-operator) (push) Failing after 27s
Post / images (amd64, work) (push) Failing after 14s
Post / images (arm64, addon-manager) (push) Failing after 15s
Post / images (arm64, placement) (push) Failing after 19s
Post / images (arm64, registration) (push) Failing after 18s
Post / images (arm64, registration-operator) (push) Failing after 19s
Post / images (arm64, work) (push) Failing after 17s
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
Close stale issues and PRs / stale (push) Failing after 34s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-10-16 09:30:26 +00:00
Qing Hao
9257d2e2b3 upgrade open-cluster-management.io api to deprecate addon InstallNamespace in v1alpha1 (#1204)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 31s
Post / coverage (push) Failing after 17s
Post / images (amd64, addon-manager) (push) Failing after 23s
Post / images (amd64, placement) (push) Failing after 17s
Post / images (amd64, registration) (push) Failing after 19s
Post / images (amd64, registration-operator) (push) Failing after 23s
Post / images (amd64, work) (push) Failing after 19s
Post / images (arm64, addon-manager) (push) Failing after 17s
Post / images (arm64, placement) (push) Failing after 24s
Post / images (arm64, registration) (push) Failing after 17s
Post / images (arm64, registration-operator) (push) Failing after 18s
Post / images (arm64, work) (push) Failing after 20s
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
Close stale issues and PRs / stale (push) Failing after 28s
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-10-10 03:07:05 +00:00
Jian Qiu
2f04992d6c Deleted manifestwork when it is completed for ttl seconds. (#1158)
* Delete manifestwork when it is completed after ttl

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

* Fix integration test

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

* Update operator and e2e tests

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-09-23 02:23:47 +00:00
Jian Zhu
cca5ba8b42 🌱 Improve addon template controller logging and template mode support (#1184)
Some checks failed
Post / coverage (push) Failing after 29s
Post / images (amd64, addon-manager) (push) Failing after 29s
Post / images (amd64, placement) (push) Failing after 24s
Post / images (amd64, registration) (push) Failing after 41s
Post / images (amd64, registration-operator) (push) Failing after 23s
Post / images (amd64, work) (push) Failing after 36s
Post / images (arm64, addon-manager) (push) Failing after 33s
Post / images (arm64, placement) (push) Failing after 29s
Post / images (arm64, registration) (push) Failing after 31s
Post / images (arm64, registration-operator) (push) Failing after 28s
Post / images (arm64, work) (push) Failing after 31s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 41s
Close stale issues and PRs / stale (push) Failing after 31s
* Upgrade addon template to the latest version

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

* Improve addon template controller logging and template mode

- Reduce log verbosity for duplicate manager check to V(4)
- Enable template mode in addon manager for better template support

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

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: zhujian <jiazhu@redhat.com>

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-16 06:41:01 +00:00
Jian Zhu
ab41b86b8d 🐛 Use specific addon template instead of default in CSR functions (#1180)
* Upgrade addon framework

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

* Use specific addon template instead of default in CSR functions

- Pass real ManagedClusterAddOn to GetDesiredAddOnTemplate instead of nil
- Enable per-addon template selection using addon.Status.ConfigReferences
- Replace utilruntime.HandleError with explicit error returns
- Update CSRConfigurationsFunc to return ([]RegistrationConfig, error)
- Update CSRSignerFunc to return ([]byte, error)
- Add addon parameter to CSR functions for better context
- Convert runtime errors to structured logging with cluster/addon context
- Update tests to verify error conditions

This allows each ManagedClusterAddOn instance to use its specific template
configuration rather than falling back to the ClusterManagementAddon default.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: zhujian <jiazhu@redhat.com>

* Fix error assertion logic in registration tests and improve error handling

- Fix inverted error assertion logic in TestTemplateCSRConfigurationsFunc and TestTemplateCSRSignFunc
- Change tests to properly check if expectedErr is empty vs non-empty
- When no error expected, assert err == nil; when error expected, assert err != nil and contains substring
- Fix strings.Contains argument order to check if actual error contains expected substring
- Add nil template checks with proper error messages in CSRSign and PermissionConfig functions
- Improve logging consistency with clusterName/addonName format across CSR functions
- Guard against nil pointer access by checking err == nil before calling err.Error()

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

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: zhujian <jiazhu@redhat.com>

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-12 06:42:44 +00:00
Jian Qiu
01b66a62a0 Update sdk-go so we can support executor test for cloudevent (#1182)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 44s
Post / coverage (push) Failing after 23s
Post / images (amd64, addon-manager) (push) Failing after 31s
Post / images (amd64, placement) (push) Failing after 20s
Post / images (amd64, registration) (push) Failing after 29s
Post / images (amd64, registration-operator) (push) Failing after 25s
Post / images (amd64, work) (push) Failing after 33s
Post / images (arm64, addon-manager) (push) Failing after 20s
Post / images (arm64, placement) (push) Failing after 37s
Post / images (arm64, registration) (push) Failing after 29s
Post / images (arm64, registration-operator) (push) Failing after 26s
Post / images (arm64, work) (push) Failing after 25s
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
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-09-12 01:49:10 +00:00
Jian Qiu
b4b42aa0b5 Requeue ssar check if only hubKubeConfigSecret is unauthorized (#1169) (#1164)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-09-08 07:11:44 +00:00
Jian Qiu
e2be403132 Update grpc configuration in operator API (#1159)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 32s
Post / coverage (push) Failing after 43s
Post / images (amd64, addon-manager) (push) Failing after 41s
Post / images (amd64, placement) (push) Failing after 21s
Post / images (amd64, registration) (push) Failing after 23s
Post / images (amd64, registration-operator) (push) Failing after 30s
Post / images (amd64, work) (push) Failing after 28s
Post / images (arm64, addon-manager) (push) Failing after 28s
Post / images (arm64, placement) (push) Failing after 26s
Post / images (arm64, registration) (push) Failing after 35s
Post / images (arm64, registration-operator) (push) Failing after 28s
Post / images (arm64, work) (push) Failing after 35s
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
Close stale issues and PRs / stale (push) Successful in 38s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-09-04 11:15:15 +00:00
Morven Cao
e0476eebb4 upgrade grpc server. (#1157)
Some checks failed
Post / coverage (push) Failing after 28s
Post / images (amd64, addon-manager) (push) Failing after 22s
Post / images (amd64, placement) (push) Failing after 31s
Post / images (amd64, registration) (push) Failing after 27s
Post / images (amd64, registration-operator) (push) Failing after 30s
Post / images (amd64, work) (push) Failing after 31s
Post / images (arm64, addon-manager) (push) Failing after 35s
Post / images (arm64, placement) (push) Failing after 27s
Post / images (arm64, registration) (push) Failing after 21s
Post / images (arm64, registration-operator) (push) Failing after 33s
Post / images (arm64, work) (push) Failing after 31s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 47s
Close stale issues and PRs / stale (push) Successful in 47s
Signed-off-by: morvencao <lcao@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
2025-09-03 08:31:10 +00:00
Wei Liu
74aa03b01c using api auth consts (#1146)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-08-28 07:15:36 +00:00
Wei Liu
6c4102f2ca support deploying grpc with clustermanager/klusterlet (#1107)
Some checks failed
Post / coverage (push) Failing after 38m56s
Post / images (amd64, addon-manager) (push) Failing after 8m3s
Post / images (amd64, placement) (push) Failing after 7m33s
Post / images (amd64, registration) (push) Failing after 7m43s
Post / images (amd64, registration-operator) (push) Failing after 7m36s
Post / images (amd64, work) (push) Failing after 7m39s
Post / images (arm64, addon-manager) (push) Failing after 7m56s
Post / images (arm64, placement) (push) Failing after 7m42s
Post / images (arm64, registration) (push) Failing after 7m51s
Post / images (arm64, registration-operator) (push) Failing after 7m43s
Post / images (arm64, work) (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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m24s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-08-06 09:45:10 +00:00
Jian Zhu
f989a37e1a 🌱 Upgrade golang to 1.24 and helm to 3.18.4 (#1085)
* Upgrade golang to 1.24

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

* Fix lint errors

Co-authored-by: gemini <gemini@google.com>
Signed-off-by: zhujian <jiazhu@redhat.com>

* upgrade sdk-go to latest

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: gemini <gemini@google.com>
2025-07-28 02:13:36 +00:00
Jian Qiu
334710ce0e Set deleting condition when mw is deleting (#1084)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m54s
Post / coverage (push) Failing after 36m57s
Post / images (amd64) (push) Failing after 8m41s
Post / images (arm64) (push) Failing after 8m7s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 49s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-07-24 01:11:02 +00:00
Wei Liu
628d0d90ec cloudevents services integration test (#1086)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m22s
Post / coverage (push) Failing after 38m27s
Post / images (amd64) (push) Failing after 8m48s
Post / images (arm64) (push) Failing after 8m9s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 1m3s
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-07-23 13:55:55 +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
Ben Perry
c5e776cdd9 Manifest completion (#1033)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m58s
Post / coverage (push) Failing after 36m24s
Post / images (amd64) (push) Failing after 9m7s
Post / images (arm64) (push) Failing after 8m30s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 57s
* Skip manifests in work reconcile that are marked Complete

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Aggregate Complete condition to work from manifests

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Delete work that is complete and satisfies configured TTL

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* tests

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* lint

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* go.mod

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Helper funcs for conditions

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Generic condition aggregation

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Support integration test args

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Remove work deletion from spoke, will be moved to hub GC

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Cleanup

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* update api

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Wait for NS to exist before testing

Signed-off-by: Ben Perry <bhperry94@gmail.com>

---------

Signed-off-by: Ben Perry <bhperry94@gmail.com>
2025-07-14 04:53:04 +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
Jian Qiu
567caa2fe9 Bump API to v1.0.0 (#1036)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m12s
Post / coverage (push) Failing after 36m53s
Post / images (amd64) (push) Failing after 8m37s
Post / images (arm64) (push) Failing after 7m58s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-06-16 01:05:30 +00:00
Ben Perry
377ba25c26 Workload conditions (#910)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m40s
Post / coverage (push) Failing after 35m43s
Post / images (amd64) (push) Failing after 8m36s
Post / images (arm64) (push) Failing after 8m8s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 48s
* Import OCM API changes for workload conditions

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Implement condition rule evaluator

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Evaluate manifest condition rules after apply

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* note to self

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Cleanup

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Return config option if rules are set

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* update api

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Always return an error to inform user about the state of their condition rule

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Condition rule errors should not result in retrying apply

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Test condition rule reconciliation

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Return condition status Unknown when an internal CEL error occurs

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update api

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Switch to common CEL lib

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update to simplified celExpressions format

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Formatting

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* tidy

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update ocm api

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update sdk-go

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Switch to sdk-go ConditionLib

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update API

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Switch to WellKnownConditions with required Condition field

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Support CEL evaluation budget

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update sdk-go

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update API

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* lint

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update go.mod

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Tests and comments

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Move condition reader to status controller for more frequent updates

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Ignore missing WellKnownCondition

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Fix test

Signed-off-by: Ben Perry <bhperry94@gmail.com>

* Update condition tests

Signed-off-by: Ben Perry <bhperry94@gmail.com>

---------

Signed-off-by: Ben Perry <bhperry94@gmail.com>
2025-06-11 15:47:35 +00:00
Zhiwei Yin
98443736e9 support set hub qps and burst for work in the klusterlet (#1014)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m43s
Post / coverage (push) Failing after 31m18s
Post / images (amd64) (push) Failing after 8m11s
Post / images (arm64) (push) Failing after 7m29s
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
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-05-30 02:03:07 +00:00
Jian Zhu
4d1b4ee8d5 make work status sync interval configurable (#1009)
* update api

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

* make work status sync interval configurable

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

* add unit tests

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

* fix flaky e2e tests

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

* drop go mod replace

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2025-05-27 07:47:58 +00:00
Qing Hao
67f0db9311 remove cel from placement decision group (#981)
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-05-06 12:35:15 +00:00
Qing Hao
df87f528d7 add cost budget, runtime cost estimator and metrics (#964)
Some checks failed
Post / images (amd64) (push) Failing after 6m56s
Post / images (arm64) (push) Failing after 6m41s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 27m27s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 4m7s
Close stale issues and PRs / stale (push) Successful in 34s
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-04-30 08:15:22 +00:00
Jian Zhu
ad8de01151 Make hubAcceptsClient optional (#973)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m51s
Post / images (amd64) (push) Failing after 4m5s
Post / coverage (push) Failing after 9m32s
Post / images (arm64) (push) Failing after 3m51s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 43s
Signed-off-by: zhujian <jiazhu@redhat.com>
2025-04-28 04:24:29 +00:00
Zhiwei Yin
f09ff75a5e upgrade api to enable ResourceCleanup feature gate by default (#963)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-04-23 13:35:44 +00:00
Qing Hao
f4b6dcb159 select clusters with cel selector (#693)
Some checks failed
Post / images (amd64) (push) Failing after 3m11s
Post / coverage (push) Failing after 8m5s
Post / images (arm64) (push) Failing after 3m27s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 7s
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m34s
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-04-22 15:00:56 +00:00
Jian Zhu
73b6e2d514 check nil for LocalSecrets config (#962)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m36s
Post / images (amd64) (push) Failing after 3m35s
Post / coverage (push) Failing after 8m16s
Post / images (arm64) (push) Failing after 3m1s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Signed-off-by: zhujian <jiazhu@redhat.com>
2025-04-22 08:57:23 +00:00
Qing Hao
983bb566b8 update ocm packages to latest (#953)
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-04-16 14:58:06 +00:00
Jian Zhu
67d9d2a5d3 Support configuring resource requirements for addon agents (#932)
* Support configuring resource requirements for addon agents

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

* Add unit tests

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

* Add e2e

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

* remove mod replace

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2025-04-08 02:26:49 +00:00
Wei Liu
29c42b997d upgrade go-sdk (#916)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m0s
Post / coverage (push) Failing after 22m33s
Post / images (arm64) (push) Failing after 2m31s
Post / images (amd64) (push) Failing after 24m48s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-03-28 01:10:15 +00:00
Wei Liu
0c5377c34b upgrade go-sdk (#914)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-03-27 07:06:09 +00:00
Jian Qiu
453b775170 Bump api/sdk-go/addon-framework to v0.16 (#879)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-03-10 13:52:52 +00:00