diff --git a/go.mod b/go.mod index 98348c31..a1079ae3 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 kmodules.xyz/client-go v0.30.13 kmodules.xyz/offshoot-api v0.29.4 - kubestash.dev/apimachinery v0.12.0 + kubestash.dev/apimachinery v0.12.1-0.20240911133307-f1d8c0727f2e sigs.k8s.io/controller-runtime v0.18.4 ) diff --git a/go.sum b/go.sum index f1c1ccad..7291f8bd 100644 --- a/go.sum +++ b/go.sum @@ -638,8 +638,8 @@ 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/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg= kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo= -kubestash.dev/apimachinery v0.12.0 h1:33eDk/W2n/K45iRpAj8JTFGq9JzSvJBoWAjyoKTklgQ= -kubestash.dev/apimachinery v0.12.0/go.mod h1:gtVSpHtK8LvS26+rKyLTnZvijvSSCdfG83n6GL6+Kwc= +kubestash.dev/apimachinery v0.12.1-0.20240911133307-f1d8c0727f2e h1:4D0ogjJlJj9sGbldiYkazvrqMat4UyN2kVX47bCYs6w= +kubestash.dev/apimachinery v0.12.1-0.20240911133307-f1d8c0727f2e/go.mod h1:gtVSpHtK8LvS26+rKyLTnZvijvSSCdfG83n6GL6+Kwc= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= diff --git a/pkg/trigger.go b/pkg/trigger.go index 55e16729..aff8ef7c 100644 --- a/pkg/trigger.go +++ b/pkg/trigger.go @@ -100,8 +100,9 @@ func triggerBackup(backupConfig *coreapi.BackupConfiguration, session coreapi.Se Kind: coreapi.ResourceKindBackupConfiguration, Name: backupConfig.Name, }, - Session: session.Name, - RetryLeft: 0, + Session: session.Name, + RetryLeft: 0, + BackupTimeout: session.BackupTimeout, }, } diff --git a/vendor/kubestash.dev/apimachinery/apis/constant.go b/vendor/kubestash.dev/apimachinery/apis/constant.go index b6b80523..3070ddb3 100644 --- a/vendor/kubestash.dev/apimachinery/apis/constant.go +++ b/vendor/kubestash.dev/apimachinery/apis/constant.go @@ -77,6 +77,10 @@ const ( KubeStashAppRefName = "kubestash.com/app-ref-name" ) +const ( + AnnKubeDBAppVersion = "kubedb.com/db-version" +) + // Keys for structure logging const ( KeyTargetKind = "target_kind" @@ -152,3 +156,7 @@ const ( SnapshotVersionV1 = "v1" DirRepository = "repository" ) + +const ( + KeyRestoreSessionBeneficiary = "restoresession.kubestash.com/beneficiary" +) diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go index 105c4ce4..a270199f 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupconfiguration_types.go @@ -132,10 +132,10 @@ type SessionConfig struct { // +optional RetryConfig *RetryConfig `json:"retryConfig,omitempty"` - // Timeout specifies the maximum duration of backup. BackupSession will be considered Failed + // BackupTimeout specifies the maximum duration of backup. Backup will be considered Failed // if backup does not complete within this time limit. By default, KubeStash don't set any timeout for backup. // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` + BackupTimeout *metav1.Duration `json:"backupTimeout,omitempty"` // SessionHistoryLimit specifies how many backup Jobs and associate resources KubeStash should keep for debugging purpose. // The default value is 1. diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go index 5ccf2faf..d52d9d8b 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/backupsession_types.go @@ -63,6 +63,11 @@ type BackupSessionSpec struct { // If this set to non-zero, KubeStash will create a new BackupSession if the current one fails. // +optional RetryLeft int32 `json:"retryLeft,omitempty"` + + // BackupTimeout specifies the maximum duration of backup. Backup will be considered Failed + // if backup does not complete within this time limit. By default, KubeStash don't set any timeout for backup. + // +optional + BackupTimeout *metav1.Duration `json:"timeout,omitempty"` } // BackupSessionStatus defines the observed state of BackupSession @@ -75,11 +80,6 @@ type BackupSessionStatus struct { // +optional Duration string `json:"duration,omitempty"` - // Deadline specifies the deadline of backup. BackupSession will be - // considered Failed if backup does not complete within this deadline - // +optional - Deadline *metav1.Time `json:"sessionDeadline,omitempty"` - // TotalSnapshots specifies the total number of snapshots created for this backupSession. // +optional TotalSnapshots *int32 `json:"totalSnapshots,omitempty"` diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go index df970cf4..b5515350 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_helpers.go @@ -41,8 +41,7 @@ func (rs *RestoreSession) CalculatePhase() RestorePhase { } if cutil.IsConditionTrue(rs.Status.Conditions, TypeMetricsPushed) && - (cutil.IsConditionTrue(rs.Status.Conditions, TypeDeadlineExceeded) || - cutil.IsConditionFalse(rs.Status.Conditions, TypePreRestoreHooksExecutionSucceeded) || + (cutil.IsConditionFalse(rs.Status.Conditions, TypePreRestoreHooksExecutionSucceeded) || cutil.IsConditionFalse(rs.Status.Conditions, TypePostRestoreHooksExecutionSucceeded) || cutil.IsConditionFalse(rs.Status.Conditions, TypeRestoreExecutorEnsured)) { return RestoreFailed 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 141a2ff3..1683ddfe 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/restoresession_types.go @@ -64,10 +64,10 @@ type RestoreSessionSpec struct { // +optional Hooks *RestoreHooks `json:"hooks,omitempty"` - // Timeout specifies a duration that KubeStash should wait for the session execution to be completed. - // If the session execution does not finish within this time period, KubeStash will consider this session as a failure. + // RestoreTimeout specifies a duration that KubeStash should wait for the restore to be completed. + // If the restore does not finish within this time period, KubeStash will consider this restore as a failure. // +optional - Timeout *metav1.Duration `json:"timeout,omitempty"` + RestoreTimeout *metav1.Duration `json:"restoreTimeout,omitempty"` // ManifestOptions provide options to select particular manifest object to restore // +optional @@ -222,11 +222,6 @@ type RestoreSessionStatus struct { // +optional Duration string `json:"duration,omitempty"` - // Deadline specifies a timestamp till this session is valid. If the session does not complete within this deadline, - // it will be considered as failed. - // +optional - Deadline *metav1.Time `json:"deadline,omitempty"` - // TotalComponents represents the number of total components for this RestoreSession // +optional TotalComponents int32 `json:"totalComponents,omitempty"` diff --git a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go index 96dbb652..445f867b 100644 --- a/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go +++ b/vendor/kubestash.dev/apimachinery/apis/core/v1alpha1/types.go @@ -217,9 +217,6 @@ type RetryConfig struct { } const ( - TypeDeadlineExceeded = "DeadlineExceeded" - ReasonFailedToCompleteWithinDeadline = "FailedToCompleteWithinDeadline" - // TypeMetricsPushed indicates whether Metrics are pushed or not TypeMetricsPushed = "MetricsPushed" ReasonSuccessfullyPushedMetrics = "SuccessfullyPushedMetrics" 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 4c8ecb60..eadd4d67 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 @@ -598,6 +598,11 @@ func (in *BackupSessionSpec) DeepCopyInto(out *BackupSessionSpec) { *out = new(corev1.TypedLocalObjectReference) (*in).DeepCopyInto(*out) } + if in.BackupTimeout != nil { + in, out := &in.BackupTimeout, &out.BackupTimeout + *out = new(metav1.Duration) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSessionSpec. @@ -613,10 +618,6 @@ func (in *BackupSessionSpec) DeepCopy() *BackupSessionSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BackupSessionStatus) DeepCopyInto(out *BackupSessionStatus) { *out = *in - if in.Deadline != nil { - in, out := &in.Deadline, &out.Deadline - *out = (*in).DeepCopy() - } if in.TotalSnapshots != nil { in, out := &in.TotalSnapshots, &out.TotalSnapshots *out = new(int32) @@ -1373,8 +1374,8 @@ func (in *RestoreSessionSpec) DeepCopyInto(out *RestoreSessionSpec) { *out = new(RestoreHooks) (*in).DeepCopyInto(*out) } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout + if in.RestoreTimeout != nil { + in, out := &in.RestoreTimeout, &out.RestoreTimeout *out = new(metav1.Duration) **out = **in } @@ -1403,10 +1404,6 @@ func (in *RestoreSessionStatus) DeepCopyInto(out *RestoreSessionStatus) { *out = new(bool) **out = **in } - if in.Deadline != nil { - in, out := &in.Deadline, &out.Deadline - *out = (*in).DeepCopy() - } if in.Components != nil { in, out := &in.Components, &out.Components *out = make(map[string]ComponentRestoreStatus, len(*in)) @@ -1585,8 +1582,8 @@ func (in *SessionConfig) DeepCopyInto(out *SessionConfig) { *out = new(RetryConfig) **out = **in } - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout + if in.BackupTimeout != nil { + in, out := &in.BackupTimeout, &out.BackupTimeout *out = new(metav1.Duration) **out = **in } diff --git a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_helpers.go b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_helpers.go index 96f96878..96164a04 100644 --- a/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_helpers.go +++ b/vendor/kubestash.dev/apimachinery/apis/storage/v1alpha1/snapshot_helpers.go @@ -18,6 +18,7 @@ package v1alpha1 import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "kmodules.xyz/client-go/apiextensions" cutil "kmodules.xyz/client-go/conditions" "kmodules.xyz/client-go/meta" @@ -187,3 +188,15 @@ func (s *Snapshot) OffshootLabels() map[string]string { func (s *Snapshot) GetComponentPath(componentName string) string { return filepath.Join(apis.DirRepository, s.Spec.Version, s.Spec.Session, componentName) } + +func (s *Snapshot) GetRemainingTimeoutDuration(timeout *metav1.Duration) (*metav1.Duration, error) { + if timeout == nil { + return nil, nil + } + + diff := metav1.Now().Sub(s.GetCreationTimestamp().Time) + if diff < timeout.Duration { + return &metav1.Duration{Duration: timeout.Duration - diff}, nil + } + return nil, fmt.Errorf("deadline exceeded") +} diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml index 4918fbb4..e7c8c765 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupbatches.yaml @@ -110,6 +110,12 @@ spec: description: BatchSession specifies the session configuration for the targets. properties: + backupTimeout: + description: BackupTimeout specifies the maximum duration of + backup. Backup will be considered Failed if backup does not + complete within this time limit. By default, KubeStash don't + set any timeout for backup. + type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -36194,12 +36200,6 @@ spec: type: array type: object type: array - timeout: - description: Timeout specifies the maximum duration of backup. - BackupSession will be considered Failed if backup does not - complete within this time limit. By default, KubeStash don't - set any timeout for backup. - type: string type: object type: array targets: diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml index 62b405d7..08291e6f 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupblueprints.yaml @@ -15716,6 +15716,12 @@ spec: type: object type: array type: object + backupTimeout: + description: BackupTimeout specifies the maximum duration + of backup. Backup will be considered Failed if backup + does not complete within this time limit. By default, + KubeStash don't set any timeout for backup. + type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -37239,12 +37245,6 @@ spec: debugging purpose. The default value is 1. format: int32 type: integer - timeout: - description: Timeout specifies the maximum duration of backup. - BackupSession will be considered Failed if backup does - not complete within this time limit. By default, KubeStash - don't set any timeout for backup. - type: string type: object type: array type: object diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml index 30807c31..8b3ff860 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupconfigurations.yaml @@ -14554,6 +14554,12 @@ spec: type: object type: array type: object + backupTimeout: + description: BackupTimeout specifies the maximum duration of + backup. Backup will be considered Failed if backup does not + complete within this time limit. By default, KubeStash don't + set any timeout for backup. + type: string hooks: description: Hooks specifies the backup hooks that should be executed before and/or after the backup. @@ -34373,12 +34379,6 @@ spec: purpose. The default value is 1. format: int32 type: integer - timeout: - description: Timeout specifies the maximum duration of backup. - BackupSession will be considered Failed if backup does not - complete within this time limit. By default, KubeStash don't - set any timeout for backup. - type: string type: object type: array target: diff --git a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml index 51f413b2..e1427edb 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_backupsessions.yaml @@ -87,6 +87,12 @@ spec: description: Session specifies the name of the session that triggered this backup type: string + timeout: + description: BackupTimeout specifies the maximum duration of backup. + Backup will be considered Failed if backup does not complete within + this time limit. By default, KubeStash don't set any timeout for + backup. + type: string type: object status: description: BackupSessionStatus defines the observed state of BackupSession @@ -249,12 +255,6 @@ spec: not. This field will exist only if the `retryConfig` has been set in the respective backup invoker. type: boolean - sessionDeadline: - description: Deadline specifies the deadline of backup. BackupSession - will be considered Failed if backup does not complete within this - deadline - format: date-time - type: string snapshots: description: Snapshots specifies the Snapshots status items: 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 12af7a0d..5f007ab8 100644 --- a/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml +++ b/vendor/kubestash.dev/apimachinery/crds/core.kubestash.com_restoresessions.yaml @@ -24312,6 +24312,12 @@ spec: restored files will be applied type: string type: object + restoreTimeout: + description: RestoreTimeout specifies a duration that KubeStash should + wait for the restore to be completed. If the restore does not finish + within this time period, KubeStash will consider this restore as + a failure. + type: string target: description: Target indicates the target application where the data will be restored. The target must be in the same namespace as the @@ -24330,12 +24336,6 @@ spec: required: - name type: object - timeout: - description: Timeout specifies a duration that KubeStash should wait - for the session execution to be completed. If the session execution - does not finish within this time period, KubeStash will consider - this session as a failure. - type: string type: object status: description: RestoreSessionStatus defines the observed state of RestoreSession @@ -24420,12 +24420,6 @@ spec: - type type: object type: array - deadline: - description: Deadline specifies a timestamp till this session is valid. - If the session does not complete within this deadline, it will be - considered as failed. - format: date-time - type: string dependencies: description: Dependencies specifies whether the objects required by this RestoreSession exist or not diff --git a/vendor/kubestash.dev/apimachinery/pkg/restic/commands.go b/vendor/kubestash.dev/apimachinery/pkg/restic/commands.go index a9c1a0a2..33d6a530 100644 --- a/vendor/kubestash.dev/apimachinery/pkg/restic/commands.go +++ b/vendor/kubestash.dev/apimachinery/pkg/restic/commands.go @@ -35,7 +35,8 @@ import ( ) const ( - ResticCMD = "restic" + ResticCMD = "restic" + TimeoutCMD = "timeout" ) type Snapshot struct { @@ -176,7 +177,15 @@ func (w *ResticWrapper) backup(params backupParams) ([]byte, error) { args = w.appendInsecureTLSFlag(args) args = w.appendMaxConnectionsFlag(args) - return w.run(Command{Name: ResticCMD, Args: args}) + command := Command{Name: ResticCMD, Args: args} + if w.config.Timeout != nil { + timeoutArgs := []interface{}{fmt.Sprintf("%f", w.config.Timeout.Seconds())} + timeoutArgs = append(timeoutArgs, ResticCMD) + timeoutArgs = append(timeoutArgs, args...) + command = Command{Name: TimeoutCMD, Args: timeoutArgs} + } + + return w.run(command) } func (w *ResticWrapper) backupFromStdin(options BackupOptions) ([]byte, error) { @@ -200,7 +209,15 @@ func (w *ResticWrapper) backupFromStdin(options BackupOptions) ([]byte, error) { args = w.appendInsecureTLSFlag(args) args = w.appendMaxConnectionsFlag(args) - commands = append(commands, Command{Name: ResticCMD, Args: args}) + command := Command{Name: ResticCMD, Args: args} + if w.config.Timeout != nil { + timeoutArgs := []interface{}{fmt.Sprintf("%f", w.config.Timeout.Seconds())} + timeoutArgs = append(timeoutArgs, ResticCMD) + timeoutArgs = append(timeoutArgs, args...) + command = Command{Name: TimeoutCMD, Args: timeoutArgs} + } + + commands = append(commands, command) return w.run(commands...) } @@ -246,7 +263,15 @@ func (w *ResticWrapper) restore(params restoreParams) ([]byte, error) { args = w.appendInsecureTLSFlag(args) args = w.appendMaxConnectionsFlag(args) - return w.run(Command{Name: ResticCMD, Args: args}) + command := Command{Name: ResticCMD, Args: args} + if w.config.Timeout != nil { + timeoutArgs := []interface{}{fmt.Sprintf("%f", w.config.Timeout.Seconds())} + timeoutArgs = append(timeoutArgs, ResticCMD) + timeoutArgs = append(timeoutArgs, args...) + command = Command{Name: TimeoutCMD, Args: timeoutArgs} + } + + return w.run(command) } func (w *ResticWrapper) DumpOnce(dumpOptions DumpOptions) ([]byte, error) { @@ -277,10 +302,16 @@ func (w *ResticWrapper) DumpOnce(dumpOptions DumpOptions) ([]byte, error) { args = w.appendMaxConnectionsFlag(args) args = w.appendInsecureTLSFlag(args) - // first add restic command, then add StdoutPipeCommands - commands := []Command{ - {Name: ResticCMD, Args: args}, + command := Command{Name: ResticCMD, Args: args} + if w.config.Timeout != nil { + timeoutArgs := []interface{}{fmt.Sprintf("%f", w.config.Timeout.Seconds())} + timeoutArgs = append(timeoutArgs, ResticCMD) + timeoutArgs = append(timeoutArgs, args...) + command = Command{Name: TimeoutCMD, Args: timeoutArgs} } + + // first add restic command, then add StdoutPipeCommands + commands := []Command{command} commands = append(commands, dumpOptions.StdoutPipeCommands...) return w.run(commands...) } @@ -368,7 +399,7 @@ func (w *ResticWrapper) run(commands ...Command) ([]byte, error) { w.sh.Stderr = io.MultiWriter(os.Stderr, errBuff) for _, cmd := range commands { - if cmd.Name == ResticCMD { + if cmd.Name == ResticCMD || cmd.Name == TimeoutCMD { // first apply NiceSettings, then apply IONiceSettings cmd, err = w.applyNiceSettings(cmd) if err != nil { diff --git a/vendor/kubestash.dev/apimachinery/pkg/restic/config.go b/vendor/kubestash.dev/apimachinery/pkg/restic/config.go index 6bf9617b..2a910c3b 100644 --- a/vendor/kubestash.dev/apimachinery/pkg/restic/config.go +++ b/vendor/kubestash.dev/apimachinery/pkg/restic/config.go @@ -18,12 +18,12 @@ package restic import ( "fmt" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "kubestash.dev/apimachinery/apis/storage/v1alpha1" "os" "path/filepath" "sort" - "kubestash.dev/apimachinery/apis/storage/v1alpha1" - shell "gomodules.xyz/go-sh" core "k8s.io/api/core/v1" kmapi "kmodules.xyz/client-go/api/v1" @@ -103,6 +103,7 @@ type SetupOptions struct { EnableCache bool Nice *ofst.NiceSettings IONice *ofst.IONiceSettings + Timeout *metav1.Duration } type KeyOptions struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index 2e96dced..8642ccb8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -835,7 +835,7 @@ kmodules.xyz/offshoot-api/api/v1 # kmodules.xyz/prober v0.29.0 ## explicit; go 1.21.5 kmodules.xyz/prober/api/v1 -# kubestash.dev/apimachinery v0.12.0 +# kubestash.dev/apimachinery v0.12.1-0.20240911133307-f1d8c0727f2e ## explicit; go 1.22.0 kubestash.dev/apimachinery/apis kubestash.dev/apimachinery/apis/addons/v1alpha1