Skip to content

Commit

Permalink
Add log line to aid debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-jones committed Jul 12, 2024
1 parent 646ad95 commit 4d945af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"log/slog"
"path"

"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -42,6 +43,7 @@ func NewClient(configPath string) (*Client, error) {
func (c *Client) GetRawResource(ctx context.Context, relativePath string) (map[string]any, error) {
body, err := c.client.RESTClient().Get().AbsPath(path.Join("apis", relativePath)).DoRaw(ctx)
if err != nil {
slog.Warn("failed to fetch resource", slog.Any("error", err))
return nil, err
}

Expand Down

0 comments on commit 4d945af

Please sign in to comment.