-
Task
-
Resolution: Done
-
Major
-
None
-
None
Steps:
- Update context script to store merged kubeconfig as a secret on the hub in a custom clc namespace. Should consider if secret already exists and overwrite it.
- Move the context script to ci repo
- Update the clc post config jenkinsfile to add a stage to call this script
Acceptance Criteria:
- Have a common secret on the hub with the kubeconfig of the contexts of all the managed clusters on the hub
Should consider several types of cluster scenarios:
- Imported cluster with credential secret saved (auto-import-secret)
- Imported cluster with no credential secret saved
- Hive clusterdeployment clusters
- Hive clusterpool claimed clusters
- Hosted clusters
References:
Context script: https://github.com/stolostron/application-ui-test/blob/main/tests/cypress/scripts/mc_kubeconfigs/setup-cluster-contexts.sh
Note: context script does not consider other import methods such as via server api/token, it only works with clusters imported via kubeconfig
CLC Post config jenkins job https://tests-jenkins-csb-rhacm.apps.ocp-c1.prod.psi.redhat.com/view/CI/job/CI-Jobs/view/Components/job/ClusterLifecycle/job/clc_post_config/
CLC post config job repo: https://github.com/stolostron/acmqe-autotest/blob/main/ci/jenkinsfiles/components/clc/Jenkinsfile_clc_post_config
CLC scripts repo folder: https://github.com/stolostron/acmqe-autotest/tree/main/ci/scripts/clusterlifecycle
Example of auto import secret template https://github.com/stolostron/acmqe-go-library/blob/main/pkg/clusters/resources/cluster_auto_import_secret.yaml#L7