Configuration-based installation of OpenShift and Cloud Pak for Data/Integration/Watson AIOps on various private and public cloud infrastructure providers. Deployment attempts to achieve the end-state defined in the configuration. If something fails along the way, you only need to restart the process to continue the deployment.
Describe the bug
If using existing cluster and kubeconfig file as a login method, the process fails due to missing keyword in task cloud-pak-deployer/automation-roles/99-generic/openshift/openshift-login/tasks/existing-ocp-check-kubeconfig.yml
To Reproduce
Steps to reproduce the behavior:
Use an existing cluster configuration file
Create kubeconfig vault secret
Run env apply
Process fails with message oc use-context command doesnt exist
Expected behavior
Process should complete successfully
Additional context
problem in line5 file cloud-pak-deployer/automation-roles/99-generic/openshift/openshift-login/tasks/existing-ocp-check-kubeconfig.yml
1 ---
2 # If a kubeconfig file is used to login to the cluster, check that the context is correct
3 - name: Set current context
4 shell:
5 oc use-context {{ _p_openshift_cluster_name }} <<<<
6 failed_when: False
Adding config keyword fixes the problem
1 ---
2 # If a kubeconfig file is used to login to the cluster, check that the context is correct
3 - name: Set current context
4 shell:
5 oc config use-context {{ _p_openshift_cluster_name }}
6 failed_when: False
Describe the bug If using existing cluster and kubeconfig file as a login method, the process fails due to missing keyword in task
cloud-pak-deployer/automation-roles/99-generic/openshift/openshift-login/tasks/existing-ocp-check-kubeconfig.yml
To Reproduce Steps to reproduce the behavior:
oc use-context
command doesnt existExpected behavior Process should complete successfully
Additional context problem in line5 file
cloud-pak-deployer/automation-roles/99-generic/openshift/openshift-login/tasks/existing-ocp-check-kubeconfig.yml
Adding config keyword fixes the problem