Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add watsonx ai provider #1163

Merged
merged 2 commits into from
Jul 1, 2024
Merged

feat: add watsonx ai provider #1163

merged 2 commits into from
Jul 1, 2024

Conversation

jinsongo
Copy link
Contributor

@jinsongo jinsongo commented Jun 19, 2024

Closes #

πŸ“‘ Description

Add IBM watsonx ai as AI provider for k8sGPT.
Document: k8sgpt-ai/docs#107

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

β„Ή Additional Information

The API key and project ID are hidden for security

$ k8sgpt auth add -b watsonxai -m ibm/granite-13b-chat-v2
watsonxai added to the AI backend provider list
$ export WATSONX_API_KEY=**************************
$ export WATSONX_PROJECT_ID=**************************
$ k8sgpt analyze -b watsonxai --explain

 100% || (3/3, 26 it/min)
AI Provider: watsonxai

0: Service openshift-machine-api/machine-api-controllers()
- Error: Service has no endpoints, expected label k8s-app=controller

Error: Service has no endpoints, expected label k8s-app=controller
Solution: Check the pod's annotations and ensure the label `k8s-app=controller` is present. If it's not, apply the label using the command `kubectl label pods <pod-name> k8s-app=controller`.
If the pod already has the label, check the service's selector and ensure it matches the pod's label. If it doesn't, update the service's selector using the command `kubectl apply -f <service-file>.yaml` and reapply the service.
If you're still experiencing issues, try checking the pod's status and the service's status using the command `kubectl get pods` and `kubectl get services`, respectively. This will help you identify any potential configuration issues.


1: Service openshift-machine-api/machine-api-operator-machine-webhook()
- Error: Service has no endpoints, expected label api=clusterapi
- Error: Service has no endpoints, expected label k8s-app=controller

Error: Service has no endpoints, expected label {api=clusterapi, k8s-app=controller}
Solution: Add the label "api=clusterapi" and "k8s-app=controller" to the service in the Kubernetes configuration file. This will ensure that the service has the required endpoints and labels.


2: Service openshift-machine-api/machine-api-operator-webhook()
- Error: Service has no endpoints, expected label api=clusterapi
- Error: Service has no endpoints, expected label k8s-app=controller

Error: Service has no endpoints, expected label {api=clusterapi, k8s-app=controller}
Solution: Add the label "api=clusterapi" and "k8s-app=controller" to the service in the Kubernetes configuration file. This will ensure that the service has the required endpoints and labels.

@jinsongo jinsongo requested review from a team as code owners June 19, 2024 18:43
Signed-off-by: JINSONG WANG <jswang@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants