Commit Graph

5986 Commits

Author SHA1 Message Date
karmada-bot b630d14544
Merge pull request #5496 from mohamedawnallah/unitTestClusterOverridePolicy
pkg/webhook: unit test cluster override policy
2024-09-21 17:29:06 +08:00
karmada-bot 6804af4d04
Merge pull request #5495 from mohamedawnallah/unitTestOverridePolicy
pkg/webhook: unit test override policy
2024-09-21 17:09:06 +08:00
changzhen 99c5bf4f22 fix ut failed in federatedresourcequota
Signed-off-by: changzhen <changzhen5@huawei.com>
2024-09-21 16:50:58 +08:00
karmada-bot 6c484ca2ec
Merge pull request #5518 from mohamedawnallah/unitTestMultiClusterIngress
pkg/webhook: unit test Multi-Cluster Ingress
2024-09-21 14:35:06 +08:00
chaosi-zju 6edb9cee1e Remove deprecated --bind-address and --secure-port from karmada-descheduler
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
2024-09-21 10:59:24 +08:00
karmada-bot 21c18eb132
Merge pull request #5544 from mohamedawnallah/refactorFederatedResourceQuota
pkg/webhook: refactor Federated Resource Quota test
2024-09-21 10:40:05 +08:00
RainbowMango aa61791ccb Proposing preserve API to support migration sceanrios
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
2024-09-20 18:26:53 +08:00
chaosi-zju 03023103d6 Remove deprecated --bind-address and --secure-port from karmada-scheduler
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
2024-09-20 18:10:37 +08:00
karmada-bot b8edec1ef6
Merge pull request #5533 from zhzhuang-zju/autocompletion
Implementing autocompletion for karmadactl
2024-09-20 10:35:05 +08:00
zhzhuang-zju a684edd354 Implementing autocompletion for karmadactl
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-20 09:42:40 +08:00
karmada-bot 836b8789d7
Merge pull request #5562 from mohamedawnallah/unitTestResourceInterpreterCustomization
pkg/webhook: unit test ResourceInterpreterCustomization
2024-09-20 09:32:05 +08:00
karmada-bot e97f2bb113
Merge pull request #5555 from seanlaii/remove-parameter-scheduler-estimator
Remove deprecated `--bind-address` and `--bind-address` from `karmada-scheduler-estimator`
2024-09-19 18:58:04 +08:00
Anuj Agrawal 547a6a94bc Added tests for gracefuleviction controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for gracefuleviction controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for gracefuleviction contoller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for gracefuleviction controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for gracefuleviction controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-09-19 13:12:14 +05:30
karmada-bot ef7d528a98
Merge pull request #5549 from whitewindmills/remove-params-kcm
Removed deprecated `--bind-address` and `--bind-address` from `karmada-controller-manager`
2024-09-19 09:33:04 +08:00
karmada-bot ec0521a754
Merge pull request #5216 from yanfeng1992/fix-apienables
skip the filter if the cluster is already in the list of scheduling result even if the API is missed
2024-09-18 20:28:04 +08:00
karmada-bot 96622c6be4
Merge pull request #5548 from whitewindmills/deprecate-param
Remove deprecated `--bind-address` and `--secure-port` from `karmada-agent`
2024-09-18 15:16:03 +08:00
huangyanfeng 4c416cec6f Skip cluster removal if already scheduled and API enablements are incomplete to prevent accidental removal.
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
2024-09-18 14:23:00 +08:00
Mohamed Awnallah 466634ac3d pkg/webhook: test ResourceInterpreterCustomization
In this commit, we introduce unit tests for `ValidationAdmission`
webhook for the `ResourceInterpreterCustomization` resource. The
tests include:

- Tests how the webhook responds when decoding the request object fails.
- Tests how the webhook responds when it fails to retrieve list of objects from a namespace.
- Ensures that invalid `ResourceInterpreterCustomization` spec denies the admission.
- Confirms that valid `ResourceInterpreterCustomization` spec are allowed through without errors.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-16 16:17:13 +03:00
Mohamed Awnallah 89794f167b operator/pkg/certs: fix null ptr deref in altnames
In this commit, we fix th null pointer dereference issue
that happens in altnames mutators for both Karmada APIServer
and EtcdServer when accessing the `Components` field on
`AltNamesMutatorConfig` struct.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-16 11:39:55 +03:00
wei-chenglai a72b72ba93 Remove BindAddress & SecurePort of karmada-scheduler-estimator
Signed-off-by: wei-chenglai <qazwsx0939059006@gmail.com>
2024-09-16 00:03:38 -04:00
Mohamed Awnallah d2259d52a1 pkg/webhook: test Multi-Cluster Ingress
In this commit we introduce unit tests for the `Validation Admission`. These
tests ensure correct behavior for various validation scenarios and improve coverage:

