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

'k8sgpt auth new' command missing 'engine' flag. #415

Closed
3 of 4 tasks
apc-jnytnai0613 opened this issue May 15, 2023 · 4 comments
Closed
3 of 4 tasks

'k8sgpt auth new' command missing 'engine' flag. #415

apc-jnytnai0613 opened this issue May 15, 2023 · 4 comments

Comments

@apc-jnytnai0613
Copy link

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

v0.3.0

Kubernetes Version

No response

Host OS and its Version

No response

Steps to reproduce

k8sgpt auth new

Expected behaviour

Provider must be added without problems.

Actual behaviour

$ k8sgpt auth new --backend azureopenai --baseurl https://xxxxxxxxxxx.openai.azure.com/ --engine test-k8sgpt-model --model gpt-35-turbo
Error: unknown flag: --engine
Usage:
  k8sgpt auth new [flags]

Flags:
  -b, --backend string                     Backend AI provider (default "openai")
  -u, --baseurl http://localhost:8080/v1   URL AI provider, (e.g http://localhost:8080/v1)
  -h, --help                               help for new
  -m, --model string                       Backend AI model (default "gpt-3.5-turbo")
  -p, --password string                    Backend AI password

Global Flags:
      --config string        config file (default is $HOME/.k8sgpt.yaml)
      --kubeconfig string    Path to a kubeconfig. Only required if out-of-cluster.
      --kubecontext string   Kubernetes context to use. Only required if out-of-cluster.

Additional Information

The following steps were taken to avoid the problem.

  1. Add provider without engine flag
$ k8sgpt auth new --backend azureopenai --baseurl https://xxxxxxxxxx.openai.azure.com/ --model gpt-35-turbo
Enter azureopenai Key: azureopenai added to the AI backend provider list
  1. Manually add the engine field to the k8sgpt.yaml file.
cat .config/k8sgpt/k8sgpt.yaml 
ai:
    providers:
        - name: azureopenai
          engine: test-k8sgpt-model ←Added
          model: gpt-3.5-turbo
          password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          baseurl: https://xxxxxxxxxxx.openai.azure.com/
kubeconfig: ""
kubecontext: ""
  1. I could analyze it.
$ k8sgpt analyze --explain --backend azureopenai
 100% |██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (2/2, 36 it/min)        

0 default/test(test)
- Error: Back-off pulling image "wrongimage"
The container is unable to download the required image "wrongimage". 

Solution: 
- Check if the image name is correct 
- Check if the image exists in the repository 
- Check if there are any network issues that may be preventing the download 
- Check if the required credentials are provided to access the repository 
- Restart the deployment or pod to trigger a fresh download of the image.
@AlexsJones
Copy link
Member

This is fixed in #400
We will try to get a release out today for you!

@AlexsJones
Copy link
Member

#391

@AlexsJones
Copy link
Member

Please try with v0.3.1 that just came out today and let us know if that solves the issue for you

@apc-jnytnai0613
Copy link
Author

@AlexsJones
Thanks for the release!
The problem has been resolved!

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

No branches or pull requests

2 participants