In this commit, we unit test crds on preparing, skipping,
downloading, and unpacking operations.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test rbac in the karmada init task
operator package by checking that cluster roles and their associated
cluster role bindings are created as expected.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
In this commit, we unit test naming `generateResourceName` utility
on given karmada component name and suffix.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test endpoint on getting control plane
endpoint and API Service IP.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
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>
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>
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>
In this commit, we add unit tests for Kube Controller Manager,
Karmada Controller Manager, Karmada Scheduler, and Karmada Descheduler
components.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we include unit tests for karmada webhook in the operator
controlplane package making sure that installing karmada webhook and its associated
service are working as expected.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
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>
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>
The new k8s.io/utils/ptr package provides generic wrapper functions,
which can be used instead of type-specific pointer wrapper functions.
This replaces the latter with the former, and migrates other uses of
the deprecated pointer package to ptr in affacted files.
See kubernetes/utils#283 for details.
Signed-off-by: Lan Liang <gcslyp@gmail.com>