- Tests the behavior when decoding the request object fails, verifying
  that admission is denied with an appropriate error message.
- Validates that the webhook denies admission when encountering invalid values in the
  `MultiClusterIngress` spec, ensuring error messaging.
- Confirms that valid `MultiClusterIngress` objects are admitted without errors.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-14 13:13:49 +03:00
karmada-bot 4c8bcd4af1
Merge pull request #5540 from zhzhuang-zju/releasenote1.11-1
publish release note for v1.11.1, v1.10.5, v1.9.7
2024-09-14 17:26:00 +08:00
zhzhuang-zju 7b48ea65c2 publish release note for v1.11.1, v1.10.5, v1,9.7
Signed-off-by: zhzhuang-zju <m17799853869@163.com>
2024-09-14 16:32:25 +08:00
karmada-bot ba360c9aa7
Merge pull request #5546 from jabellard/controller_manager_deployment
Fix mTLS Configuration for Karmada Scheduler & Descheduler Components
2024-09-14 10:55:59 +08:00
whitewindmills 73c441f7a6 Remove BindAddress & SecurePort of karmada-controller-manager
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-09-14 10:54:15 +08:00
whitewindmills f33bc3820f Remove BindAddress & SecurePort of karmada-agent
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-09-14 10:44:27 +08:00
karmada-bot e76ce6355b
Merge pull request #5400 from whitewindmills/apienablement-condition
add new cluster condition: CompleteAPIEnablements
2024-09-14 09:39:00 +08:00
Joe Nathan Abellard 24d9e12e5c Set Karmada Cert Secret Used For Configurating mTLS for Scheduler & Descheduler Components
Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>
2024-09-13 16:14:31 -04:00
Mohamed Awnallah fe408f9ad6 pkg/webhook: refactor Federated Resource Quota
In this commit, we refactor `FederatedResourceQuota` webhook
mainly matching on substrings instead of whole strings for reliability
and resilience and reformat the test case names to follow format
`Function_Scenario_ExpectedResult` for better readability.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 19:29:17 +03:00
whitewindmills 3307a52627 add new cluster condition: IncompleteAPIEnablements
Signed-off-by: whitewindmills <jayfantasyhjh@gmail.com>
2024-09-13 17:40:24 +08:00
karmada-bot 2e60a6e8a5
Merge pull request #5494 from mohamedawnallah/unitTestClusterPropagationPolicy
pkg/webhook: unit test cluster propagation policy
2024-09-13 16:36:59 +08:00
karmada-bot c3d582ba31
Merge pull request #5537 from mohamedawnallah/refactorPropagationPolicyTest
pkg/webhook: refactor Propagation Policy test
2024-09-13 16:10:59 +08:00
Mohamed Awnallah 14c303022d pkg: test ClusterResourceBinding mutating webhook
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook that mutates the `ClusterResourceBinding` resource. These tests
ensure correct behavior for various mutation scenarios and improve coverage:

- Testing the handling of decode errors and ensuring that admission is denied
when decoding fails.
- Full coverage testing of policy mutation, including setting default UUID
labels for the `ClusterResourceBinding`.
- Verifying that only the expected patch for the UUID label is applied, ensuring
no other unnecessary mutations.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:27:01 +03:00
Mohamed Awnallah e689eafd3f pkg: test ResourceBinding mutating webhook
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook that mutates the `ResourceBinding` resource. These tests ensure
correct behavior for various mutation scenarios and improve coverage:

- Testing the handling of decode errors and ensuring that admission
is denied when decoding fails.
- Full coverage testing of policy mutation, including setting default
UUID labels for the `ResourceBinding`.
- Verifying that only the expected patch for the UUID label is applied,
ensuring no other unnecessary mutations.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:21:05 +03:00
karmada-bot bf83dfe87c
Merge pull request #5535 from anujagrawal699/addedTests-controllers/federatedresourcequota
Added tests for federatedresourcequota controller
2024-09-13 15:14:59 +08:00
Mohamed Awnallah f19f9c4a45 pkg/webhook: test OverridePolicy
In this commit, we introduce unit tests for both the `ValidationAdmission`
and `MutatingAdmission` webhooks specifically for the `OverridePolicy` resource.

