107 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
Jian Zhu
7ec1be9856 Upgrade golangci-lint from version 1 to version 2 (#1171)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 34s
Post / coverage (push) Failing after 36s
Post / images (amd64, addon-manager) (push) Failing after 34s
Post / images (amd64, placement) (push) Failing after 23s
Post / images (amd64, registration) (push) Failing after 39s
Post / images (amd64, registration-operator) (push) Failing after 29s
Post / images (amd64, work) (push) Failing after 22s
Post / images (arm64, addon-manager) (push) Failing after 29s
Post / images (arm64, placement) (push) Failing after 24s
Post / images (arm64, registration) (push) Failing after 37s
Post / images (arm64, registration-operator) (push) Failing after 22s
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
- Updated .golangci.yaml configuration format for v2 compatibility
- Updated Makefile to use golangci-lint v2.4.0
- Reorganized configuration structure to match v2 schema
- Changed linter configuration from disable-all/enable to default: standard
- Updated formatters and exclusions configuration syntax

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

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-08 07:14:23 +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
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
Zhiwei Yin
78185def4f update make update-csv (#911)
Some checks failed
Post / images (amd64) (push) Failing after 14m16s
Post / coverage (push) Failing after 22m31s
Post / images (arm64) (push) Failing after 2m19s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m36s
Close stale issues and PRs / stale (push) Successful in 28s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-03-26 02:39:11 +00:00
Suvaansh
25429768d7 removing aws-cli image (#745)
Signed-off-by: suvaanshkumar <suvaanshkumar@gmail.com>
2024-12-06 01:32:15 +00:00
jaswalkiranavtar
b506698f63 Adding aws-cli to docker image (#729)
* Adding aws-cli to docker image

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

* Support other architectures

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

* Adding aws-cli to Make file

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

* Parameterizing version

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

---------

Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
2024-12-04 15:15:59 +00:00
Zhiwei Yin
7946f87945 support set imagepullsecret credential in helm chart and run e2e using helm chart (#605)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-08-29 12:32:43 +00:00
Zhiwei Yin
bf0dc3fc66 add helm charts (#548)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-07-10 15:24:10 +00:00
Jian Qiu
2582ad922d Update deps to 1.30 (#546)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-07-02 14:04:15 +00:00
Zhiwei Yin
aaf9e70c60 the released operator catalog bundles are moved into release branch (#539)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-06-25 01:54:40 +00:00
Zhiwei Yin
237baa1af4 bump to 0.13.3 (#529)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-06-19 07:31:39 +00:00
Zhiwei Yin
3f304e8e11 bump csv to 0.13.2 (#447)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-04-28 01:45:30 +00:00
Zhiwei Yin
ca89a00a0e release 0.13.1 csv bundle (#416)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-04-11 01:39:23 +00:00
Zhiwei Yin
27de904495 bump csv to 0.14 (#365)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-03-06 01:40:19 +00:00
haowells
fd06d926b1 operator sdk support arm64 (#319)
Signed-off-by: haolin <haowells@gmail.com>
2023-11-27 06:51:11 +00:00
Zhiwei Yin
5903140f38 bump csv to 0.13.0 (#290)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-10-10 02:17:24 +00:00
Jian Zhu
e0d1ad384c bump golangci-lint to v1.54.2 (#270)
Signed-off-by: zhujian <jiazhu@redhat.com>
2023-09-07 15:55:12 +02:00
Qing Hao
31f9059fb9 fix make verify error (#264)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2023-09-05 03:53:41 +02:00
Jian Qiu
0f16de9f7d move patch routine to copy crd (#261)
This can avoid redudant file generated in _output

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-09-04 10:27:07 +02:00
Zhiwei Yin
8b4abc7459 update pod securitycontext and upgrade operator sdk version (#262)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-09-04 07:00:26 +02:00
Zhiwei Yin
4227c8f68c Revert "Fix PodSecurity Warnings (#250)" (#252)
This reverts commit ecc541d186.

Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-08-21 00:58:12 -02:30
Zhiwei Yin
ecc541d186 Fix PodSecurity Warnings (#250)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-08-17 06:00:46 -02:30
xuezhaojun
70d61123a6 Add update-csv when make update (#238)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-07-27 03:03:16 +02:00
Jian Zhu
40bc557c47 🐛 make the custom sign ca secret namespace fixed (#205)
* update vendor ocm api

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

* make the custom sign ca secret name fixed

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

* make the custom sign ca secret namespace fixed

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

* format go import for test files

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

* update vendor ocm api

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-07-04 00:01:23 -04:00
Qing Hao
de2b7d35be generalize cluster selector method (#204)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2023-06-29 15:11:56 +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 Qiu
53890594c3 🌱 Use patcher in operator to replace previous update (#181)
* Use patcher in operator to replace previous update

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

* Fix test error

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

* Fix permission in csv

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-06-18 20:43:36 -04:00
Wei Liu
ecfb6c0888 merge the cluster capacity (#184)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2023-06-14 11:03:43 -04: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
d3d648283e 🌱 Configure the golangci lint (#180)
* 🌱 Configure the golangci lint

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

* 🌱 Fix lint issues

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-06-13 03:51:48 -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
xuezhaojun
652bf923f4 Add: codecov configuration. (#166)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-06-06 04:22:08 -04:00
Jian Qiu
95aa3b1a06 Move operator e2e (#156)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-05-31 07:09:42 -04:00
Jian Qiu
3d6b001b0f Use image builder to build image (#154)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-05-31 03:49:35 -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
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
Zhiwei Yin
a9b50c6def bump to 0.12.0 (#356)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-05-24 22:41:55 -04:00
xuezhaojun
a702559281 Add gosec in verify process. (#347)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2023-04-18 22:15:25 -04:00
Qing Hao
ee0a60f013 addon manager feature gates (#325)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2023-03-02 09:29:14 +01:00
Zhiwei Yin
207844bddd bump v0.11.0 (#320)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2023-02-17 02:30:46 -05:00
Matt Prahl
8033805662 Allow customizing the klusterlet name when deploying in hosted mode (#311)
This will allow users of this Makefile to deploy multiple managed
clusters in hosted mode.

Signed-off-by: mprahl <mprahl@users.noreply.github.com>

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2023-01-18 09:10:22 -05:00
Wei Liu
3d591bb11b update clustermanangementaddon api (#300)
Signed-off-by: Wei Liu <liuweixa@redhat.com>

Signed-off-by: Wei Liu <liuweixa@redhat.com>
2022-11-08 03:28:26 -05:00
Jian Zhu
432fac3616 Remove install mode detached (#282)
Signed-off-by: zhujian <jiazhu@redhat.com>

Signed-off-by: zhujian <jiazhu@redhat.com>
2022-10-17 05:43:34 -04:00
DangPeng Liu
6bf6df2f2c add conversion webhook (#279)
Signed-off-by: ldpliu <daliu@redhat.com>

Signed-off-by: ldpliu <daliu@redhat.com>
2022-10-14 00:19:30 -04:00
Matt Prahl
4306b7849a Use the correct managed cluster name in the apply-spoke-cr-hosted target (#266)
Signed-off-by: mprahl <mprahl@users.noreply.github.com>

Signed-off-by: mprahl <mprahl@users.noreply.github.com>
2022-08-30 09:41:05 -04:00
Zhiwei Yin
b14e41788a upgrade go lib to the latest version and bump csv to 0.9.0 (#265)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2022-07-26 02:42:46 +02:00