Skip to content

Commit

Permalink
feat: this stops service exiting the program
Browse files Browse the repository at this point in the history
Signed-off-by: AlexsJones <alexsimonjones@gmail.com>
  • Loading branch information
AlexsJones committed Mar 28, 2023
1 parent 2f699a9 commit 6f90386
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/analyzer/serviceAnalyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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"
Expand All @@ -27,7 +28,8 @@ 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 {
return err
color.Yellow("Service %s/%s does not exist", ep.Namespace, ep.Name)
continue
}

for k, v := range svc.Spec.Selector {
Expand Down

0 comments on commit 6f90386

Please sign in to comment.