- Validation webhook tests:
  - Tests the behavior when decoding the request object fails, verifying
    that admission is denied with an appropriate error message.
  - Validates that the webhook denies admission when encountering invalid
    label values in the `OverridePolicy` spec, ensuring proper error messaging.
  - Confirms that valid `OverridePolicy` objects are admitted without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of policy mutation, including setting default
    namespaces and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:14:04 +03:00
Mohamed Awnallah 87958641ae pkg/webhook: test ClusterPropagationPolicy
In this commit, we introduce unit tests for both the `ValidatingAdmission`
and `MutatingAdmission` webhooks for the `ClusterPropagationPolicy` resource.

The tests include:

- Validation webhook tests:
  - Tests how the webhook responds when decoding the request object fails.
  - Ensures updates to the `SchedulerName` field are denied, as it should remain immutable.
  - Validates that changes to the `ClusterPropagationPolicyPermanentIDLabel` label and its absence in creation requests are correctly handled.
  - Confirms that valid `ClusterPropagationPolicy` objects are allowed through without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of cluster policy mutation with default values and patch application.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 10:08:43 +03:00
Mohamed Awnallah 368b4b171d pkg/webhook: refactor propagation policy
In this commit, we refactor propagation policy names and check
on number of patches the mutation happens.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-13 09:56:50 +03:00
Anuj Agrawal 6bbbf9d8ae Added tests for federatedresourcequota controller
Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>

Added tests for federatedresourcequota controller

Signed-off-by: Anuj Agrawal <anujagrawal380@gmail.com>
2024-09-13 09:58:36 +05:30
karmada-bot 4dfff39d56
Merge pull request #5509 from jabellard/volumes_bindings_api_server
Support to Specify Extra Volumes and Volume Mounts for Karmada API Server Component
2024-09-12 20:34:58 +08:00
karmada-bot 071fb3d3b0
Merge pull request #5276 from jabellard/component_volumes
Proposal: Support to Specify Extra Volumes and Volume Mounts for Karmada Control Plane Components
2024-09-12 20:31:59 +08:00
Joe Nathan Abellard c45b817e74 Initial structure
Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Initial structure

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Update api

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Update api

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>
2024-09-12 07:41:13 -04:00
Joe Nathan Abellard 2dfd11dd7f Initial structure
Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Address comments

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Address comments

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>

Update api

Signed-off-by: Joe Nathan Abellard <contact@jabellard.com>
2024-09-12 07:36:58 -04:00
karmada-bot dc369864c6
Merge pull request #5534 from iawia002/owner
Remove me from resourceinterpreter OWNERS
2024-09-12 17:31:59 +08:00
Xinzhao Xu 19c0b4cbfa Remove me from resourceinterpreter OWNERS
Signed-off-by: Xinzhao Xu <z2d@jifangcheng.com>
2024-09-12 16:38:37 +08:00
karmada-bot 02e5e922e9
Merge pull request #5517 from mohamedawnallah/unitTestMultiClusterService
pkg/webhook: unit test Multi-Cluster Service
2024-09-12 15:58:59 +08:00
karmada-bot df76fd66fb
Merge pull request #5532 from mohamedawnallah/unitTestWorkWebhook
pkg/webhook: unit test Work
2024-09-12 15:57:58 +08:00
Mohamed Awnallah bd847422af pkg/webhook: test Work
In this commit, we introduce unit tests for the `MutatingAdmission`
webhook specifically for the `Work` resource. The mutation webhook
tests include the following:

- Handles decode errors and denies admission when decoding fails.
- Provides full coverage of policy mutation, including setting default
  and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-12 07:28:03 +03:00
Mohamed Awnallah d5c9a9d803 pkg/webhook: test Multi-Cluster Service
In this commit, we introduce unit tests for both the `ValidationAdmission`
and `MutatingAdmission` webooks specifically for the `MultiClusterService` resource.

- Validation webhook tests:
  - Tests the behavior when decoding the request object fails, verifying
    that admission is denied with an appropriate error message.
  - Validates that the webhook denies admission when encountering invalid
    values in the `MultiClusterService` spec, ensuring error messaging.
  - Confirms that valid `MultiClusterService` objects are admitted without errors.

- Mutation webhook tests:
  - Handles decode errors and denies admission when decoding fails.
  - Provides full coverage of `MultiClusterService` object mutation,
    including setting default namespaces and validating no unnecessary patches.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-12 07:27:34 +03:00
karmada-bot 671372acb2
Merge pull request #5528 from anujagrawal699/addedTests-controllers/federatedhpa
Added tests for federatedhpa controller
2024-09-12 12:14:58 +08:00