diff --git a/go.mod b/go.mod index d340bea7..fe6ec282 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/docker/docker v25.0.2+incompatible github.com/google/go-github/v48 v48.2.0 github.com/google/uuid v1.6.0 - github.com/kong/go-database-reconciler v1.4.0 + github.com/kong/go-database-reconciler v1.5.0 github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7 github.com/mitchellh/go-homedir v1.1.0 github.com/samber/lo v1.39.0 @@ -139,7 +139,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shirou/gopsutil/v3 v3.24.1 // indirect github.com/spf13/afero v1.11.0 // indirect github.com/spf13/cast v1.6.0 // indirect github.com/spf13/pflag v1.0.5 // indirect diff --git a/go.sum b/go.sum index 3f534d3f..3f1497b0 100644 --- a/go.sum +++ b/go.sum @@ -206,8 +206,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kong/go-database-reconciler v1.4.0 h1:JlKLXUTqdq2vYABJMTiq5h3RJsn7J4EeW+wTA2ojYYk= -github.com/kong/go-database-reconciler v1.4.0/go.mod h1:Q4WgHd6b9oDid+EG8sXhArmL7R/wpA0A/8tI9w37BxU= +github.com/kong/go-database-reconciler v1.5.0 h1:OHUmFFse5nUqcO7FvChITBK9PoXEhZdw95dE4arlhxs= +github.com/kong/go-database-reconciler v1.5.0/go.mod h1:KtstdZjxNI7+jZJRT896iDsS0Yte1x1sX4B2TaaASgk= github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7 h1:/iV93Gwv410lIeJx8VCfCA4fpuvSuTw2LqZpDXsIE9Q= github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7/go.mod h1:YNkLvjxfOqS+BZ1J2YWOy/83wc26JM5QJbAukoeg1sY= github.com/kong/semver/v4 v4.0.1 h1:DIcNR8W3gfx0KabFBADPalxxsp+q/5COwIFkkhrFQ2Y= @@ -293,8 +293,8 @@ github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sethvargo/go-password v0.2.0 h1:BTDl4CC/gjf/axHMaDQtw507ogrXLci6XRiLc7i/UHI= github.com/sethvargo/go-password v0.2.0/go.mod h1:Ym4Mr9JXLBycr02MFuVQ/0JHidNetSgbzutTr3zsYXE= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.1 h1:R3t6ondCEvmARp3wxODhXMTLC/klMa87h2PHUw5m7QI= +github.com/shirou/gopsutil/v3 v3.24.1/go.mod h1:UU7a2MSBQa+kW1uuDq8DeEBS8kmrnQwsv2b5O513rwU= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -446,7 +446,6 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= diff --git a/pkg/clusters/addons/kong/addon.go b/pkg/clusters/addons/kong/addon.go index 65bda648..7ec9e060 100644 --- a/pkg/clusters/addons/kong/addon.go +++ b/pkg/clusters/addons/kong/addon.go @@ -17,7 +17,7 @@ import ( "github.com/kong/go-database-reconciler/pkg/dump" "github.com/kong/go-database-reconciler/pkg/file" "github.com/kong/go-database-reconciler/pkg/state" - deckutils "github.com/kong/go-database-reconciler/pkg/utils" + dbreconcilerutils "github.com/kong/go-database-reconciler/pkg/utils" "github.com/kong/go-kong/kong" pwgen "github.com/sethvargo/go-password/password" "github.com/sirupsen/logrus" @@ -474,17 +474,19 @@ func (a *Addon) DumpDiagnostics(ctx context.Context, cluster clusters.Cluster) ( if err != nil { return diagnostics, fmt.Errorf("could not build Kong client: %w", err) } - opts := deckutils.KongClientConfig{ + opts := dbreconcilerutils.KongClientConfig{ Address: addr.String(), HTTPClient: &http.Client{ Timeout: time.Second * 90, //nolint:gomnd }, - TLSSkipVerify: true, + TLSConfig: dbreconcilerutils.TLSConfig{ + SkipVerify: true, + }, } if a.proxyEnterpriseSuperAdminPassword != "" { opts.Headers = append(opts.Headers, "kong-admin-token:"+a.proxyEnterpriseSuperAdminPassword) } - client, err := deckutils.GetKongClient(opts) + client, err := dbreconcilerutils.GetKongClient(opts) if err != nil { return diagnostics, fmt.Errorf("could not build Kong client: %w", err) } @@ -505,7 +507,7 @@ func (a *Addon) DumpDiagnostics(ctx context.Context, cluster clusters.Cluster) ( // arguably a workspaced client for default should work on OSS, but it doesn't! wsClient = client } else { - wsClient, err = deckutils.GetKongClient(wsOpts) + wsClient, err = dbreconcilerutils.GetKongClient(wsOpts) if err != nil { return diagnostics, fmt.Errorf("could not build Kong client: %w", err) } diff --git a/pkg/environments/builder.go b/pkg/environments/builder.go index d883f8d9..ff19125e 100644 --- a/pkg/environments/builder.go +++ b/pkg/environments/builder.go @@ -199,7 +199,7 @@ func (b *Builder) Build(ctx context.Context) (env Environment, err error) { cluster: cluster, }, nil case 1: - return nil, addonDeploymentErrors[0] + return nil, addonDeploymentErrors[0] default: errMsgs := make([]string, 0, totalFailures) for _, err := range addonDeploymentErrors {