[ ] Add KUBECONFIG dest cluster check to stage 2 (will be in follow-up PR)
[ ] Add KUBECONFIG dest cluster check to stage 3 (will be in follow-up PR)
For stages 2 and 3, thinking changes will look like:
Check version endpoint for k8s minorVersion > 11 (this is the cutoff between OCP 3.x and 4.x), exit early with clear message to user if we find we're on the wrong OCP version. Let user configure an override version in ansible vars override_ocp_version_check
After good version verified, make copy of KUBECONFIG to "known good KUBECONFIG path"
For all issued oc commands and ansible k8s module invocations, use this "known good KUBECONFIG path" in oc --kubeconfig calls and k8s tasks
Going to merge this and add the stage 2 and 3 changes in a separate PR so that we don't run into rebase issues if changes are needed to this file for other reasons.
For stages 2 and 3, thinking changes will look like:
11
(this is the cutoff between OCP 3.x and 4.x), exit early with clear message to user if we find we're on the wrong OCP version. Let user configure an override version in ansible varsoverride_ocp_version_check
oc
commands and ansiblek8s
module invocations, use this "known good KUBECONFIG path" inoc --kubeconfig
calls andk8s
tasks