72 Commits

Author SHA1 Message Date
Jian Zhu
e7eea633c3 🌱 Change image tag validation to fail only for tag format mismatches (#1385)
Modified e2e test suite to validate image tags and fail tests when
tag-based images don't match the expected tag, while skipping validation
for digest-based images (SHA format).

Changes:
- Added validateImageFormat() helper to check image format (tag vs digest)
- Images using digest format (@sha256:...) skip validation
- Images using tag format (:tag) are validated against expected tag
- Tests fail with Expect() if tag validation fails
- Validation applies to test image variables and ClusterManager specs
- Only validates ClusterManager CR specs, not deployments
- Removed validateKlusterletImageSpecs() to avoid validation before resource creation

Bug fix:
- Fixed CI failure where image validation ran before Klusterlet was created
- The validation now only checks test inputs (which are used to create Klusterlet)
- This ensures Klusterlet has correct images by design without redundant validation

This fixes the BeforeSuite error:
"image validation failed: [failed to get Klusterlet:
klusterlets.operator.open-cluster-management.io
"e2e-universal-klusterlet" not found]"

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

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 02:10:14 +00:00
Jian Zhu
7bf6bb86eb fix: correct variable usage and error messages in ManifestWorkReplicaSet e2e tests (#1386)
This commit fixes two bugs in the ManifestWorkReplicaSet e2e tests:

1. Use freshly fetched mwrSet instead of stale mwReplicaSet when checking
   status summary. This ensures we're validating against the latest state
   rather than the initial object.

2. Return descriptive error messages instead of nil error when condition
   checks fail. This improves test debugging by providing clear failure
   reasons.

These fixes improve test reliability and error reporting.

🤖 Assisted by Claude Code

Signed-off-by: $(git config user.name) <$(git config user.email)>
Signed-off-by: zhujian <jiazhu@redhat.com>
2026-02-12 13:45:14 +00:00
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 Zhu
493ad777b3 Add e2e test for token-based authentication with template addons (#1368)
*  Add e2e test for token-based authentication with template addons

This test validates the token-based authentication feature for template
addons introduced in PR #1363. It tests the complete authentication
lifecycle including switching between token and CSR authentication modes.

Test Flow:
1. Enable token-based authentication for addons on klusterlet
2. Deploy template addon and verify it uses token auth
3. Validate token field exists in hub kubeconfig secret
4. Test addon functionality with token authentication
5. Switch back to CSR-based authentication
6. Verify hub kubeconfig now uses client certificates
7. Test addon functionality with CSR authentication
8. Cleanup all resources

Key Features:
- Comprehensive validation of both token and CSR authentication
- No manual CSR approval needed (auto-approved by system)
- Works independently of klusterlet registration driver (grpc/csr)
- Uses label "addon-token-auth" for selective test execution

🤖 Generated with Claude Code
https://claude.com/claude-code

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

* ♻️ Refactor addon token auth test to use BeforeAll/AfterAll hooks

Move klusterlet configuration save/restore logic from defer in test
function to BeforeAll/AfterAll hooks for better test structure and
isolation.

Changes:
- Save original klusterlet configuration in BeforeAll before any setup
- Configure token auth for klusterlet in BeforeAll
- Restore original configuration in AfterAll after cleanup
- Remove redundant Steps 9-12 (CSR auth switch back)
- Renumber remaining steps from 1-10
- Remove unused strings import

This ensures the klusterlet's original AddOnKubeClientRegistrationDriver
is preserved for other tests and provides clearer separation of test
setup/teardown from test logic.

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

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

*  Wait for registration agent rollout before proceeding in token auth test

Add explicit wait for registration agent deployment to fully rollout after
token authentication configuration is applied. This ensures all replicas are
updated and ready before proceeding with the test, preventing race conditions.

The wait validates:
- ObservedGeneration matches current generation
- All replicas are updated with new configuration
- All replicas are ready and available

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

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

*  Add deployment generation check to ensure token auth rollout

Capture the registration agent deployment generation before updating
the klusterlet configuration, then wait for it to increment after the
update. This ensures the test waits for the actual new deployment with
token auth configuration, not an old one with CSR-based auth.

Changes:
- Capture initial deployment generation before klusterlet update
- Calculate deployment name once based on Singleton vs Default mode
- Wait for deployment generation to increment after config change
- Verify deployment has fully rolled out with all pods updated and ready

This prevents race conditions where the test proceeds while old pods
with the previous CSR-based configuration are still running, which was
likely causing CI failures.

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

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

*  Add support for hosted mode in addon token auth test

This commit adds proper support for hosted mode deployment in the addon
token authentication e2e test. In hosted mode, the agent deployments run
on the hub cluster instead of the spoke cluster, and the agent namespace
is named after the klusterlet name rather than using a fixed namespace.

Key changes:
- Check for both InstallModeHosted and InstallModeSingletonHosted modes
- Use hub.KubeClient instead of spoke.KubeClient in hosted mode
- Use klusterlet.Name as agentNamespace in hosted mode
- Support InstallModeSingletonHosted for deployment naming

This ensures the test works correctly in all deployment modes:
Default, Singleton, Hosted, and SingletonHosted.

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

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 00:19:53 +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
xuezhao
d83c822129 Add duplicate manifest detection in ManifestWork webhook validation (#1310)
This commit adds validation to detect and reject duplicate manifests
in ManifestWork resources. A manifest is considered duplicate when
it has the same apiVersion, kind, namespace, and name as another
manifest in the same ManifestWork.

This prevents issues where duplicate manifests with different specs
can cause state inconsistency, as the Work Agent applies manifests
sequentially and later entries would overwrite earlier ones.

The validation returns a clear error message indicating the duplicate
manifest's index and the index of its first occurrence.

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

Signed-off-by: xuezhaojun <zxue@redhat.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 06:09:25 +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
Yang Le
db92ed79d4 support managed namespaces (#1193)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m6s
Post / coverage (push) Failing after 30s
Post / images (amd64, addon-manager) (push) Failing after 19s
Post / images (amd64, placement) (push) Failing after 24s
Post / images (amd64, registration) (push) Failing after 18s
Post / images (amd64, registration-operator) (push) Failing after 14s
Post / images (amd64, work) (push) Failing after 14s
Post / images (arm64, addon-manager) (push) Failing after 22s
Post / images (arm64, placement) (push) Failing after 16s
Post / images (arm64, registration) (push) Failing after 21s
Post / images (arm64, registration-operator) (push) Failing after 16s
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 45s
Signed-off-by: Yang Le <yangle@redhat.com>
2025-09-25 08:19:30 +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
b506d16cf8 🐛 Fix ManagedClusterAddons not removed when ClusterManagementAddon is deleted (#1160)
Some checks failed
Post / coverage (push) Failing after 38s
Post / images (amd64, addon-manager) (push) Failing after 33s
Post / images (amd64, placement) (push) Failing after 41s
Post / images (amd64, registration) (push) Failing after 40s
Post / images (amd64, registration-operator) (push) Failing after 38s
Post / images (amd64, work) (push) Failing after 36s
Post / images (arm64, addon-manager) (push) Failing after 35s
Post / images (arm64, placement) (push) Failing after 39s
Post / images (arm64, registration) (push) Failing after 34s
Post / images (arm64, registration-operator) (push) Failing after 33s
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
Scorecard supply-chain security / Scorecard analysis (push) Failing after 41s
Close stale issues and PRs / stale (push) Failing after 27s
* Fix ManagedClusterAddons not removed when ClusterManagementAddon is deleted

The addon template controller was stopping addon managers immediately when
ClusterManagementAddon was deleted, without waiting for pre-delete jobs
to complete or ManagedClusterAddons to be cleaned up via owner reference
cascading deletion.

This change implements the TODO at line 105 by checking if all
ManagedClusterAddons are deleted before stopping the manager. The controller
now uses field selectors to efficiently query for remaining ManagedClusterAddons
and requeues after 10 seconds if any still exist, allowing time for proper
cleanup.

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

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

* add e2e test

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

* return err when stopUnusedManagers failed

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

* Address review comments for addon manager deletion fix

- Use lister instead of API client for better performance
- Add named constant for requeue delay
- Fix test cache synchronization issues
- Improve test coverage from 74.7% to 75.6%

Addresses review feedback from Qiujian16 and CodeRabbit.

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

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

* Fix e2e test timeout for configmap deletion check

Add explicit 180s timeout for pre-delete job configmap cleanup.
The default 90s timeout was insufficient for the deletion workflow.

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

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

* Improve error logging in template agent

- Replace utilruntime.HandleError with structured logging in CSR functions
- Add more context to error messages for better debugging
- Use logger.Info for template retrieval errors to provide better visibility

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

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

* Use ManagedClusterAddonByName index for efficient lookup

- Replace inefficient list-and-filter with indexed lookup
- Add managedClusterAddonIndexer field to controller struct
- Update comment to accurately describe functionality
- Fix unit tests to properly set up the required index

This addresses the PR review feedback to use the existing index
instead of listing all ManagedClusterAddOns and filtering by name.

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

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

* Remove unused mcaLister field

Since we now use managedClusterAddonIndexer for efficient lookup,
the mcaLister field is no longer needed. This cleanup reduces
memory usage and simplifies the controller structure.

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

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

* Replace inefficient list-and-filter with indexed lookup in runController

Use managedClusterAddonIndexer.ByIndex() instead of listing all ManagedClusterAddOns
and filtering by name. This provides O(1) indexed lookup instead of O(n) linear scan.

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

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

* Fix review comments for addon manager deletion

- Fix closure capture bug in controller test by using captured variables
- Fix typo 'copyiedConfig' to 'copiedConfig' in e2e tests

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

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

* Optimize ManagedClusterAddOn event handling in addon template controller

Replace filtered event handling with custom event handlers that only trigger
reconciliation when AddOnTemplate configReferences actually change. This
reduces unnecessary reconciliation cycles by using reflect.DeepEqual to
compare config references between old and new objects.

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

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

* Revert "Optimize ManagedClusterAddOn event handling in addon template controller"

This reverts commit 4649d1b9ac.

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-10 01:30:19 +00:00
Jian Zhu
c93f90f59a 🐛 Fix helm command syntax in e2e test deployment (#1168)
* Fix helm command syntax in e2e test deployment

Remove unnecessary commas from --set flags in helm commands.
Multiple --set flags don't require commas between them.

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

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

* Add comprehensive image tag validation to e2e tests

- Add configurable expected-image-tag parameter to e2e test suite
- Create image_tag_validation_test.go with comprehensive validation:
  * Validates all container images in cluster-manager and klusterlet deployments use expected tag
  * Validates test image variables (registrationImage, workImage, singletonImage) end with expected tag
  * Validates ClusterManager spec imagePullSpec fields use expected tag
- Pass IMAGE_TAG to e2e tests via expected-image-tag parameter
- Use BeforeEach to avoid duplicate validation checks

This ensures IMAGE_TAG=e2e properly propagates to all OCM components.

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

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

* Move image validation from separate test to BeforeSuite

- Move all image validation logic from image_tag_validation_test.go to BeforeSuite in e2e_suite_test.go
- Validates test image variables, ClusterManager spec, and deployment containers in setup phase
- Provides early failure detection if image configuration is incorrect
- Removes duplicate test file and function declarations

This ensures image validation runs once during test setup rather than as separate test cases.

🤖 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-05 02:01:37 +00:00
Jian Qiu
e0b4d46538 Fix addon install namespace issue in loopback e2e (#1162)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 45s
Post / coverage (push) Failing after 29s
Post / images (amd64, addon-manager) (push) Failing after 23s
Post / images (amd64, placement) (push) Failing after 27s
Post / images (amd64, registration) (push) Failing after 25s
Post / images (amd64, registration-operator) (push) Failing after 28s
Post / images (amd64, work) (push) Failing after 29s
Post / images (arm64, addon-manager) (push) Failing after 33s
Post / images (arm64, placement) (push) Failing after 23s
Post / images (arm64, registration) (push) Failing after 27s
Post / images (arm64, registration-operator) (push) Failing after 27s
Post / images (arm64, work) (push) Failing after 27s
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-04 03:55:34 +00:00
Jian Qiu
2657dd62a2 Fix flaky loopback e2e (#1155)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 22s
Post / coverage (push) Failing after 28s
Post / images (amd64, addon-manager) (push) Failing after 28s
Post / images (amd64, placement) (push) Failing after 31s
Post / images (amd64, registration) (push) Failing after 31s
Post / images (amd64, registration-operator) (push) Failing after 27s
Post / images (amd64, work) (push) Failing after 34s
Post / images (arm64, addon-manager) (push) Failing after 32s
Post / images (arm64, placement) (push) Failing after 25s
Post / images (arm64, registration) (push) Failing after 27s
Post / images (arm64, registration-operator) (push) Failing after 24s
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
Close stale issues and PRs / stale (push) Successful in 34s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-09-02 03:57:02 +00:00
Jian Qiu
c5f6e30ab8 Ignore already existing error when creating cluster (#1142)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 43s
Post / coverage (push) Failing after 47s
Post / images (amd64, addon-manager) (push) Failing after 33s
Post / images (amd64, placement) (push) Failing after 39s
Post / images (amd64, registration) (push) Failing after 32s
Post / images (amd64, registration-operator) (push) Failing after 37s
Post / images (amd64, work) (push) Failing after 39s
Post / images (arm64, addon-manager) (push) Failing after 42s
Post / images (arm64, placement) (push) Failing after 42s
Post / images (arm64, registration) (push) Failing after 36s
Post / images (arm64, registration-operator) (push) Failing after 34s
Post / images (arm64, work) (push) Failing after 27s
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
In integration test, there is change that creating cluster fails
since the cluster is created in the test. The alreadyExist
error should be ignored

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-08-28 03:33:42 +00:00
Jian Qiu
a9424bcca2 Fix flaky issue in e2e tests (#1138)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 41s
Post / coverage (push) Failing after 38s
Post / images (amd64, addon-manager) (push) Failing after 40s
Post / images (amd64, placement) (push) Failing after 28s
Post / images (amd64, registration) (push) Failing after 40s
Post / images (amd64, registration-operator) (push) Failing after 43s
Post / images (amd64, work) (push) Failing after 41s
Post / images (arm64, addon-manager) (push) Failing after 34s
Post / images (arm64, placement) (push) Failing after 39s
Post / images (arm64, registration) (push) Failing after 37s
Post / images (arm64, registration-operator) (push) Failing after 40s
Post / images (arm64, work) (push) Failing after 43s
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 1m8s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-08-26 13:40:08 +00:00
Zhiwei Yin
ea80afec78 check works in the addon management e2e case (#1015)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 2m2s
Post / coverage (push) Failing after 32m55s
Post / images (amd64) (push) Failing after 8m22s
Post / images (arm64) (push) Failing after 7m55s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 54s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-06-06 11:44:59 +00:00
Jian Qiu
0734a0b763 Enable about-api when ClusterProperty featuregate is enabled (#1025)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2025-06-06 10:11:30 +00:00
Zhiwei Yin
e78a3a6d3d add deletionPolicy for manifestworkReplicaset (#996)
Some checks failed
Post / coverage (push) Failing after 26m38s
Post / images (amd64) (push) Failing after 3m24s
Post / images (arm64) (push) Failing after 2m59s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m13s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
2025-05-28 01:12:21 +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
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
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
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
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
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 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
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
xuezhao
6c4292b1bc Refactor tester to e2e framework. (#565)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-07-24 01:31:58 +00:00
Jian Qiu
8c1d286b11 Refactor registration (#535)
* Refactor registration

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

* Fix integration test

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

* Refactor cert controller to secret controller

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

* Update health check func

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-07-17 14:14:11 +00:00
xuezhao
9a7efaed5d Using default timeout in hosted cases. (#566)
Signed-off-by: GitHub <noreply@github.com>
2024-07-11 03:11:09 +00:00
xuezhao
4b77db89c5 Explicitly name and use UNIVERSAL klusterlet/managedcluster. (#556)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-07-09 09:54:21 +00:00
xuezhao
da8d81a22c Refactor: timeout and interval usage in e2e (#563)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-07-09 01:33:50 +00:00
xuezhao
990a639661 Fix: addon manager flaky error. (#558)
Signed-off-by: GitHub <noreply@github.com>
2024-07-08 01:52:19 +00:00
Jian Zhu
3b2601dcfb Support daemonSet with AddOnTemplate (#521)
Signed-off-by: zhujian <jiazhu@redhat.com>
2024-06-19 15:57:46 +00:00
Jian Zhu
00c39e2712 🐛 Refresh external managed token secret if service account is deleted (#504)
* Refresh external managed token secret if service account is deleted

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

* Debug e2e

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2024-06-06 13:17:23 +00:00
Jian Qiu
a31ee084a7 Always create default addon namespace (#457)
The addon namespace should always be default on.
The operator will not create addon ns based
on klusterlet install namespace.

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-05-14 07:08:53 +00:00
Jian Qiu
5fc1dbdce7 🐛 Remove old ns when klusterlet ns is changed (#442)
* Remove old ns when klusterlet ns is changed

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

* Resolve comments

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-05-06 03:15:48 +00:00
Jian Qiu
a7adf5d517 Set install namespace of addonTemplate from config (#417)
* Set install namespace of addonTemplate from config

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

* Add an e2e test case

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

---------

Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-04-22 08:32:44 +00:00
Jian Qiu
37693a4c58 Get default registration namespace from template manifest (#427)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-04-17 09:42:28 +00:00
Qing Hao
ff77abd312 upgrade addon-framework (#383)
Signed-off-by: haoqing0110 <qhao@redhat.com>
2024-03-28 03:15:15 +00:00
xuezhao
693787d507 Update EventuallyTimeout in work_workload_test.go (#380)
Signed-off-by: GitHub <noreply@github.com>
2024-03-19 04:17:30 +00:00
Jian Qiu
1d42f4285e Switch to sdk-go for helper functions (#346)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2024-01-17 14:28:54 +00:00
xuezhaojun
320b73c895 Fix: move enable ReplicaSet controller at the beginning. (#343)
Signed-off-by: xuezhaojun <zxue@redhat.com>
2024-01-12 02:52:23 +00:00
Jian Zhu
6571a8a4d9 Support setting manifest work config by addon template (#308)
*  Support setting manifest work config by addon template

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

* add unit tests

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

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
2023-11-20 14:09:38 +00:00
Mohamed ElSerngawy
615f5a4441 Update OCM APIs and apply Rollout strategy API changes (#310)
Signed-off-by: melserngawy <melserng@redhat.com>
2023-11-16 02:36:16 +00:00
Mohamed ElSerngawy
35680c3ca3 Implement ManifestWorkReplicaSet RollOut strategy (#259)
* Implement rollout strategy

Signed-off-by: melserngawy <melserng@redhat.com>

* Update API and new logic

Signed-off-by: melserngawy <melserng@redhat.com>

---------

Signed-off-by: melserngawy <melserng@redhat.com>
2023-11-02 03:08:35 +00:00
Jian Zhu
e6443b6523 Update permission config in addontemplate (#285)
Signed-off-by: zhujian <jiazhu@redhat.com>
2023-09-21 22:08:17 -04:00
Jian Qiu
bd4982fffc Fix: change singleton agent sa to work sa (#279)
Signed-off-by: Jian Qiu <jqiu@redhat.com>
2023-09-15 10:01:14 +02:00
Jian Zhu
90c1dcb5bc set agent install namespace from addon deployment config for template type addons (#266)
Signed-off-by: zhujian <jiazhu@redhat.com>
2023-09-12 09:42:06 +02: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