-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set cluster_kubeconfig based on the type of resource available in provider cluster only #10172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this is good and it can help to fix a lot of test cases without editing them. It would be good to have this included with cluster context too but it is enough to have it as TODO for now.
The note about simultaneous usage could be solved if each context have assigned static address to its kubeconfig - The static path to kubeconfig needs to exist for this PR to work. In this way the kubeconfig wouldn't have to be specifically provided but it would be used from the context and users would have access to other environment information like config parameters for the given context. It would also mitigate conflicts in different context and kubeconfig.
It would also mean not to provide kubeconfig in parameter but to add cluster_context as parameter (and use current context (config.cluster_ctx.MULTICLUSTER.get("multicluster_index")) as default).
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dahorak, fbalak, jilju The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR validation
Cluster Name:
Cluster Configuration:
PR Test Suite: acceptance
PR Test Path: tests/
Additional Test Params:
OCP VERSION: 4.17
OCS VERSION: 4.17
tested against branch: master
Verified that this change is not breaking anything
Verified in provider-client multicluster run https://ocs4-jenkins-csb-odf-qe.apps.ocp-c1.prod.psi.redhat.com/job/qe-odf-multicluster/2677/ |
…vider cluster only Signed-off-by: Jilju Joy <[email protected]>
1d98766
to
e623db4
Compare
New changes are detected. LGTM label has been removed. |
In provider mode multicluster run, set 'cluster_kubeconfig' if the resource kind is available only in provider cluster.
Advantages:
Example: Need not bother about the current cluster context when using the function
ocs-ci/ocs_ci/ocs/resources/storage_cluster.py
Line 1658 in 0b95c6f
eg: When using threading (or a mechanism to run two oc commands at the same time) , get StorageCluster(from provider) and application pod(from client) at the same time. Switching context is not helpful in this situation.
Limitations: