Compare commits

..

1 Commits

Author SHA1 Message Date
Alex Jones
aada4b2f2d chore: Update README.md 2023-03-28 11:49:36 +01:00
7 changed files with 6 additions and 32 deletions

View File

@@ -1 +1 @@
{".":"0.1.1"}
{".":"0.1.0"}

View File

@@ -1,24 +1,5 @@
# Changelog
## [0.1.1](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.1.0...v0.1.1) (2023-03-28)
### Features
* this stops service exiting the program ([6f90386](https://github.com/k8sgpt-ai/k8sgpt/commit/6f90386fc93b2e39e59832468922e8ba7210b8e5))
* updated readme ([e0141d1](https://github.com/k8sgpt-ai/k8sgpt/commit/e0141d1cf54b5b37b25a5caeb9d5c940b9410ea7))
### Bug Fixes
* short term solution for exhaustion ([5890e3a](https://github.com/k8sgpt-ai/k8sgpt/commit/5890e3a79c80a2973af2feb7d50e7f9c57c563c2))
### Other
* update README.md ([93b947f](https://github.com/k8sgpt-ai/k8sgpt/commit/93b947f261e401c10dde6dc1854e6e22187437d6))
* update root.go path ([2cb1c9c](https://github.com/k8sgpt-ai/k8sgpt/commit/2cb1c9c150d052bb3942d9f62ded9d54b0e1873e))
## [0.1.0](https://github.com/k8sgpt-ai/k8sgpt/compare/v0.0.9...v0.1.0) (2023-03-28)

View File

@@ -69,13 +69,13 @@ k8sgpt analyze --explain
_Filter on resource_
```
k8sgpt analyze --explain --filter=Service
k8sgpt analyze --explain --resource=Service
```
_Output to JSON_
```
k8sgpt analyze --explain --filter=Service --output=json
k8sgpt analyze --explain --resource=Service --output=json
```
## Upcoming major milestones

View File

@@ -104,11 +104,6 @@ var AnalyzeCmd = &cobra.Command{
if explain {
parsedText, err := analyzer.ParseViaAI(ctx, aiClient, analysis.Error, nocache)
if err != nil {
// Check for exhaustion
if strings.Contains(err.Error(), "status code: 429") {
color.Red("Exhausted API quota. Please try again later")
os.Exit(1)
}
color.Red("Error: %v", err)
continue
}

View File

@@ -48,7 +48,7 @@ func init() {
rootCmd.AddCommand(auth.AuthCmd)
rootCmd.AddCommand(analyze.AnalyzeCmd)
rootCmd.AddCommand(generate.GenerateCmd)
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.yaml)")
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.k8sgpt.git.yaml)")
rootCmd.PersistentFlags().StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
rootCmd.PersistentFlags().StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
// Cobra also supports local flags, which will only run

View File

@@ -61,7 +61,7 @@ func ParseViaAI(ctx context.Context, aiClient ai.IAI, prompt []string,
response, err := aiClient.GetCompletion(ctx, inputKey)
if err != nil {
color.Red("error getting completion: %v", err)
return "", err
return "", nil
}
if !viper.IsSet(sEnc) {

View File

@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/fatih/color"
"github.com/k8sgpt-ai/k8sgpt/pkg/ai"
"github.com/k8sgpt-ai/k8sgpt/pkg/kubernetes"
"github.com/k8sgpt-ai/k8sgpt/pkg/util"
@@ -28,8 +27,7 @@ func AnalyzeEndpoints(ctx context.Context, client *kubernetes.Client, aiClient a
if len(ep.Subsets) == 0 {
svc, err := client.GetClient().CoreV1().Services(ep.Namespace).Get(ctx, ep.Name, metav1.GetOptions{})
if err != nil {
color.Yellow("Service %s/%s does not exist", ep.Namespace, ep.Name)
continue
return err
}
for k, v := range svc.Spec.Selector {