Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for release v0.41.0-beta.1 #748

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
kmodules.xyz/client-go v0.29.6
kmodules.xyz/custom-resources v0.29.0
kmodules.xyz/monitoring-agent-api v0.29.0
kubedb.dev/apimachinery v0.41.0-beta.0.0.20240119173518-f85d14100011
kubedb.dev/apimachinery v0.41.0-beta.1
kubedb.dev/db-client-go v0.0.9-0.20240119051334-7f4d5847462a
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/yaml v1.4.0
Expand Down Expand Up @@ -137,7 +137,7 @@ require (
kmodules.xyz/prober v0.29.0 // indirect
kmodules.xyz/resource-metadata v0.18.2-0.20240105072614-e92a8a48d400 // indirect
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046 // indirect
kubestash.dev/apimachinery v0.3.1-0.20231231034418-cc46ddfd674a // indirect
kubestash.dev/apimachinery v0.4.0-rc.0 // indirect
sigs.k8s.io/gateway-api v0.8.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -819,14 +819,14 @@ 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.2-0.20240105072614-e92a8a48d400 h1:bmd9/fvbhE55xtMF9hXVzjoUZFLGjMfEoHSHu9Hw6Gc=
kmodules.xyz/resource-metadata v0.18.2-0.20240105072614-e92a8a48d400/go.mod h1:XsCdEKjfoulX29tMGviDhjT/jLl158uvMvXlKOhK1as=
kubedb.dev/apimachinery v0.41.0-beta.0.0.20240119173518-f85d14100011 h1:cgynwqJ55px78ZzBmVLnnrLwjctqkiiVs0gkHBzpDpo=
kubedb.dev/apimachinery v0.41.0-beta.0.0.20240119173518-f85d14100011/go.mod h1:3GVSOsOxnlMVnprJ77YMoKE56A7ogvqCGxJu8wKhNKU=
kubedb.dev/apimachinery v0.41.0-beta.1 h1:Aa7LRG1HO/da6AwNY3K/3BlfiMunUwiQow3dEbkuiX0=
kubedb.dev/apimachinery v0.41.0-beta.1/go.mod h1:WdyZn+5Ni4IdlUgtpibFVv40RgN5qZV8oJN0rhVCOuM=
kubedb.dev/db-client-go v0.0.9-0.20240119051334-7f4d5847462a h1:0cbpIkRE0H9erqSC6zTcQgTdsv9crvr+zFyHvTpWsvs=
kubedb.dev/db-client-go v0.0.9-0.20240119051334-7f4d5847462a/go.mod h1:RfjD10LuyFdnZdrtVW0p6OSi304yotraYFArBmeypJo=
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046 h1:X1ieV+IXqNesmFwSH6NEVF1J2wO0vplC4k6v3Vmq0d0=
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046/go.mod h1:XX6Vhw9EMmX9R8Y13AgaYDAsfeLZdTL8MzymTOAT0nY=
kubestash.dev/apimachinery v0.3.1-0.20231231034418-cc46ddfd674a h1:zkRd7mpfFk2QtGKefGxZqpczy909KJCk4iPu9WOwCKU=
kubestash.dev/apimachinery v0.3.1-0.20231231034418-cc46ddfd674a/go.mod h1:ImhcNxJIdObtmm1jPeOnvK9TrwS7bXqNa8I4Um/Vf1A=
kubestash.dev/apimachinery v0.4.0-rc.0 h1:iElRLTX8WsN4xl49y07Dz1ZD14FCJZp5RZhXwsutNmw=
kubestash.dev/apimachinery v0.4.0-rc.0/go.mod h1:mqOML23d9Hm2kSyzlRy6Gr69RGEUaOCTWYl2egklac8=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg=
sigs.k8s.io/gateway-api v0.8.0/go.mod h1:okOnjPNBFbIS/Rw9kAhuIUaIkLhTKEu+ARIuXk2dgaM=
Expand Down
12 changes: 5 additions & 7 deletions vendor/kubestash.dev/apimachinery/apis/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,11 @@ const (
)

const (
ComponentPod = "pod"
ComponentDeployment = "deployment"
ComponentPVC = "pvc"
ComponentDump = "dump"
ComponentWal = "wal"
ComponentManifests = "manifests"
ComponentVolumeSnapshots = "volumesnapshots"
ComponentPod = "pod"
ComponentDump = "dump"
ComponentWal = "wal"
ComponentManifest = "manifest"
ComponentVolumeSnapshot = "volumesnapshot"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ func (b *BackupConfiguration) validateSessions(ctx context.Context, c client.Cli
}
}

if err := b.validateUniqueRepo(); err != nil {
return err
}

if err := b.validateUniqueRepoDir(ctx, c); err != nil {
return err
}
Expand Down Expand Up @@ -365,21 +361,6 @@ func (b *BackupConfiguration) validateRepositories(ctx context.Context, c client
return nil
}

func (b *BackupConfiguration) validateUniqueRepo() error {
mapRepoToBackend := make(map[string]map[string]string)
for _, session := range b.Spec.Sessions {
for _, repo := range session.Repositories {
if repoInfo, ok := mapRepoToBackend[repo.Name]; ok && repoInfo[repo.Backend] == repo.Name {
return fmt.Errorf("repository %q can not be used from multiple sessions. Please choose a different repository", repo.Name)
}
mapRepoToBackend[repo.Name] = map[string]string{
repo.Backend: repo.Name,
}
}
}
return nil
}

func (b *BackupConfiguration) validateUniqueRepoDir(ctx context.Context, c client.Client) error {
if err := b.validateRepoDirectories(); err != nil {
return err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kmapi "kmodules.xyz/client-go/api/v1"
ofst "kmodules.xyz/offshoot-api/api/v1"
)

const (
Expand Down Expand Up @@ -69,10 +68,6 @@ type RestoreSessionSpec struct {
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`

// RuntimeSettings allow to specify Resources, NodeSelector, Affinity, Toleration, ReadinessProbe etc.
// +optional
RuntimeSettings ofst.RuntimeSettings `json:"runtimeSettings,omitempty"`

// ManifestOptions provide options to select particular manifest object to restore
// +optional
ManifestOptions *ManifestRestoreOptions `json:"manifestOptions,omitempty"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,19 @@ func (r *BackupStorage) isPointToSameDir(bs BackupStorage) bool {
return true
}
return false
case ProviderB2:
if r.Spec.Storage.B2.Bucket == bs.Spec.Storage.B2.Bucket &&
r.Spec.Storage.B2.Prefix == bs.Spec.Storage.B2.Prefix {
return true
}
return false
case ProviderSwift:
// TODO: check for account
if r.Spec.Storage.Swift.Container == bs.Spec.Storage.Swift.Container &&
r.Spec.Storage.Swift.Prefix == bs.Spec.Storage.Swift.Prefix {
return true
}
return false
//case ProviderB2:
// if r.Spec.Storage.B2.Bucket == bs.Spec.Storage.B2.Bucket &&
// r.Spec.Storage.B2.Prefix == bs.Spec.Storage.B2.Prefix {
// return true
// }
// return false
//case ProviderSwift:
// // TODO: check for account
// if r.Spec.Storage.Swift.Container == bs.Spec.Storage.Swift.Container &&
// r.Spec.Storage.Swift.Prefix == bs.Spec.Storage.Swift.Prefix {
// return true
// }
// return false
default:
return false
}
Expand Down
46 changes: 25 additions & 21 deletions vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const (
ProviderS3 StorageProvider = "s3"
ProviderGCS StorageProvider = "gcs"
ProviderAzure StorageProvider = "azure"
ProviderSwift StorageProvider = "swift"
ProviderB2 StorageProvider = "b2"
ProviderRest StorageProvider = "rest"
//ProviderSwift StorageProvider = "swift"
//ProviderB2 StorageProvider = "b2"
//ProviderRest StorageProvider = "rest"
)

type Backend struct {
Expand All @@ -61,17 +61,19 @@ type Backend struct {
// +optional
Azure *AzureSpec `json:"azure,omitempty"`

// Swift specifies the storage information for Swift container
// +optional
Swift *SwiftSpec `json:"swift,omitempty"`
/*
// Swift specifies the storage information for Swift container
// +optional
Swift *SwiftSpec `json:"swift,omitempty"`

// B2 specifies the storage information for B2 bucket
// +optional
B2 *B2Spec `json:"b2,omitempty"`
// B2 specifies the storage information for B2 bucket
// +optional
B2 *B2Spec `json:"b2,omitempty"`

// Rest specifies the storage information for rest storage server
// +optional
Rest *RestServerSpec `json:"rest,omitempty"`
// Rest specifies the storage information for rest storage server
// +optional
Rest *RestServerSpec `json:"rest,omitempty"`
*/
}

type LocalSpec struct {
Expand Down Expand Up @@ -102,9 +104,9 @@ type S3Spec struct {
// +optional
Region string `json:"region,omitempty"`

// Secret specifies the name of the Secret that contains the access credential for this storage.
// SecretName specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}

type GCSSpec struct {
Expand All @@ -118,9 +120,9 @@ type GCSSpec struct {
// +optional
MaxConnections int64 `json:"maxConnections,omitempty"`

// Secret specifies the name of the Secret that contains the access credential for this storage.
// SecretName specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}

type AzureSpec struct {
Expand All @@ -137,11 +139,12 @@ type AzureSpec struct {
// +optional
MaxConnections int64 `json:"maxConnections,omitempty"`

// Secret specifies the name of the Secret that contains the access credential for this storage.
// SecretName specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}

/*
type SwiftSpec struct {
// Container specifies the name of the Swift container that will be used as storage backend.
Container string `json:"container,omitempty"`
Expand All @@ -151,7 +154,7 @@ type SwiftSpec struct {

// Secret specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}

type B2Spec struct {
Expand All @@ -167,7 +170,7 @@ type B2Spec struct {

// Secret specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}

type RestServerSpec struct {
Expand All @@ -176,5 +179,6 @@ type RestServerSpec struct {

// Secret specifies the name of the Secret that contains the access credential for this storage.
// +optional
Secret string `json:"secret,omitempty"`
SecretName string `json:"secretName,omitempty"`
}
*/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading