Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Aug 19, 2024
1 parent efcbc76 commit f0a4704
Show file tree
Hide file tree
Showing 37 changed files with 916 additions and 386 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/graphql-go/handler v0.2.4
github.com/open-policy-agent/gatekeeper/v3 v3.17.0-beta.0.0.20240809221728-5ef6d32146d0
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2
github.com/prometheus/client_golang v1.19.1
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand All @@ -44,12 +44,12 @@ require (
k8s.io/kube-state-metrics/v2 v2.12.0
kmodules.xyz/apiversion v0.2.0
kmodules.xyz/authorizer v0.29.1
kmodules.xyz/client-go v0.30.11
kmodules.xyz/client-go v0.30.12
kmodules.xyz/custom-resources v0.30.0
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/monitoring-agent-api v0.29.0
kmodules.xyz/resource-metadata v0.18.11-0.20240817062810-5a2d02326dbb
kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80
kmodules.xyz/resource-metadata v0.18.11
kmodules.xyz/resource-metrics v0.30.2
kmodules.xyz/resource-metrics/utils v0.30.1
kmodules.xyz/sets v0.29.0
kubeops.dev/falco-ui-server v0.0.4
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.1 h1:+iiljhJV6niK7MuifJs/n3NeLxikd85nrQfn53sLJkU=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.1/go.mod h1:XYrdZw5dW12Cjkt4ndbeNZZTBp4UCHtW0ccR9+sTtPU=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 h1:6UsAv+jAevuGO2yZFU/BukV4o9NKnFMOuoouSA4G0ns=
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2/go.mod h1:XYrdZw5dW12Cjkt4ndbeNZZTBp4UCHtW0ccR9+sTtPU=
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
Expand Down Expand Up @@ -908,8 +908,8 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/authorizer v0.29.1 h1:uByGGoryKbZcfiEAhjcK/Y345I9mygNQP7DVpkMbNQQ=
kmodules.xyz/authorizer v0.29.1/go.mod h1:kZRhclL8twzyt2bQuJQJbpYww2sc+qFr8I5PPoq/sWY=
kmodules.xyz/client-go v0.30.11 h1:2UFIu18O5xwKyKbmAn+vs8CIcnfogu0IACurgR2HAmU=
kmodules.xyz/client-go v0.30.11/go.mod h1:XL3PDQIXG4s3xNRL2SSxIvi8b2WyMGpn26dFnOBz0j4=
kmodules.xyz/client-go v0.30.12 h1:YpwAkaTlIFy1wB3LvuOcmlWY1yHO9sh0AzCMXe2vcjE=
kmodules.xyz/client-go v0.30.12/go.mod h1:XL3PDQIXG4s3xNRL2SSxIvi8b2WyMGpn26dFnOBz0j4=
kmodules.xyz/crd-schema-fuzz v0.29.1 h1:zJTlWYOrT5dsVVHW8HGcnR/vaWfxQfNh11QwTtkYpcs=
kmodules.xyz/crd-schema-fuzz v0.29.1/go.mod h1:n708z9YQqLMP2KNLQVgBcRJw1QpSWLvpNCEi+KJDOYE=
kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rMcm1o=
Expand All @@ -920,10 +920,10 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.29.4 h1:WQV2BIUIoVKKiqZNmZ4gAy367jEdwBhEl3dFCLZM1qA=
kmodules.xyz/offshoot-api v0.29.4/go.mod h1:e+NQ0s4gW/YTPWBWEfdISZcmk+tlTq8IjvP5SLdqvko=
kmodules.xyz/resource-metadata v0.18.11-0.20240817062810-5a2d02326dbb h1:or0s9AzpbHauRlDUZt7bXlZvNpIYubvtLn7ilrczjOI=
kmodules.xyz/resource-metadata v0.18.11-0.20240817062810-5a2d02326dbb/go.mod h1:SBVlPWE1ClOwu2usSUlhHFuK9YOCfA9NmCGBklofmNM=
kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80 h1:0fOJLpzMFZbk3PGAQdlZNvhpIBEyZMN1823U9wa/lG0=
kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80/go.mod h1:UYcQQLN+3o8rNPQJwJa2D9bt5ihJCeo5bCDuQ4O3MPY=
kmodules.xyz/resource-metadata v0.18.11 h1:5hLUfB2P7irq5erawXxH9Vrir+2OGRmWZjXrhBJr614=
kmodules.xyz/resource-metadata v0.18.11/go.mod h1:/Q0zumHsVTXgS+zKyoN6+CND8M3kNUMYIAhoVrUoCAw=
kmodules.xyz/resource-metrics v0.30.2 h1:EGJapJa7Sh2ePc/WyHziLVh9xtuh4vWPBoSGxVZ8uC8=
kmodules.xyz/resource-metrics v0.30.2/go.mod h1:UYcQQLN+3o8rNPQJwJa2D9bt5ihJCeo5bCDuQ4O3MPY=
kmodules.xyz/resource-metrics/utils v0.30.1 h1:iRnAKNMMdAi7QYjMQrK9W3vNMhSC21RWNx9yS3qlpTA=
kmodules.xyz/resource-metrics/utils v0.30.1/go.mod h1:FvRK+7qmKsA7RQCMAraejVSS3y39DK1s1/zq/rKg970=
kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0=
Expand Down
2 changes: 1 addition & 1 deletion vendor/kmodules.xyz/client-go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
BASEIMAGE_PROD ?= gcr.io/distroless/static-debian12
BASEIMAGE_DBG ?= debian:bookworm

GO_VERSION ?= 1.22
GO_VERSION ?= 1.23
BUILD_IMAGE ?= ghcr.io/appscode/golang-dev:$(GO_VERSION)

OUTBIN = bin/$(OS)_$(ARCH)/$(BIN)
Expand Down
4 changes: 3 additions & 1 deletion vendor/kmodules.xyz/client-go/apiextensions/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ type setupGroup struct {
fn SetupFn
}

type crdParamKey struct{}

var (
setupFns = make(map[schema.GroupKind]setupGroup)
testFns = make(map[schema.GroupKind]TestFn)
setupDone = map[schema.GroupKind]bool{}
CRDParam = struct{}{}
CRDParam = crdParamKey{}
mu sync.Mutex
)

Expand Down
234 changes: 234 additions & 0 deletions vendor/kmodules.xyz/client-go/client/retryclient.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package client

import (
"context"
"errors"
"io"
"time"

"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/wait"
"sigs.k8s.io/controller-runtime/pkg/client"
)

type retryClient struct {
d client.Client
interval time.Duration
timeout time.Duration
}

var _ client.Client = &retryClient{}

func NewRetryClient(d client.Client) client.Client {
return &retryClient{d: d, interval: 500 * time.Millisecond, timeout: 5 * time.Minute}
}

func NewRetryClientWithOptions(d client.Client, interval time.Duration, timeout time.Duration) client.Client {
return &retryClient{d: d, interval: interval, timeout: timeout}
}

func (r *retryClient) Scheme() *runtime.Scheme {
return r.d.Scheme()
}

func (r *retryClient) RESTMapper() meta.RESTMapper {
return r.d.RESTMapper()
}

func (r *retryClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) {
return r.d.GroupVersionKindFor(obj)
}

func (r *retryClient) IsObjectNamespaced(obj runtime.Object) (bool, error) {
return r.d.IsObjectNamespaced(obj)
}

func (r *retryClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Get(ctx, key, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.List(ctx, list, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Create(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Delete(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Update(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Patch(ctx, obj, patch, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.DeleteAllOf(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retryClient) Status() client.SubResourceWriter {
return &retrySubResourceWriter{
d: r.d.Status(),
interval: r.interval,
timeout: r.timeout,
}
}

func (r *retryClient) SubResource(subResource string) client.SubResourceClient {
return &retrySubResourceClient{
d: r.d.SubResource(subResource),
interval: r.interval,
timeout: r.timeout,
}
}

type retrySubResourceWriter struct {
d client.SubResourceWriter
interval time.Duration
timeout time.Duration
}

var _ client.SubResourceWriter = &retrySubResourceWriter{}

func (r *retrySubResourceWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Create(ctx, obj, subResource, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retrySubResourceWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Update(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retrySubResourceWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Patch(ctx, obj, patch, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

type retrySubResourceClient struct {
d client.SubResourceClient
interval time.Duration
timeout time.Duration
}

var _ client.SubResourceClient = &retrySubResourceClient{}

func (r *retrySubResourceClient) Get(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceGetOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Get(ctx, obj, subResource, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retrySubResourceClient) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Create(ctx, obj, subResource, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retrySubResourceClient) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Update(ctx, obj, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}

func (r *retrySubResourceClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) (apierror error) {
_ = wait.PollUntilContextTimeout(ctx, r.interval, r.timeout, true, func(ctx context.Context) (done bool, err error) {
apierror = r.d.Patch(ctx, obj, patch, opts...)
err = apierror
done = err == nil || !errors.Is(err, io.EOF)
return
})
return
}
4 changes: 2 additions & 2 deletions vendor/kmodules.xyz/client-go/meta/preconditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package meta

import (
"fmt"
"errors"
"strings"

"k8s.io/apimachinery/pkg/util/mergepatch"
Expand Down Expand Up @@ -46,7 +46,7 @@ func (s PreConditionSet) PreconditionFunc() []mergepatch.PreconditionFunc {

func (s PreConditionSet) Error() error {
strList := strings.Join(sets.List[string](s.Set), "\n\t")
return fmt.Errorf(strings.Join([]string{`At least one of the following was changed:
return errors.New(strings.Join([]string{`At least one of the following was changed:
apiVersion
kind
name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,22 @@ spec:
type:
group: core.kubestash.com
kind: RestoreSession
- layoutName: storage.kubestash.com-v1alpha1-snapshots
name: Snapshot
required: true
type:
group: storage.kubestash.com
kind: Snapshot
- layoutName: storage.kubestash.com-v1alpha1-repositories
name: Repository
required: true
type:
group: storage.kubestash.com
kind: Repository
- layoutName: storage.kubestash.com-v1alpha1-backupstorages
name: BackupStorage
required: true
type:
group: storage.kubestash.com
kind: BackupStorage
name: Backups
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,22 @@ spec:
type:
group: core.kubestash.com
kind: RestoreSession
- layoutName: storage.kubestash.com-v1alpha1-snapshots
name: Snapshot
required: true
type:
group: storage.kubestash.com
kind: Snapshot
- layoutName: storage.kubestash.com-v1alpha1-repositories
name: Repository
required: true
type:
group: storage.kubestash.com
kind: Repository
- layoutName: storage.kubestash.com-v1alpha1-backupstorages
name: BackupStorage
required: true
type:
group: storage.kubestash.com
kind: BackupStorage
name: Backups
Loading

0 comments on commit f0a4704

Please sign in to comment.