Commit Graph

230 Commits

Author SHA1 Message Date
karmada-bot d1433e2562
Merge pull request #5583 from mohamedawnallah/unitTestEtcdOperatorPkg
operator/pkg/controlplane: unit test etcd
2024-10-18 11:56:29 +08:00
karmada-bot cfadb48084
Merge pull request #5576 from mohamedawnallah/unitTestControlPlaneOperatorPkg
operator/pkg/controlplane: unit test apiserver
2024-10-18 11:53:28 +08:00
karmada-bot 9531f0f3bb
Merge pull request #5603 from mohamedawnallah/unitTestRBACOperator
operator/pkg/karmadaresource: unit test RBAC
2024-10-18 11:49:28 +08:00
karmada-bot fc7da71575
Merge pull request #5585 from mohamedawnallah/unitTestMetricsAdapter
operator/pkg/controlplane: unit test Metrics Adapter
2024-10-18 11:24:28 +08:00
karmada-bot 12aa64e9fc
Merge pull request #5565 from mohamedawnallah/unitTestKarmadaControllerOfOperator
operator/pkg/controller/karmada: unit test Karmada controller
2024-10-18 11:21:28 +08:00
karmada-bot 1a958e2558
Merge pull request #5596 from mohamedawnallah/unitTestAPIServiceKarmadaResourceOperatorPkg
operator/pkg/karmadaresource/apiservice: unit test apiservice
2024-10-18 10:20:28 +08:00
karmada-bot ee1e751327
Merge pull request #5587 from mohamedawnallah/unitTestKarmadaSearchControlPlaneOperatorPkg
operator/pkg/controlplane: unit test karmada search
2024-10-18 10:05:28 +08:00
Mohamed Awnallah 06a45c3ad4 operator/pkg/controller: test karmada controller
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-18 03:48:26 +03:00
Mohamed Awnallah 1474463e81 operator/pkg: test apiservice
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-17 19:28:05 +03:00
karmada-bot 0d55eadb89
Merge pull request #5659 from mohamedawnallah/unitTestWaitAPIClient
operator/pkg/util/apiclient: unit test wait
2024-10-17 20:41:29 +08:00
karmada-bot 29c97e9848
Merge pull request #5602 from mohamedawnallah/dependOnAggregatorInterface
operator/pkg: depend on `aggregator.Interface` instead of `*aggregator.Clientset`
2024-10-17 11:58:28 +08:00
karmada-bot 46d94ecc86
Merge pull request #5647 from mohamedawnallah/unitTestWorkflowJob
operator/pkg/workflow: unit test job
2024-10-17 11:12:28 +08:00
karmada-bot c230b14827
Merge pull request #5560 from mohamedawnallah/fixNullPointerDereferenceInAltNamesMutators
operator/pkg/certs: mitigate potential null pointer dereference in AltNames Mutators for both the `APIServer` and `EtcdServer`
2024-10-17 09:28:28 +08:00
Mohamed Awnallah f74dbb0519 operator/pkg/karmadaresource: test RBAC
In this commit, we add unit tests for the RBAC in the karamada resource
operator pkg making sure Karmada Resource View Clusterrole and Karmada
Resource Edit Clusterrole are working as expected.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 20:48:45 +03:00
Mohamed Awnallah a7dd3f887c operator/pkg/controlplane: test karmada search
In this commit, we include unit tests for karmada search in the
operator control plane package to make sure installing karmada search
and its associated service are working as expected.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 20:41:23 +03:00
Mohamed Awnallah f9d9b098c1 operator/pkg/controlplane: test metricsadapter
In this commit, we add unit tests for the metrics adapter controlplane pkg
of the operator making sure that installing Karmada Metrics Adapter Deployment
works as expect and its associated service.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 20:40:40 +03:00
Mohamed Awnallah 4bec426855 operator/pkg/controlplane: test etcd
In this commit, we include unit test cases for the etcd controlplane
pkg of the operator making sure that installing Karmada Etcd Statefulset
works as expected and its associated Etcd client/peer services.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 20:39:54 +03:00
Mohamed Awnallah 255b0b859f operator/pkg/controlplane: test apiserver
In this commit, we introduce unit tests for both control plane
apiserver and aggregated apiserver for the operator.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 20:38:32 +03:00
Mohamed Awnallah 5ef98ec66f operator/pkg/util: unit test patcher
In this commit, we unit test the patcher in the karmada operator
pkg on patching the Deployment and StatefulSet K8S objects.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-16 19:59:19 +03:00
karmada-bot 268e6725a0
Merge pull request #5676 from mohamedawnallah/unitTestKubeConfigDeInit
operator/pkg/tasks/deinit: unit test kubeconfig
2024-10-14 15:54:25 +08:00
karmada-bot dcdabc9278
Merge pull request #5678 from mohamedawnallah/unitTestComponentDeInitTask
operator/pkg/tasks/deinit: unit test component
2024-10-14 15:32:25 +08:00
Mohamed Awnallah 085148bfc6 operator/pkg/util/apiclient: unit test wait
In this commit, we unit test the API client on waiting for API server,
API service, all pods constraint, some pods constraint, and the exponential
backoff utility.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-12 10:46:22 +03:00
Mohamed Awnallah 04d073c12d operator/pkg/tasks: unit test wait init task
In this commit, we unit test wait init task on waiting for Karmada APIServer
and Karmada Control Plane components.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-12 10:42:01 +03:00
karmada-bot 201409c98c
Merge pull request #5643 from mohamedawnallah/unitTestCertDeInitTaskOperatorPkg
operator/pkg/tasks/deinit: unit test cert
2024-10-12 15:07:24 +08:00
karmada-bot 23bcebc82c
Merge pull request #5624 from mohamedawnallah/unitTestAPIServerTaskInitOperatorPKG
operator/pkg/tasks: unit test apiserver
2024-10-12 14:16:23 +08:00
Mohamed Awnallah fddfb29a85 operator/pkg/tasks/deinit: unit test component
In this commit, we unit test component deinit task in the karmada
operator package on removing component subtasks and etcd component.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-12 08:41:50 +03:00
Mohamed Awnallah 2c7aea5f9e operator/pkg/tasks: test cert deinit task
In this commit, we unit test the cert deinit task on the
clean up operations.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-12 07:23:20 +03:00
karmada-bot 0f26e6e95c
Merge pull request #5590 from mohamedawnallah/unitTestKarmadaControlPlaneOperatorPkg
operator/pkg/controlplane: unit test controlplane
2024-10-12 11:49:23 +08:00
karmada-bot 3e0516fb96
Merge pull request #5588 from mohamedawnallah/unitTestKarmadaWebhook
operator/pkg/controlplane: unit test karmada webhook
2024-10-12 11:23:23 +08:00
Mohamed Awnallah cbeb308cdf operator/pkg/tasks/deinit: unit test kubeconfig
In this commit, we unit test kubeconfig deinit task in the operator
package on cleaning up the secret if it has the given labels.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-11 21:11:26 +03:00
Mohamed Awnallah 11bd90ecf8 operator/pkg/workflow: test job
In this commit, we unit test the job workflow in the operator
package on initializing the running data runtime interface and
running tasks and subtasks recursively.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-11 12:57:49 +03:00
karmada-bot 21467f88e5
Merge pull request #5665 from mohamedawnallah/unitTestKubeConfigUtilOperatorPKG
operator/pkg/util: unit test kubeconfig
2024-10-11 15:13:23 +08:00
Mohamed Awnallah 95ba0cdee9 operator/pkg/util: unit test kubeconfig
In this commit, we unit test kubeconfig utility in the karmada
operator package on building client from secret reference and checking
whether the given cluster is local or remote.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: zhzhuang-zju <m17799853869@163.com>
2024-10-11 05:29:56 +03:00
karmada-bot 6e41d9b930
Merge pull request #5666 from mohamedawnallah/unitTestNamingUtil
operator/pkg/util: unit test naming
2024-10-11 10:08:22 +08:00
karmada-bot cadb9461a8
Merge pull request #5667 from mohamedawnallah/unitTestTemplateUtil
operator/pkg/util: unit test template
2024-10-11 10:05:22 +08:00
Mohamed Awnallah 56bdcc4fed operator/pkg/util: unit test template
In this commit, we unit test template on parsing template functionality
on parsing and executing html templates with passed args.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-10 17:22:35 +03:00
Mohamed Awnallah 32a85f0df3 operator/pkg/util: unit test naming
In this commit, we unit test naming `generateResourceName` utility
on given karmada component name and suffix.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-10 16:49:33 +03:00
Mohamed Awnallah 9afcc155a2 operator/pkg/util: unit test endpoint
In this commit, we unit test endpoint on getting control plane
endpoint and API Service IP.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-10 10:47:17 +03:00
Mohamed Awnallah ecdc909505 operator/pkg/tasks: unit test apiserver
In this commit, we introduce unit tests for the apiserver init
task in the operator pkg by testing the running and waiting operations
on Karmada API Server and Karmada Aggregated API Server.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-10 07:54:54 +03:00
Mohamed Awnallah fdf7b53586 operator/pkg: add test helpers
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-10-09 04:57:48 +03:00
karmada-bot 59e302558d
Merge pull request #5616 from mohamedawnallah/dependOnClientSetInterface
operator+pkg:  depend on `clientset.Interface` instead of `*clientset.Clientset`
2024-09-29 15:11:12 +08:00
Mohamed Awnallah a640f0969f operator+pkg: depend on clientset.Interface for DI
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-27 15:35:40 +03:00
Mohamed Awnallah 6c490dcefa operator: depend on aggregator.Interface for DI
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-27 15:16:25 +03:00
karmada-bot 4f7dc2c409
Merge pull request #5605 from mohamedawnallah/unitTestWebhookConfigurationKarmadaOperator
operator/pkg/karmadaresource: unit test `ValidatingWebhookConfiguration` and `MutatingWebhookConfiguration`
2024-09-26 11:22:10 +08:00
karmada-bot 53c4697d6f
Merge pull request #5607 from mohamedawnallah/unitTestSchemeKarmadaOperator
operator/pkg/scheme: unit test scheme
2024-09-26 09:58:09 +08:00
Mohamed Awnallah 43a933ca52 operator/pkg: test scheme
In this commit, we unit test the init scheme functionality of the operator
by checking that both k8s core scheme and operator v1alpha1 scheme are added.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-25 22:54:16 +03:00
Mohamed Awnallah b020df1d2c operator/pkg: test webhook configurations
In this commit, we introduce unit tests for mutating and validating webhook
configurations to make sure they are working as expected.

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
2024-09-25 17:46:56 +03:00
karmada-bot 5e36f170e5
Merge pull request #5593 from mohamedawnallah/updateOperatorTagInstallationDocs
operator/README.md: redirect users to the latest `karmada-operator` released tag
2024-09-25 10:55:09 +08:00
karmada-bot 5f7fc4fe8e
Merge pull request #5572 from chaosi-zju/operator-rbac
`karmada-operator`: Grand proxy permission to system:admin
2024-09-24 16:55:08 +08:00
chaosi-zju 25357ee5b4 authorize system:admin to proxy member clusters during installation
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
2024-09-24 11:47:18 +08:00