diff --git a/README.md b/README.md index 99bf9951..2c804136 100644 --- a/README.md +++ b/README.md @@ -361,7 +361,7 @@ BrbXNW2RUYLe If an instance has a public IP address configured, you can display it using `civo instance public-ip ID/hostname`: ```sh -$ civo instance public-ip api-demo.test -o custom -f public_ip +$ civo instance show api-demo.test -o custom -f public_ip 74.220.21.246 ``` diff --git a/cmd/apikey/apikey.go b/cmd/apikey/apikey.go index ed1b0961..fe8aa106 100644 --- a/cmd/apikey/apikey.go +++ b/cmd/apikey/apikey.go @@ -3,7 +3,6 @@ package apikey import ( "errors" "fmt" - "strings" "github.com/civo/cli/config" "github.com/spf13/cobra" @@ -29,7 +28,7 @@ between them when required.`, func apiKeyFind(search string) (string, error) { var result string for key, value := range config.Current.APIKeys { - if strings.Contains(key, search) || strings.Contains(value, search) { + if key == search || value == search { result = key } } diff --git a/cmd/apikey/apikey_remove.go b/cmd/apikey/apikey_remove.go index a2f014f2..2892bcf3 100644 --- a/cmd/apikey/apikey_remove.go +++ b/cmd/apikey/apikey_remove.go @@ -23,6 +23,12 @@ var apikeyRemoveCmd = &cobra.Command{ os.Exit(1) } + // Check if the requested API key is the current one + if index == config.Current.Meta.CurrentAPIKey { + utility.Warning("The API key %q is the current one, please change it before removing it", args[0]) + os.Exit(1) + } + if utility.UserConfirmedDeletion("api key", common.DefaultYes, args[0]) { numKeys := len(config.Current.APIKeys) delete(config.Current.APIKeys, index) diff --git a/cmd/objectstore/objectstore.go b/cmd/objectstore/objectstore.go index 7e4d5988..541665e0 100644 --- a/cmd/objectstore/objectstore.go +++ b/cmd/objectstore/objectstore.go @@ -6,10 +6,9 @@ import ( "github.com/spf13/cobra" ) -var credentialSize int var accessKey, secretAccessKey string -//ObjectStoreCmd manages Civo Object Store +// ObjectStoreCmd manages Civo Object Store var ObjectStoreCmd = &cobra.Command{ Use: "objectstore", Aliases: []string{"bucket", "buckets", "object", "objects"}, diff --git a/cmd/objectstore/objectstore_credential_update.go b/cmd/objectstore/objectstore_credential_update.go index d9938282..7f6251e1 100644 --- a/cmd/objectstore/objectstore_credential_update.go +++ b/cmd/objectstore/objectstore_credential_update.go @@ -12,7 +12,6 @@ import ( ) var credAccessKey, credSecretAccessKey string -var credSuspended bool var objectStoreCredentialUpdateCmd = &cobra.Command{ Use: "update", diff --git a/cmd/objectstore/objectstore_show.go b/cmd/objectstore/objectstore_show.go index af25701a..080159b1 100644 --- a/cmd/objectstore/objectstore_show.go +++ b/cmd/objectstore/objectstore_show.go @@ -38,6 +38,7 @@ var objectStoreShowCmd = &cobra.Command{ os.Exit(1) } + // Get the credentials for the object store var creds *civogo.ObjectStoreCredential if objectStore.OwnerInfo.Name != "" { creds, err = client.FindObjectStoreCredential(objectStore.OwnerInfo.Name) @@ -47,6 +48,13 @@ var objectStoreShowCmd = &cobra.Command{ } } + // Get the stats for the object store + stats, err := client.GetObjectStoreStats(objectStore.ID) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + ow := utility.NewOutputWriter() ow.StartLine() @@ -58,6 +66,7 @@ var objectStoreShowCmd = &cobra.Command{ ow.AppendDataWithLabel("region", client.Region, "Region") ow.AppendDataWithLabel("accesskey", creds.AccessKeyID, "Access Key") ow.AppendDataWithLabel("status", objectStore.Status, "Status") + ow.AppendDataWithLabel("stats", fmt.Sprintf("Objects: %d, Size: %s MB, Size Used: %d", stats.NumObjects, strconv.Itoa(objectStore.MaxSize), stats.SizeKBUtilised), "Stats") switch common.OutputFormat { case "json": diff --git a/cmd/update.go b/cmd/update.go index d4522f98..f639897c 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -11,6 +11,7 @@ import ( "github.com/civo/cli/utility" "github.com/kierdavis/ansi" + gogithub "github.com/google/go-github/v57/github" "github.com/spf13/cobra" "github.com/tj/go-update" "github.com/tj/go-update/progress" @@ -39,7 +40,7 @@ var ( // fetch the new releases releases, err := m.LatestReleases() if err != nil { - if common.IsGHError(err) != nil { + if _, ok := err.(*gogithub.AbuseRateLimitError); ok { os.Exit(1) } utility.Error("error fetching releases: %s", err) diff --git a/common/common.go b/common/common.go index 698c68be..08793895 100644 --- a/common/common.go +++ b/common/common.go @@ -1,14 +1,11 @@ package common import ( + "context" "fmt" - "net/http" - "strings" - "github.com/google/go-github/github" - "github.com/pkg/errors" + "github.com/google/go-github/v57/github" "github.com/savioxavier/termlink" - "github.com/tcnksm/go-latest" ) var ( @@ -30,60 +27,35 @@ var ( DateCli = "unknown" ) +// GithubClient Create a Github client +func GithubClient() *github.Client { + return github.NewClient(nil) +} + // CheckVersionUpdate checks if there's an update to be done func CheckVersionUpdate() { - res, skip := VersionCheck() + ghClient := GithubClient() + res, skip := VersionCheck(ghClient) if !skip { - if res.Outdated { - fmt.Printf("A newer version (v%s) is available, please upgrade with \"civo update\"\n", res.Current) + if res.TagName != nil && *res.TagName != VersionCli { + fmt.Printf("A newer version (%s) is available, please upgrade with \"civo update\"\n", *res.TagName) } } } // IssueMessage is the message to be displayed when an error is returned func IssueMessage() { - gitIssueLink := termlink.ColorLink("GitHub issue", "https://github.com/civo/cli/issues", "italic green") + gitIssueLink := termlink.ColorLink("GitHub issue", "https://github.com/civo/cli/issues", "green") fmt.Printf("Please check if you are using the latest version of CLI and retry the command \nIf you are still facing issues, please report it on our community slack or open a %s \n", gitIssueLink) } // VersionCheck checks if there is a new version of the CLI -func VersionCheck() (res *latest.CheckResponse, skip bool) { - githubTag := &latest.GithubTag{ - Owner: "civo", - Repository: "cli", - FixVersionStrFunc: latest.DeleteFrontV(), - } - res, err := latest.Check(githubTag, strings.Replace(VersionCli, "v", "", 1)) - if err != nil { - if IsGHError(err) != nil { - return nil, true - } - fmt.Printf("Checking for a newer version failed with %s \n", err) +func VersionCheck(client *github.Client) (res *github.RepositoryRelease, skip bool) { + // Get the last release from GitHub API + release, _, err := client.Repositories.GetLatestRelease(context.Background(), "civo", "cli") + if _, ok := err.(*github.AbuseRateLimitError); ok { + fmt.Printf("hit secondary rate limit try again in %s minute", err.(*github.AbuseRateLimitError).RetryAfter) return nil, true } - return res, false -} - -// IsGHError checks if any error from github is returned -func IsGHError(err error) error { - ghErr, ok := err.(*github.RateLimitError) - if ok { - if ghErr.Response.StatusCode >= 400 && ghErr.Response.StatusCode < 500 { - return errors.Wrap(err, `Failed to query the GitHub API for updates. - This is most likely due to GitHub rate-limiting on unauthenticated requests. - To have the civo-cli make authenticated requests please: - 1. Generate a token at https://github.com/settings/tokens - 2. Set the token by either adding it to your ~/.gitconfig - setting the GITHUB_TOKEN environment variable. - Instructions for generating a token can be found at: - https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ - We call the github releases API to look for new releases. - More information about that API can be found here: https://developer.github.com/v3/repos/releases/`) - } - if ghErr.Response.StatusCode == http.StatusUnauthorized { - return errors.Wrap(err, "Your Github token is invalid. Check the [github] section in ~/.gitconfig") - } - return errors.Wrap(err, "error finding latest release") - } - return nil + return release, false } diff --git a/common/common_test.go b/common/common_test.go index 6201ffae..e55725b3 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -1,23 +1,34 @@ package common import ( + "fmt" + "net/http" + "net/http/httptest" + "net/url" "testing" - "github.com/google/go-github/github" + "github.com/google/go-github/v57/github" ) -func TestGithubError(t *testing.T) { - errorResponse := &github.ErrorResponse{Response: nil} - twoFactor := (*github.TwoFactorAuthError)(errorResponse) - if IsGHError(twoFactor) != nil { - t.Fail() - } - rateLimit := github.RateLimitError{} - if IsGHError(&rateLimit) != nil { - t.Fail() - } - abuseRateLimit := github.AbuseRateLimitError{} - if IsGHError(&abuseRateLimit) != nil { - t.Fail() - } +// FILEPATH: /Users/alejandrojnm/Project/go/src/github.com/civo/cli/common/common_test.go + +func TestVersionCheck(t *testing.T) { + // Test when the GitHub API returns a successful response + t.Run("successful response", func(t *testing.T) { + server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { + rw.Write([]byte(`{"tag_name": "v1.0.0"}`)) + })) + defer server.Close() + + client := github.NewClient(nil) + client.BaseURL, _ = url.Parse(fmt.Sprintf("%s/", server.URL)) + + release, skip := VersionCheck(client) + if skip { + t.Errorf("Expected skip to be false, got true") + } + if release.TagName == nil || *release.TagName != "v1.0.0" { + t.Errorf("Expected release version to be v1.0.0, got %s", *release.TagName) + } + }) } diff --git a/config/config.go b/config/config.go index f4387e23..f26c493a 100644 --- a/config/config.go +++ b/config/config.go @@ -270,9 +270,9 @@ func CivoAPIClient() (*civogo.Client, error) { } var version string - res, skip := common.VersionCheck() + res, skip := common.VersionCheck(common.GithubClient()) if !skip { - version = res.Current + version = *res.TagName } else { version = "0.0.0" } diff --git a/go.mod b/go.mod index 7bc48638..cf164ae3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -go 1.20 +go 1.21 module github.com/civo/cli @@ -9,16 +9,15 @@ require ( github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/briandowns/spinner v1.11.1 github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c // indirect - github.com/civo/civogo v0.3.55 + github.com/civo/civogo v0.3.56 github.com/dsnet/compress v0.0.1 // indirect github.com/fatih/color v1.13.0 // indirect - github.com/google/go-github v17.0.0+incompatible + github.com/google/go-github v17.0.0+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.3.0 github.com/gookit/color v1.3.8 github.com/gosuri/uilive v0.0.4 // indirect github.com/gosuri/uiprogress v0.0.1 // indirect - github.com/hashicorp/go-version v1.2.1 // indirect github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 // indirect github.com/kierdavis/ansi v0.0.0-20180105022324-90d93b0fcae2 github.com/klauspost/pgzip v1.2.4 // indirect @@ -26,7 +25,6 @@ require ( github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.4 github.com/spf13/cobra v1.1.1 - github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e github.com/tj/go-update v2.2.4+incompatible github.com/ulikunitz/xz v0.5.10 // indirect golang.org/x/crypto v0.17.0 @@ -35,7 +33,7 @@ require ( require ( github.com/adhocore/gronx v1.6.5 - github.com/pkg/errors v0.9.1 + github.com/google/go-github/v57 v57.0.0 github.com/savioxavier/termlink v1.2.1 ) @@ -46,10 +44,10 @@ require ( github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.1.6 // indirect github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect - github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect - github.com/google/gofuzz v1.1.0 // indirect + github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/jwalton/go-supportscolor v1.1.0 // indirect @@ -61,17 +59,18 @@ require ( github.com/mattn/go-runewidth v0.0.8 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/image v0.11.0 // indirect - golang.org/x/net v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/api v0.27.1 // indirect - k8s.io/apimachinery v0.27.1 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + k8s.io/api v0.29.0 // indirect + k8s.io/apimachinery v0.29.0 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 3fa723d7..3587df24 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/civo/civogo v0.3.55 h1:SwmvI7RCvgz7JfbRqQ27hpUfEqAsR5eRM7TZn9Gm5WI= -github.com/civo/civogo v0.3.55/go.mod h1:54lv/FOf7gh6wE9ZwVdw4yBehk8V1CvU9aWa4v6dvW0= +github.com/civo/civogo v0.3.56 h1:t5u/OwExb2ibVmIXsUprV5m++bAqBRLO9uMcodNHZek= +github.com/civo/civogo v0.3.56/go.mod h1:54lv/FOf7gh6wE9ZwVdw4yBehk8V1CvU9aWa4v6dvW0= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -106,8 +106,10 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= @@ -135,8 +137,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8GTcKMxYOSXm0jx6j0de8XUtb/fsP3GZ0I= github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU= +github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47 h1:k4Tw0nt6lwro3Uin8eqoET7MDA4JnT8YgbCjc/g5E3k= +github.com/gomarkdown/markdown v0.0.0-20231222211730-1d6d20845b47/go.mod h1:JDGcbDT52eL4fju3sZ4TeHGsQwhG9nbDV21aMyhwPoA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= @@ -147,15 +150,19 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs= +github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -191,8 +198,6 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= -github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -235,8 +240,9 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -318,8 +324,9 @@ github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmv github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= -github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= +github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -382,11 +389,10 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k= -github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= @@ -487,8 +493,8 @@ golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -680,25 +686,30 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -k8s.io/api v0.27.1 h1:Z6zUGQ1Vd10tJ+gHcNNNgkV5emCyW+v2XTmn+CLjSd0= k8s.io/api v0.27.1/go.mod h1:z5g/BpAiD+f6AArpqNjkY+cji8ueZDU/WV1jcj5Jk4E= -k8s.io/apimachinery v0.27.1 h1:EGuZiLI95UQQcClhanryclaQE6xjg1Bts6/L3cD7zyc= +k8s.io/api v0.29.0 h1:NiCdQMY1QOp1H8lfRyeEf8eOwV6+0xA6XEE44ohDX2A= +k8s.io/api v0.29.0/go.mod h1:sdVmXoz2Bo/cb77Pxi71IPTSErEW32xa4aXwKH7gfBA= k8s.io/apimachinery v0.27.1/go.mod h1:5ikh59fK3AJ287GUvpUsryoMFtH9zj/ARfWCo3AyXTM= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a/go.mod h1:y5VtZWM9sHHc2ZodIH/6SHzXj+TPU5USoA8lcIeKEKY= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=