IBM / gen-ai-rag-watsonx-sample-application

Sample application that uses generative AI RAG pattern. Deployment target on IBM Cloud and uses IBM watsonx.ai, watsonx Assistant and Watson Discovery services
Apache License 2.0
6 stars 7 forks source link

Added script to check for RBAC sync before proceeding #18

Closed brendankellyibm closed 2 months ago

brendankellyibm commented 2 months ago
brendankellyibm commented 2 months ago

@in-1911 let me know if there's potentially an issue with using the login command so frequently - I was initially going to use oc get projectsto do the check but it's not as reliable and doesn't provide enough context in its output.

in-1911 commented 2 months ago

@brendankellyibm - have you tried using ibmcloud oc cluster config (may with --admin) to get the cluster credentials? I wonder if checking the result of that may be easier and more reliable.

brendankellyibm commented 2 months ago

That command results in the following:

brendankelly@Brendans-MBP ~ % ibmcloud oc cluster config -c bk-rag-slz-workload-cluster --admin
OK
The configuration for bk-rag-slz-workload-cluster was downloaded successfully.

Added context for bk-rag-slz-workload-cluster to the current kubeconfig file.
You can now execute 'kubectl' commands against your cluster. For example, run 'kubectl get nodes'.
If you are accessing the cluster for the first time, 'kubectl' commands might fail for a few seconds while RBAC synchronizes.

It actually calls out the RBAC synchronisation but doesn't really provide any insight into whether it's complete.

brendankellyibm commented 2 months ago

@in-1911 I believe it works now - I changed it to use oc get nodes and removed the redundant oc login command.