From ab589fcdbdc897625679c39717f13bbe1a6cea7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Lobillo?= Date: Thu, 6 Feb 2025 10:37:56 +0100 Subject: [PATCH] [shiftstack]Switch incluster-kubeconfig to admin context By switching to the admin context we facilitate the usage of the kubeconfig in the shiftstackclient pod. --- roles/shiftstack/tasks/deploy_shiftstackclient_pod.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/shiftstack/tasks/deploy_shiftstackclient_pod.yml b/roles/shiftstack/tasks/deploy_shiftstackclient_pod.yml index 37f5d60707..028373597f 100644 --- a/roles/shiftstack/tasks/deploy_shiftstackclient_pod.yml +++ b/roles/shiftstack/tasks/deploy_shiftstackclient_pod.yml @@ -14,6 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. +- name: Switch context to admin on {{ cifmw_openshift_kubeconfig }} + ansible.builtin.command: oc config use-context admin --kubeconfig={{ cifmw_openshift_kubeconfig }} + changed_when: true + - name: Encode kubeconfig file to Base64 ansible.builtin.set_fact: incluster_kubeconfig_base64: "{{ lookup('ansible.builtin.file', cifmw_openshift_kubeconfig ) | b64encode }}"