In this commit we unify the usage of addon names i.e
`karmada-descheduler`, `karmada-scheduler-estimator`, `karmada-search`,
and `karmada-metrics-adapter` across the codebase.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: Hongcai Ren <renhongcai@huawei.com>
In this commit, we unit test clusterinfo on creating
bootstrap configmap and creating cluster info RBAC rules.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test unjoining cluster by
validating the unjoin cluster operation on arguments passed and
by verifying the deletion of all resources on the unjoining cluster
in case of cluster kubeconfig passed.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unti test promoting a namespace-scoped or
cluster-scoped resource in a legacy clsuter and validating the promote
options on karmadactl command.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test describe command on karmadactl
by mainly validating the describe options.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test the process of joining a cluster
to the Karmada control plane. The tests validate the arguments
passed to the join cluster operation and ensure the creation of
the new cluster runtime object. Additionally, we verify that the
necessary access secrets for the new cluster in push mode are correctly
generated in the Karmada control plane.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test logs on completion for pods/containers,
selectors, and member factory builder.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test exec on validating the execute options
on control plane and member clusters.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test cordon on karmadactl client
making sure the cordon/uncordon working as expected on a given cluster.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test bootstraptoken agent on tlsbootstrap
functionality by testing `AllowBootstrapTokensToPostCSRs`,
`AutoApproveKarmadaAgentBootstrapTokens`, and `AutoApproveAgentCertificateRotation`
making sure they are working as expected.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test `WaitAPIServiceReady` check function
that is utilized across addons and during init operations on waiting
for a non-existent aaAPIService, not-ready aaAPIService, and finally
where aaAPIService becomes ready before the timeout.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test descheduler addon on enabling,
disabling, and status operations. In addition to this we refactor
some code to utilize some utilities across karmadactl addons.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test metrics adapter on status
operations making sure metrics adapter deployed correctly
on both the host cluster and karmada control plane by checking
on deployment and aaAPIServices respectively.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
In this commit, we unit test install addons to make sure the
following addons `karmada-descheduler`, `karmada-metrics-adapter`,
`karmada-scheduler-estimator`, and `karmada-search` are already
configured.
Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>