Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed Jan 20, 2024
1 parent f85d141 commit ef49cbf
Show file tree
Hide file tree
Showing 18 changed files with 14,736 additions and 4,762 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ require (
kmodules.xyz/resource-metadata v0.18.2-0.20240101021508-7630737cb0e6
kmodules.xyz/webhook-runtime v0.29.1
kubeops.dev/sidekick v0.0.5-0.20231225214445-a15c70833046
kubestash.dev/apimachinery v0.3.1-0.20231231034418-cc46ddfd674a
kubestash.dev/apimachinery v0.4.0-rc.0
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/yaml v1.4.0
stash.appscode.dev/apimachinery v0.32.1-0.20231225221320-6f5a8df2ab6e
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1388,8 +1388,8 @@ kmodules.xyz/webhook-runtime v0.29.1 h1:SQ8NvwJpxv5CUuXIubSg9g0Bk8BBnj4dhCWEk6Ou
kmodules.xyz/webhook-runtime v0.29.1/go.mod h1:WVgNO4NqFdYwYZ82L6QIycN1Ax47y+yXi7XIHekYylo=
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=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
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

0 comments on commit ef49cbf

Please sign in to comment.