migtools / pvc-migrate

Standalone PVC migration
Apache License 2.0
5 stars 13 forks source link

Add KUBECONFIG logged in version check #74

Closed djwhatle closed 4 years ago

djwhatle commented 4 years ago

For stages 2 and 3, thinking changes will look like:

  1. 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
  2. After good version verified, make copy of KUBECONFIG to "known good KUBECONFIG path"
  3. For all issued oc commands and ansible k8s module invocations, use this "known good KUBECONFIG path" in oc --kubeconfig calls and k8s tasks
djwhatle commented 4 years ago

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.