Skip to content

Commit

Permalink
Add a new configurable field fullsnapshotLeaseUpdateRetryInterval in …
Browse files Browse the repository at this point in the history
…spec.backup section of etcd yaml
  • Loading branch information
anveshreddy18 committed Jun 24, 2024
1 parent 277cbd1 commit fefae40
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/v1alpha1/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ type BackupSpec struct {
// All full snapshots beyond this limit will be garbage collected.
// +optional
MaxBackupsLimitBasedGC *int32 `json:"maxBackupsLimitBasedGC,omitempty"`
// FullSnapshotLeaseUpdateInterval defines the interval for retrying to update the full snapshot lease.
// +optional
FullSnapshotLeaseUpdateInterval *metav1.Duration `json:"fullSnapshotLeaseUpdateInterval,omitempty"`
// GarbageCollectionPeriod defines the period for garbage collecting old backups
// +optional
GarbageCollectionPeriod *metav1.Duration `json:"garbageCollectionPeriod,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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 @@ -162,6 +162,10 @@ spec:
description: EtcdSnapshotTimeout defines the timeout duration
for etcd FullSnapshot operation
type: string
fullSnapshotLeaseUpdateInterval:
description: FullSnapshotLeaseUpdateInterval defines the interval
for retrying to update the full snapshot lease.
type: string
fullSnapshotSchedule:
description: FullSnapshotSchedule defines the cron standard schedule
for full snapshots.
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/crd-druid.gardener.cloud_etcds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ spec:
description: EtcdSnapshotTimeout defines the timeout duration
for etcd FullSnapshot operation
type: string
fullSnapshotLeaseUpdateInterval:
description: FullSnapshotLeaseUpdateInterval defines the interval
for retrying to update the full snapshot lease.
type: string
fullSnapshotSchedule:
description: FullSnapshotSchedule defines the cron standard schedule
for full snapshots.
Expand Down
3 changes: 3 additions & 0 deletions internal/component/statefulset/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,9 @@ func (b *stsBuilder) getBackupStoreCommandArgs() []string {
if b.etcd.Spec.Backup.FullSnapshotSchedule != nil {
commandArgs = append(commandArgs, fmt.Sprintf("--schedule=%s", *b.etcd.Spec.Backup.FullSnapshotSchedule))
}
if b.etcd.Spec.Backup.FullSnapshotLeaseUpdateInterval != nil {
commandArgs = append(commandArgs, fmt.Sprintf("--full-snapshot-lease-update-interval=%s", b.etcd.Spec.Backup.FullSnapshotLeaseUpdateInterval.Duration.String()))
}

// Delta snapshot command line args
// -----------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit fefae40

Please sign in to comment.