Commit Graph

171 Commits

Author SHA1 Message Date
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
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
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
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
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
0c5377c34b upgrade go-sdk (#914)
Signed-off-by: Wei Liu <liuweixa@redhat.com>
2025-03-27 07:06:09 +00:00
Jian Qiu
4a4d51ea80 🌱 Code refactor on registration driver (#909)
* Code refactor on registration driver

1. Move driver's options to each drivers implemenation
2. Add BuildClients interface so it is possible
to support other driver later.
3. create a general option to simplify driver init
4. remove option with any type

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

* Change to bootstrapKubeConfigFile

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-03-27 07:00:38 +00:00
jaswalkiranavtar
57c78cd4de Miscellaneous code cleanup (#881)
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Post / coverage (push) Waiting to run
Post / images (amd64) (push) Waiting to run
Post / images (arm64) (push) Waiting to run
Post / image manifest (push) Blocked by required conditions
Post / trigger clusteradm e2e (push) Blocked by required conditions
* extract constants and remove permissions

Signed-off-by: Alex <alexchan2988@gmail.com>

* Addressing miscellaneous code cleanup

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

---------

Signed-off-by: Alex <alexchan2988@gmail.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: Alex <alexchan2988@gmail.com>
2025-03-13 00:45:19 +00:00
Jian Zhu
a5f3912a66 Separate crd objects from others (#882)
Some checks failed
Post / coverage (push) Waiting to run
Post / images (amd64) (push) Waiting to run
Post / images (arm64) (push) Waiting to run
Post / image manifest (push) Blocked by required conditions
Post / trigger clusteradm e2e (push) Blocked by required conditions
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Signed-off-by: zhujian <jiazhu@redhat.com>
2025-03-12 03:38: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
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
Qing Hao
c05247840a breaking change: do not add lifecycle annotation to cma and default managed by addon-manager (#856)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m21s
Post / coverage (push) Failing after 7m44s
Post / images (amd64) (push) Failing after 7m7s
Post / images (arm64) (push) Failing after 5m57s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 5s
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-03-04 06:42:40 +00:00
jaswalkiranavtar
94bfd426ca Add managed cluster auto-approval for awsirsa (#850)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m5s
Post / images (amd64) (push) Failing after 5m36s
Post / images (arm64) (push) Failing after 5m47s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 27m4s
Signed-off-by: James Dobson <dobson@softwarepunk.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: James Dobson <dobson@softwarepunk.com>
2025-02-28 14:05:53 +00:00
Qing Hao
a8a40e5746 upgrade addon-framework (#828)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m24s
Post / coverage (push) Failing after 27m5s
Post / images (amd64) (push) Failing after 7m7s
Post / images (arm64) (push) Failing after 10m43s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 33s
Signed-off-by: Qing Hao <qhao@redhat.com>
2025-02-19 02:50:20 +00:00
Zhiwei Yin
b94d7da6e9 refator gc and move rbac deletion to cluster controller (#831)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-02-19 01:47:04 +00:00
Zhiwei Yin
b6c2a848e8 fix gc controller not handle empty cluster (#812)
Some checks failed
Post / coverage (push) Failing after 26m18s
Post / images (amd64) (push) Failing after 7m14s
Post / images (arm64) (push) Failing after 6m40s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m2s
Close stale issues and PRs / stale (push) Successful in 28s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-01-23 01:41:27 +00:00
Zhiwei Yin
c5f987edd6 fix integration test random failure (#815)
Some checks failed
Post / coverage (push) Failing after 26m21s
Post / images (amd64) (push) Failing after 6m47s
Post / images (arm64) (push) Failing after 6m46s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m7s
Close stale issues and PRs / stale (push) Successful in 35s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-01-22 01:53:04 +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
34275ef1ea Add bootstrapSA flags for importer (#803)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m14s
Post / coverage (push) Failing after 27m13s
Post / images (amd64) (push) Failing after 6m57s
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 25s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-01-16 08:55:31 +00:00
Jian Qiu
19fb9243ca Check capi status if it is provisioned (#801)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-01-16 02:44:15 +00:00
Jian Qiu
11896ccda1 Fix the issue that ownerref is not set with ignorefields (#794)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 45s
Post / images (amd64) (push) Failing after 5m38s
Post / images (arm64) (push) Failing after 5m35s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 26m35s
Close stale issues and PRs / stale (push) Successful in 25s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-01-10 03:19:59 +00:00
jaswalkiranavtar
0acf030cdb Completing aws registration on spoke (#788)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 40s
Post / images (amd64) (push) Failing after 5m45s
Post / images (arm64) (push) Failing after 5m45s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 26m38s
Close stale issues and PRs / stale (push) Successful in 6s
* Completing aws registration on spoke

Signed-off-by: suvaanshkumar <suvaanshkumar@gmail.com>

* adding new function to overcome gci errors on slices

Signed-off-by: suvaanshkumar <suvaanshkumar@gmail.com>

* Refactoring array contains function

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

---------

Signed-off-by: suvaanshkumar <suvaanshkumar@gmail.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: suvaanshkumar <suvaanshkumar@gmail.com>
2025-01-09 19:07:43 +00:00
Zhiwei Yin
e5e013cad0 use images overrides in operator deploy (#795)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 39s
Post / images (amd64) (push) Failing after 5m56s
Post / images (arm64) (push) Failing after 5m40s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 26m9s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-01-09 09:03:36 +00:00
Jian Qiu
037aa3ccfa Ignore field should not be honored when creating the resource (#784)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 12m44s
Post / images (amd64) (push) Failing after 8m35s
Post / coverage (push) Failing after 26m36s
Post / images (arm64) (push) Failing after 9m10s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 30s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-01-03 06:09:48 +00:00
EmilyL
0f9845c563 Mount the awscli volume when using AWS IRSA-based authentication. (#783)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 4m35s
Post / images (amd64) (push) Failing after 6m0s
Post / images (arm64) (push) Failing after 5m36s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Post / coverage (push) Failing after 27m33s
* Add the awscli volume mount to klusterlet-work, klusterlet-agent, klusterlet-registration deployment manifests if the registration auth type is awsirsa.
Update the test util function to check for both .aws and /awscli volume mounts.

Signed-off-by: dtclxy64 <70486866+dtclxy64@users.noreply.github.com>

* Update the conditions to only check the registration driver auth type because the nil checks are done on the klusterlet CRD.

Signed-off-by: dtclxy64 <70486866+dtclxy64@users.noreply.github.com>

---------

Signed-off-by: dtclxy64 <70486866+dtclxy64@users.noreply.github.com>
Co-authored-by: Amrutha <amrutha.hari12@gmail.com>
2025-01-03 01:41:29 +00:00
xuezhao
8737358919 Agents stop update managedcluster status when clock is out of sync. (#770)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-12-23 01:34:33 +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
Jian Zhu
3f9b8867eb Add a configmap to handle the proxy ca bundle (#772)
* Add a configmap to handle the proxy ca bundle

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

* Use contextual logger

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2024-12-19 03:29:03 +00:00
Jian Qiu
25ea10bcbf Add importer into registration (#753)
* Add importer into registraiton

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

* Add unit tests

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

* Add integration test

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-12-16 13:59:55 +00:00
Jian Zhu
3493630ad2 Support configuring proxy for addons (#760)
* Support configuring proxy for addons

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

* Add tests for addon proxy setting

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

* Add e2e test for signer namespace

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2024-12-16 08:01:34 +00:00
jaswalkiranavtar
b170f3a41e Cluster decorator interface (#759)
* Add cluster decorator interface in register

And refactor creating to controller to call decorators

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

* Add aws annotations to ManagedCluster using Decorator

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

* Addressing review comments

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
Signed-off-by: Gaurav Jaswal <jaswalkiranavtar@gmail.com>
Co-authored-by: Jian Qiu <jqiu@redhat.com>
2024-12-11 15:59:43 +00:00
Jian Zhu
ddc5024596 Allow Custom Signer signingCA to Specify Namespace in AddOnTemplate (#747)
* Allow Custom Signer signingCA to Specify Namespace in AddOnTemplate

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

* Add e2e test for signer namespace

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2024-12-10 09:16:26 +00:00
Jian Zhu
1ef590444c Use e2e images instead of latest (#756)
Signed-off-by: zhujian <jiazhu@redhat.com>
2024-12-10 02:59:40 +00:00
Jian Qiu
0897da69da Implement ignoreFields in server side apply (#726)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-12-10 02:56:55 +00:00
Qing Hao
ed367fd739 enable leader election of klusterlet-agent on single node managed clusters (#727)
Signed-off-by: Qing Hao <qhao@redhat.com>
2024-11-29 08:13:48 +00:00
jaswalkiranavtar
93db6de4a1 Starting aws registration by spoke by assuming IAM role on startup and adding annotations to ManagedCluster CR (#714)
* Starting aws registration by spoke by assuming IAM role on startup and adding annotations to ManagedCluster CR

Signed-off-by: Erica Jin <132393634+EricaJ6@users.noreply.github.com>

* Adding integration tests for aws registration

Signed-off-by: Erica Jin <132393634+EricaJ6@users.noreply.github.com>

* Adding more integration tests

Signed-off-by: Erica Jin <132393634+EricaJ6@users.noreply.github.com>

* Addressing review comments

Signed-off-by: Erica Jin <132393634+EricaJ6@users.noreply.github.com>

---------

Signed-off-by: Erica Jin <132393634+EricaJ6@users.noreply.github.com>
2024-11-26 17:34:53 +00:00
Zhiwei Yin
fa3a30b36e support wildcard in manifestConfigs (#703)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2024-11-21 06:56:46 +00:00
xuezhao
68eb264e56 Revert "enable leader election of klusterlet-agent on single node managed clusters (#695)" (#708)
This reverts commit 8544ff1e29.

Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-11-20 03:45:47 +00:00
Qing Hao
8544ff1e29 enable leader election of klusterlet-agent on single node managed clusters (#695)
Signed-off-by: Qing Hao <qhao@redhat.com>
2024-11-15 02:47:00 +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
Jian Qiu
5911a7e920 🐛 Fix manifestwork and appliedmanifestwork unsync issue (#636)
* Fix manifestwork and appliedmanifestwork unsync issue

merge the two controller as reconcilers for one controller

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

* Add an integration test

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-11-11 01:59:35 +00:00
xuezhao
7664585c22 Fix: reduce cluster rbac when accpet to false. (#675)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-11-04 02:02:25 +00:00
xuezhao
603b40572d Fix: check error instead of bool to see error msg when case fails. (#682)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-10-31 09:04:58 +00:00
Qing Hao
9181dbbe85 generate mca before testing rollout (#657)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-10-18 07:35:05 +00:00
Jian Qiu
8d1fdc297f Add trimmed release version to env (#648)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-10-16 04:32:19 +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
Qing Hao
43c3500738 upgrade framework and check configured condition in addon template (#641)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-10-09 12:53:45 +00:00
Qing Hao
851d0152a3 set configured condition in mca (#635)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-10-08 13:08:03 +00:00
Qing Hao
4ebe9d7978 🐛 monitor the bootstrap kubeconfig and restart immediately when changes (#630)
* monitor the bootstrap kubeconfig and restart immediately when changes

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

* fix comments

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

---------

Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-09-30 06:24:20 +00:00