From 1f3de4b1d4ae6db8c3df2132fdbfc9e3c9624282 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:27:43 -0700 Subject: [PATCH] Prepare for release v0.47.0 (#776) ProductLine: KubeDB Release: v2024.8.21 Release-tracker: https://github.com/kubedb/CHANGELOG/pull/98 Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 12 +- go.sum | 24 +- vendor/kmodules.xyz/client-go/Makefile | 2 +- .../kmodules.xyz/client-go/api/v1/cluster.go | 15 +- .../kmodules.xyz/client-go/api/v1/object.go | 4 +- .../client-go/api/v1/object_enum.go | 5 - .../client-go/apiextensions/controller.go | 4 +- .../client-go/client/retryclient.go | 234 ++++++++++++++++++ .../client-go/conditions/getter.go | 2 +- .../client-go/conditions/merge.go | 4 +- .../client-go/meta/preconditions.go | 4 +- .../client-go/tools/portforward/tunnel.go | 2 +- ...appscode.com_resourceblockdefinitions.yaml | 3 +- ....k8s.appscode.com_resourcedescriptors.yaml | 6 +- ...meta.k8s.appscode.com_resourcelayouts.yaml | 15 +- ...eta.k8s.appscode.com_resourceoutlines.yaml | 15 +- ...i.k8s.appscode.com_resourcedashboards.yaml | 3 +- .../v1alpha1/backupconfiguration_webhook.go | 3 + .../core/v1alpha1/restoresession_types.go | 35 ++- .../core/v1alpha1/zz_generated.deepcopy.go | 44 +++- .../apis/storage/v1alpha1/snapshot_types.go | 2 +- .../storage/v1alpha1/zz_generated.deepcopy.go | 7 +- .../apis/zz_generated.deepcopy.go | 1 + .../core.kubestash.com_restoresessions.yaml | 159 ++++++++++-- vendor/modules.txt | 12 +- 25 files changed, 527 insertions(+), 90 deletions(-) create mode 100644 vendor/kmodules.xyz/client-go/client/retryclient.go diff --git a/go.mod b/go.mod index c5ee7c018..2977efb3b 100644 --- a/go.mod +++ b/go.mod @@ -26,11 +26,11 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.29.0 kmodules.xyz/cert-manager-util v0.29.0 - kmodules.xyz/client-go v0.30.9 + kmodules.xyz/client-go v0.30.13 kmodules.xyz/custom-resources v0.30.0 kmodules.xyz/monitoring-agent-api v0.29.0 - kubedb.dev/apimachinery v0.47.0-rc.3 - kubedb.dev/db-client-go v0.2.0-rc.3 + kubedb.dev/apimachinery v0.47.0 + kubedb.dev/db-client-go v0.2.0 sigs.k8s.io/controller-runtime v0.18.4 sigs.k8s.io/yaml v1.4.0 stash.appscode.dev/apimachinery v0.34.0 @@ -101,7 +101,7 @@ require ( github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.1 // indirect + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 // indirect github.com/prometheus-operator/prometheus-operator/pkg/client v0.75.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.0 // indirect @@ -142,10 +142,10 @@ require ( kmodules.xyz/objectstore-api v0.29.1 // indirect kmodules.xyz/offshoot-api v0.30.0 // indirect kmodules.xyz/prober v0.29.0 // indirect - kmodules.xyz/resource-metadata v0.18.11-0.20240801195527-995886d0c0e5 // indirect + kmodules.xyz/resource-metadata v0.18.12 // indirect kubeops.dev/petset v0.0.6 // indirect kubeops.dev/sidekick v0.0.7 // indirect - kubestash.dev/apimachinery v0.10.0 // indirect + kubestash.dev/apimachinery v0.11.0 // indirect sigs.k8s.io/gateway-api v1.1.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect diff --git a/go.sum b/go.sum index befc7b2fb..2639974f9 100644 --- a/go.sum +++ b/go.sum @@ -336,8 +336,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-operator/prometheus-operator/pkg/client v0.75.1 h1:s7GlsRYGLWP+L1eQKy6RmLatX+k3v9NQwutUix4l5uM= github.com/prometheus-operator/prometheus-operator/pkg/client v0.75.1/go.mod h1:qca3qWGdknRpHvPyThepe5a6QYAh38IQ2ml93E6V3NY= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= @@ -711,8 +711,8 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= kmodules.xyz/cert-manager-util v0.29.0 h1:HjEaEsv66xeMKiI8LwfTRls0z9V9L0qEvPBdOcX/CsI= kmodules.xyz/cert-manager-util v0.29.0/go.mod h1:0YuaPwp+P3Pw7Spxf6eDhOCMDDNXfNV2xIuxIexT1QU= -kmodules.xyz/client-go v0.30.9 h1:wiLivFlqVZOitAqLFEa1n53GkbYYOmiR8upjIHPHrYk= -kmodules.xyz/client-go v0.30.9/go.mod h1:XL3PDQIXG4s3xNRL2SSxIvi8b2WyMGpn26dFnOBz0j4= +kmodules.xyz/client-go v0.30.13 h1:Tpvg7ZlSNlzjB0NZT9hUe9JrO7FN4PjUUF1hNUXSku0= +kmodules.xyz/client-go v0.30.13/go.mod h1:XL3PDQIXG4s3xNRL2SSxIvi8b2WyMGpn26dFnOBz0j4= kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rMcm1o= kmodules.xyz/custom-resources v0.30.0/go.mod h1:ZsTuI2mLG2s3byre7bHmpxJ9w0HDqAkRTL1+izGFI24= kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9H1UFRwB4= @@ -723,18 +723,18 @@ kmodules.xyz/offshoot-api v0.30.0 h1:dq9F93pu4Q8rL9oTcCk+vGGy8vpS7RNt0GSwx7Bvhec kmodules.xyz/offshoot-api v0.30.0/go.mod h1:o9VoA3ImZMDBp3lpLb8+kc2d/KBxioRwCpaKDfLIyDw= kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg= kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo= -kmodules.xyz/resource-metadata v0.18.11-0.20240801195527-995886d0c0e5 h1:9RQEeMpYabFmWTRdeLwHl/ZnlcyR+WKLnIWdg6eiCTA= -kmodules.xyz/resource-metadata v0.18.11-0.20240801195527-995886d0c0e5/go.mod h1:1mOc2/WgOsn+f4tBKbHw8JgjWAEF52I6gOsVpyUE10M= -kubedb.dev/apimachinery v0.47.0-rc.3 h1:o5KpBZsYuUr2EJ/NMyyAtZ4lT7g1UabriZUxSynWZRs= -kubedb.dev/apimachinery v0.47.0-rc.3/go.mod h1:XkzWrijuH4skCU2ru+Ye9O0KSWQ7Nn2mRjP3+F3StLk= -kubedb.dev/db-client-go v0.2.0-rc.3 h1:L2RvcBMdnyx/anLla8WYARTcmskawDI+S749JYraIS0= -kubedb.dev/db-client-go v0.2.0-rc.3/go.mod h1:LXEW5LlrCoMaVks2G29DP2Z+Yi8hD/7L6C9LsgtZG7s= +kmodules.xyz/resource-metadata v0.18.12 h1:wHRYsvUXrX/620K0xXZlxnXJunZtHMuJbqDFZxSUs5E= +kmodules.xyz/resource-metadata v0.18.12/go.mod h1:VvUjfIzmM08SZ9ssZKhduzSrggKjY93ES2Bk+/m04hs= +kubedb.dev/apimachinery v0.47.0 h1:QhcjY2wJb/5L0YmfJAUiPw0VU1mMJqvILL2t8znniJo= +kubedb.dev/apimachinery v0.47.0/go.mod h1:W/uKm13rLuaz+uqZUt6piU/qA0EdLKHuN53V2DYheJI= +kubedb.dev/db-client-go v0.2.0 h1:ICzcrYs+UqIjBWX9NCFsASj5AfSc+10wjrjR5s0sBLA= +kubedb.dev/db-client-go v0.2.0/go.mod h1:GskxVRrpum5xGrKQ1WEPLmn2H2eLYyV5tMlEgxI31rk= kubeops.dev/petset v0.0.6 h1:0IbvxD9fadZfH+3iMZWzN6ZHsO0vX458JlioamwyPKQ= kubeops.dev/petset v0.0.6/go.mod h1:A15vh0r979NsvL65DTIZKWsa/NoX9VapHBAEw1ZsdYI= kubeops.dev/sidekick v0.0.7 h1:+rs9AXPsiHjq5pJpzmj+Cen7frPfdi5dK1A57eNh7GM= kubeops.dev/sidekick v0.0.7/go.mod h1:bYS5Q6DksOzqzQPwiRbFRbV1uXuYmzY+0QYSqNFq4/M= -kubestash.dev/apimachinery v0.10.0 h1:38rSSEojixDvmsugS2YPGg7IFahKhPP02Hz9m9hrtQ8= -kubestash.dev/apimachinery v0.10.0/go.mod h1:Yj3l7PRgFOA3oJZga/+O/OQwAo6N09bY8zoCFvCVarc= +kubestash.dev/apimachinery v0.11.0 h1:RK1kSkuq/MIWDcGLxaLrApR4sSAcekmulGI+84FEcDc= +kubestash.dev/apimachinery v0.11.0/go.mod h1:iSumBmpU+PmxloNvHQkazCYnuxPqi3lbTXjXTI1hKqc= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= diff --git a/vendor/kmodules.xyz/client-go/Makefile b/vendor/kmodules.xyz/client-go/Makefile index 83988a83f..4ff50bd7c 100644 --- a/vendor/kmodules.xyz/client-go/Makefile +++ b/vendor/kmodules.xyz/client-go/Makefile @@ -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) diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 057cb55ab..1de796faf 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/cluster.go +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster.go @@ -16,7 +16,13 @@ limitations under the License. package v1 -import "strings" +import ( + "crypto/hmac" + "crypto/sha256" + "encoding/base64" + "fmt" + "strings" +) // +kubebuilder:validation:Enum=Aws;Azure;DigitalOcean;GoogleCloud;Linode;Packet;Scaleway;Vultr;BareMetal;KIND;Generic;Private type HostingProvider string @@ -56,6 +62,13 @@ type ClusterMetadata struct { CABundle string `json:"caBundle,omitempty"` } +func (md ClusterMetadata) State() string { + hasher := hmac.New(sha256.New, []byte(md.UID)) + state := fmt.Sprintf("%s,%s", md.APIEndpoint, md.OwnerID) + hasher.Write([]byte(state)) + return base64.URLEncoding.EncodeToString(hasher.Sum(nil)) +} + /* ENUM( diff --git a/vendor/kmodules.xyz/client-go/api/v1/object.go b/vendor/kmodules.xyz/client-go/api/v1/object.go index 419d3cab3..073c8141e 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/object.go +++ b/vendor/kmodules.xyz/client-go/api/v1/object.go @@ -216,8 +216,8 @@ type ObjectInfo struct { Ref ObjectReference `json:"ref" protobuf:"bytes,2,opt,name=ref"` } -// +kubebuilder:validation:Enum=authn;authz;auth_secret;backup_via;catalog;cert_issuer;config;connect_via;exposed_by;event;located_on;monitored_by;ocm_bind;offshoot;ops;placed_into;policy;recommended_for;restore_into;scaled_by;source;storage;view -// ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) +// +kubebuilder:validation:Enum=authn;authz;auth_secret;backup_via;catalog;cert_issuer;config;connect_via;exposed_by;event;located_on;monitored_by;ocm_bind;offshoot;ops;policy;recommended_for;restore_into;scaled_by;source;storage;view +// ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) type EdgeLabel string func (e EdgeLabel) Direct() bool { diff --git a/vendor/kmodules.xyz/client-go/api/v1/object_enum.go b/vendor/kmodules.xyz/client-go/api/v1/object_enum.go index 65792ec2b..954a1ef8b 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/object_enum.go +++ b/vendor/kmodules.xyz/client-go/api/v1/object_enum.go @@ -42,8 +42,6 @@ const ( EdgeLabelOffshoot EdgeLabel = "offshoot" // EdgeLabelOps is a EdgeLabel of type ops. EdgeLabelOps EdgeLabel = "ops" - // EdgeLabelPlacedInto is a EdgeLabel of type placed_into. - EdgeLabelPlacedInto EdgeLabel = "placed_into" // EdgeLabelPolicy is a EdgeLabel of type policy. EdgeLabelPolicy EdgeLabel = "policy" // EdgeLabelRecommendedFor is a EdgeLabel of type recommended_for. @@ -78,7 +76,6 @@ var _EdgeLabelNames = []string{ string(EdgeLabelOcmBind), string(EdgeLabelOffshoot), string(EdgeLabelOps), - string(EdgeLabelPlacedInto), string(EdgeLabelPolicy), string(EdgeLabelRecommendedFor), string(EdgeLabelRestoreInto), @@ -113,7 +110,6 @@ func EdgeLabelValues() []EdgeLabel { EdgeLabelOcmBind, EdgeLabelOffshoot, EdgeLabelOps, - EdgeLabelPlacedInto, EdgeLabelPolicy, EdgeLabelRecommendedFor, EdgeLabelRestoreInto, @@ -152,7 +148,6 @@ var _EdgeLabelValue = map[string]EdgeLabel{ "ocm_bind": EdgeLabelOcmBind, "offshoot": EdgeLabelOffshoot, "ops": EdgeLabelOps, - "placed_into": EdgeLabelPlacedInto, "policy": EdgeLabelPolicy, "recommended_for": EdgeLabelRecommendedFor, "restore_into": EdgeLabelRestoreInto, diff --git a/vendor/kmodules.xyz/client-go/apiextensions/controller.go b/vendor/kmodules.xyz/client-go/apiextensions/controller.go index 6d3d66a66..771374ffb 100644 --- a/vendor/kmodules.xyz/client-go/apiextensions/controller.go +++ b/vendor/kmodules.xyz/client-go/apiextensions/controller.go @@ -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 ) diff --git a/vendor/kmodules.xyz/client-go/client/retryclient.go b/vendor/kmodules.xyz/client-go/client/retryclient.go new file mode 100644 index 000000000..d25c02930 --- /dev/null +++ b/vendor/kmodules.xyz/client-go/client/retryclient.go @@ -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 +} diff --git a/vendor/kmodules.xyz/client-go/conditions/getter.go b/vendor/kmodules.xyz/client-go/conditions/getter.go index 86649a6d5..b915573eb 100644 --- a/vendor/kmodules.xyz/client-go/conditions/getter.go +++ b/vendor/kmodules.xyz/client-go/conditions/getter.go @@ -223,7 +223,7 @@ func mirror(from Getter, targetCondition kmapi.ConditionType, options ...MirrorO case true: condition = TrueCondition(targetCondition) case false: - condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, mirrorOpt.fallbackMessage) + condition = FalseCondition(targetCondition, mirrorOpt.fallbackReason, mirrorOpt.fallbackSeverity, mirrorOpt.fallbackMessage) //nolint:govet } } diff --git a/vendor/kmodules.xyz/client-go/conditions/merge.go b/vendor/kmodules.xyz/client-go/conditions/merge.go index 44290e85f..e1ab6bc6e 100644 --- a/vendor/kmodules.xyz/client-go/conditions/merge.go +++ b/vendor/kmodules.xyz/client-go/conditions/merge.go @@ -65,9 +65,9 @@ func merge(conditions []localizedCondition, targetCondition kmapi.ConditionType, targetMessage := getMessage(g, options) if g.TopGroup().status == metav1.ConditionFalse { - return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, targetMessage) + return FalseCondition(targetCondition, targetReason, g.TopGroup().severity, targetMessage) //nolint:govet } - return UnknownCondition(targetCondition, targetReason, targetMessage) + return UnknownCondition(targetCondition, targetReason, targetMessage) //nolint:govet } // getConditionGroups groups a list of conditions according to status, severity values. diff --git a/vendor/kmodules.xyz/client-go/meta/preconditions.go b/vendor/kmodules.xyz/client-go/meta/preconditions.go index 5a5f597a5..5dddddb48 100644 --- a/vendor/kmodules.xyz/client-go/meta/preconditions.go +++ b/vendor/kmodules.xyz/client-go/meta/preconditions.go @@ -17,7 +17,7 @@ limitations under the License. package meta import ( - "fmt" + "errors" "strings" "k8s.io/apimachinery/pkg/util/mergepatch" @@ -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 diff --git a/vendor/kmodules.xyz/client-go/tools/portforward/tunnel.go b/vendor/kmodules.xyz/client-go/tools/portforward/tunnel.go index f586965b8..897a94559 100644 --- a/vendor/kmodules.xyz/client-go/tools/portforward/tunnel.go +++ b/vendor/kmodules.xyz/client-go/tools/portforward/tunnel.go @@ -186,7 +186,7 @@ func (t *Tunnel) getFirstSelectedPod(k8sClient kubernetes.Interface) (*core.Pod, if err != nil { return nil, err } - if obj.Spec.Selector == nil || len(obj.Spec.Selector) == 0 { + if len(obj.Spec.Selector) == 0 { return nil, fmt.Errorf("invalid label selector. Error: %v", err) } podSelector = labels.SelectorFromSet(obj.Spec.Selector) diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml index 74d388f12..b40561554 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml @@ -84,7 +84,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -101,7 +101,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml index b648c3f78..11baf8a09 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml @@ -46,7 +46,7 @@ spec: properties: labels: items: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -63,7 +63,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -208,7 +207,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -225,7 +224,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml index b5c16e9df..787c7840e 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml @@ -85,7 +85,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -102,7 +102,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -335,7 +334,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -352,7 +351,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -605,7 +603,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -622,7 +620,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -848,7 +845,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -865,7 +862,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -1127,7 +1123,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -1144,7 +1140,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml index e00b4c98b..1ea281924 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml @@ -172,7 +172,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -189,7 +189,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -424,7 +423,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -441,7 +440,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -696,7 +694,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -713,7 +711,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -941,7 +938,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -958,7 +955,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into @@ -1222,7 +1218,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -1239,7 +1235,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml index 745fde731..58bdddeca 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml @@ -51,7 +51,7 @@ spec: query: properties: byLabel: - description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,placed_into,policy,recommended_for,restore_into,scaled_by,source,storage,view) + description: ENUM(authn,authz,auth_secret,backup_via,catalog,cert_issuer,config,connect_via,exposed_by,event,located_on,monitored_by,ocm_bind,offshoot,ops,policy,recommended_for,restore_into,scaled_by,source,storage,view) enum: - authn - authz @@ -68,7 +68,6 @@ spec: - ocm_bind - offshoot - ops - - placed_into - policy - recommended_for - restore_into diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_webhook.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_webhook.go index 83eaea47e..14b2429bd 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_webhook.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_webhook.go @@ -416,6 +416,9 @@ func (b *BackupConfiguration) validateRepoDirExistence(ctx context.Context, c cl } func storageRefMatched(b1, b2 *kmapi.ObjectReference) bool { + if b1 == nil || b2 == nil { + return false + } return b1.Name == b2.Name && b1.Namespace == b2.Namespace } diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go index 6ff9324c4..141a2ff35 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go @@ -17,6 +17,7 @@ limitations under the License. package v1alpha1 import ( + core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" ) @@ -93,6 +94,36 @@ type ManifestRestoreOptions struct { // MariaDB specifies the options for selecting particular MariaDB components to restore in manifest restore // +optional MariaDB *KubeDBManifestOptions `json:"mariaDB,omitempty"` + + // MSSQLServer specifies the options for selecting particular MSSQLServer components to restore in manifest restore + // +optional + MSSQLServer *MSSQLServerManifestOptions `json:"msSQLServer,omitempty"` +} + +type MSSQLServerManifestOptions struct { + // DB specifies whether to restore the DB manifest or not + // +optional + DB bool `json:"db,omitempty"` + + // DBName specifies the new name of the DB yaml after restore + // +optional + DBName string `json:"dbName,omitempty"` + + // AuthSecret specifies whether to restore the AuthSecret manifest or not + // +optional + AuthSecret bool `json:"authSecret,omitempty"` + + // AuthSecretName specifies new name of the AuthSecret yaml after restore + // +optional + AuthSecretName string `json:"authSecretName,omitempty"` + + // InternalAuthIssuerRef specifies the name of the IssuerRef used for endpoint authentication. + // +optional + InternalAuthIssuerRef *core.TypedLocalObjectReference `json:"internalAuthIssuerRef,omitempty"` + + // TLSIssuerRef specifies the name of the IssuerRef used for TLS configurations for both client and server. + // +optional + TLSIssuerRef *core.TypedLocalObjectReference `json:"tlsIssuerRef,omitempty"` } type KubeDBManifestOptions struct { @@ -120,9 +151,9 @@ type KubeDBManifestOptions struct { // +optional ConfigSecretName string `json:"configSecretName,omitempty"` - // IssuerRefName specifies new name of the IssuerRef after restore + // TLSIssuerRef specifies the name of the IssuerRef used for TLS configurations for both client and server // +optional - IssuerRefName string `json:"issuerRefName,omitempty"` + TLSIssuerRef *core.TypedLocalObjectReference `json:"tlsIssuerRef,omitempty"` } // RestoreDataSource specifies the information about the data that will be restored diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go index afe12b27d..4c8ecb60d 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors @@ -1013,6 +1014,11 @@ func (in *JobTemplate) DeepCopy() *JobTemplate { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KubeDBManifestOptions) DeepCopyInto(out *KubeDBManifestOptions) { *out = *in + if in.TLSIssuerRef != nil { + in, out := &in.TLSIssuerRef, &out.TLSIssuerRef + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeDBManifestOptions. @@ -1025,28 +1031,58 @@ func (in *KubeDBManifestOptions) DeepCopy() *KubeDBManifestOptions { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MSSQLServerManifestOptions) DeepCopyInto(out *MSSQLServerManifestOptions) { + *out = *in + if in.InternalAuthIssuerRef != nil { + in, out := &in.InternalAuthIssuerRef, &out.InternalAuthIssuerRef + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } + if in.TLSIssuerRef != nil { + in, out := &in.TLSIssuerRef, &out.TLSIssuerRef + *out = new(corev1.TypedLocalObjectReference) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSSQLServerManifestOptions. +func (in *MSSQLServerManifestOptions) DeepCopy() *MSSQLServerManifestOptions { + if in == nil { + return nil + } + out := new(MSSQLServerManifestOptions) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ManifestRestoreOptions) DeepCopyInto(out *ManifestRestoreOptions) { *out = *in if in.MongoDB != nil { in, out := &in.MongoDB, &out.MongoDB *out = new(KubeDBManifestOptions) - **out = **in + (*in).DeepCopyInto(*out) } if in.Postgres != nil { in, out := &in.Postgres, &out.Postgres *out = new(KubeDBManifestOptions) - **out = **in + (*in).DeepCopyInto(*out) } if in.MySQL != nil { in, out := &in.MySQL, &out.MySQL *out = new(KubeDBManifestOptions) - **out = **in + (*in).DeepCopyInto(*out) } if in.MariaDB != nil { in, out := &in.MariaDB, &out.MariaDB *out = new(KubeDBManifestOptions) - **out = **in + (*in).DeepCopyInto(*out) + } + if in.MSSQLServer != nil { + in, out := &in.MSSQLServer, &out.MSSQLServer + *out = new(MSSQLServerManifestOptions) + (*in).DeepCopyInto(*out) } } diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go index 86f156000..c32513378 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_types.go @@ -196,7 +196,7 @@ type Component struct { // WalGStats specifies the "WalG" driver specific information // +optional - WalGStats WalGStats `json:"walGStats,omitempty"` + WalGStats *WalGStats `json:"walGStats,omitempty"` // VolumeSnapshotterStats specifies the "VolumeSnapshotter" driver specific information // +optional diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go index 749f33b98..c9ea98030 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors @@ -199,7 +200,11 @@ func (in *Component) DeepCopyInto(out *Component) { *out = make([]ResticStats, len(*in)) copy(*out, *in) } - in.WalGStats.DeepCopyInto(&out.WalGStats) + if in.WalGStats != nil { + in, out := &in.WalGStats, &out.WalGStats + *out = new(WalGStats) + (*in).DeepCopyInto(*out) + } if in.VolumeSnapshotterStats != nil { in, out := &in.VolumeSnapshotterStats, &out.VolumeSnapshotterStats *out = make([]VolumeSnapshotterStats, len(*in)) diff --git a/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go b/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go index 40d4e3503..6ee74efd5 100644 --- a/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go +++ b/vendor/kubestash.dev/apimachinery/apis/zz_generated.deepcopy.go @@ -1,4 +1,5 @@ //go:build !ignore_autogenerated +// +build !ignore_autogenerated /* Copyright AppsCode Inc. and Contributors diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml index 264a19012..12af7a0db 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml @@ -24072,10 +24072,27 @@ spec: description: DBName specifies the new name of the DB yaml after restore type: string - issuerRefName: - description: IssuerRefName specifies new name of the IssuerRef - after restore - type: string + tlsIssuerRef: + description: TLSIssuerRef specifies the name of the IssuerRef + used for TLS configurations for both client and server + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic type: object mongoDB: description: MongoDB specifies the options for selecting particular @@ -24105,10 +24122,90 @@ spec: description: DBName specifies the new name of the DB yaml after restore type: string - issuerRefName: - description: IssuerRefName specifies new name of the IssuerRef + tlsIssuerRef: + description: TLSIssuerRef specifies the name of the IssuerRef + used for TLS configurations for both client and server + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + type: object + msSQLServer: + description: MSSQLServer specifies the options for selecting particular + MSSQLServer components to restore in manifest restore + properties: + authSecret: + description: AuthSecret specifies whether to restore the AuthSecret + manifest or not + type: boolean + authSecretName: + description: AuthSecretName specifies new name of the AuthSecret + yaml after restore + type: string + db: + description: DB specifies whether to restore the DB manifest + or not + type: boolean + dbName: + description: DBName specifies the new name of the DB yaml after restore type: string + internalAuthIssuerRef: + description: InternalAuthIssuerRef specifies the name of the + IssuerRef used for endpoint authentication. + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + tlsIssuerRef: + description: TLSIssuerRef specifies the name of the IssuerRef + used for TLS configurations for both client and server. + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic type: object mySQL: description: MySQL specifies the options for selecting particular @@ -24138,10 +24235,27 @@ spec: description: DBName specifies the new name of the DB yaml after restore type: string - issuerRefName: - description: IssuerRefName specifies new name of the IssuerRef - after restore - type: string + tlsIssuerRef: + description: TLSIssuerRef specifies the name of the IssuerRef + used for TLS configurations for both client and server + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic type: object postgres: description: Postgres specifies the options for selecting particular @@ -24171,10 +24285,27 @@ spec: description: DBName specifies the new name of the DB yaml after restore type: string - issuerRefName: - description: IssuerRefName specifies new name of the IssuerRef - after restore - type: string + tlsIssuerRef: + description: TLSIssuerRef specifies the name of the IssuerRef + used for TLS configurations for both client and server + properties: + apiGroup: + description: APIGroup is the group for the resource being + referenced. If APIGroup is not specified, the specified + Kind must be in the core API group. For any other third-party + types, APIGroup is required. + type: string + kind: + description: Kind is the type of resource being referenced + type: string + name: + description: Name is the name of resource being referenced + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic type: object restoreNamespace: description: RestoreNamespace specifies the Namespace where the diff --git a/vendor/modules.txt b/vendor/modules.txt index 337e74d2c..f2d0727f6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -853,7 +853,7 @@ github.com/peterbourgon/diskv # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.1 +# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 ## explicit; go 1.22.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1 @@ -1458,7 +1458,7 @@ kmodules.xyz/apiversion # kmodules.xyz/cert-manager-util v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/cert-manager-util/certmanager/v1 -# kmodules.xyz/client-go v0.30.9 +# kmodules.xyz/client-go v0.30.13 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 @@ -1500,12 +1500,12 @@ kmodules.xyz/offshoot-api/util # kmodules.xyz/prober v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/prober/api/v1 -# kmodules.xyz/resource-metadata v0.18.11-0.20240801195527-995886d0c0e5 +# kmodules.xyz/resource-metadata v0.18.12 ## explicit; go 1.22.1 kmodules.xyz/resource-metadata/apis/node kmodules.xyz/resource-metadata/apis/node/v1alpha1 kmodules.xyz/resource-metadata/crds -# kubedb.dev/apimachinery v0.47.0-rc.3 +# kubedb.dev/apimachinery v0.47.0 ## explicit; go 1.22.1 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/archiver/v1alpha1 @@ -1549,7 +1549,7 @@ kubedb.dev/apimachinery/crds kubedb.dev/apimachinery/pkg/double_optin kubedb.dev/apimachinery/pkg/factory kubedb.dev/apimachinery/pkg/validator -# kubedb.dev/db-client-go v0.2.0-rc.3 +# kubedb.dev/db-client-go v0.2.0 ## explicit; go 1.22.1 kubedb.dev/db-client-go/elasticsearch kubedb.dev/db-client-go/redis @@ -1566,7 +1566,7 @@ kubeops.dev/petset/pkg/features kubeops.dev/sidekick/apis/apps kubeops.dev/sidekick/apis/apps/v1alpha1 kubeops.dev/sidekick/crds -# kubestash.dev/apimachinery v0.10.0 +# kubestash.dev/apimachinery v0.11.0 ## explicit; go 1.22.0 kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/core/v1alpha1