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

fix: enabled auth add support watsonx backend #1190

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

gyliu513
Copy link
Contributor

@gyliu513 gyliu513 commented Jul 11, 2024

Closes #1189

📑 Description

gyliu@Guangyas-MacBook-Air k8sgpt % ./bin/k8sgpt auth add --backend watsonxai --providerId xxxxxxxxxx
Warning: model input is empty, will use the default value: gpt-3.5-turbo
Enter watsonxai Key: watsonxai added to the AI backend provider list
gyliu@Guangyas-MacBook-Air k8sgpt % bin/k8sgpt analyze --explain --backend watsonxai
 100% |█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (7/7, 2457 it/s)
AI Provider: watsonxai

0: Node instana-0()
- Error: instana-0 has condition of type EtcdIsVoter, reason MemberNotLearner: Node is a voting member of the etcd cluster


Error: etcd is a distributed, consistent key-value store that is used to store and retrieve data across a cluster of machines. When etcd is in a condition where it is a voting member and a member is not learning, it means that the node is unable to keep up with the cluster's consensus algorithm.

Solution: To resolve this issue, you should first check the etcd logs to identify any error messages or warnings related to the member not learning. If no such messages are present, you can try restarting the etcd member process on the affected node. This can be done by running the command "etcdctl member-list" and checking if the node is listed as a member. If it is not, you can restart the etcd member process using the command "etcdctl start".

Additionally, you can also ensure that the node has the latest etcd version installed. If the issue persists, you may need to contact the etcd support team for further assistance.

It's important to note that maintaining a healthy etcd cluster is crucial for the overall stability of your Kubernetes environment. Regularly monitoring etcd health and performance can help prevent such issues from occurring.

✅ 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

@gyliu513 gyliu513 requested review from a team as code owners July 11, 2024 18:47
@gyliu513 gyliu513 changed the title enabled auth add support watsonx backend fix: enabled auth add support watsonx backend Jul 11, 2024
@gyliu513 gyliu513 changed the title fix: enabled auth add support watsonx backend fix: Enabled auth add support watsonx backend Jul 11, 2024
@gyliu513 gyliu513 changed the title fix: Enabled auth add support watsonx backend fix: enabled auth add support watsonx backend Jul 11, 2024
Copy link
Contributor

@JuHyung-Son JuHyung-Son left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

and why hide the projectId?

@gyliu513
Copy link
Contributor Author

and why hide the projectId?

@JuHyung-Son I did not hide it, just remove it from here, as it is my own project id, updated it now using xxxx, hope it is ok. thanks!

@AlexsJones
Copy link
Member

I wanted to clarify this change as I don't have the ability to test it.
Was the previous version wrong or out of date? @gyliu513

@gyliu513
Copy link
Contributor Author

I wanted to clarify this change as I don't have the ability to test it.
Was the previous version wrong or out of date? @gyliu513

@AlexsJones The previous version is right, but the only problem is it request end user to set env vars for apikey and project id, this enhancement is trying to follow the pattern of k8sgpt to set apikey and projectid when adding auth, hope it is OK, thanks.

@matthisholleville
Copy link
Contributor

Hi @gyliu513. Why not uses ProviderId instead of ProjectId ? We already use this field for many of our providers. For example, for the Google provider, the project-id is retrieved from ProviderId. I think we should avoid creating backend-specific fields (unless they're mandatory because they don't already exist).

@gyliu513
Copy link
Contributor Author

@matthisholleville done, using providerId instead, thanks!

Copy link
Contributor

@matthisholleville matthisholleville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@matthisholleville matthisholleville merged commit d702209 into k8sgpt-ai:main Aug 20, 2024
8 checks passed
@gyliu513 gyliu513 deleted the wx branch August 20, 2024 13:02
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.

[Bug]: k8sgpt auth add do not support watsonx
4 participants