Skip to content

Commit d593c00

Browse files
committed
set years suffix to y
Signed-off-by: iTrooz <[email protected]>
1 parent 4cac3c3 commit d593c00

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

config/crd/v1/bases/velero.io_backups.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,8 @@ spec:
497497
description: |-
498498
TTL is a time.Duration-compatible string describing how long
499499
the Backup should be retained for.
500-
Supports time.Duration units + day (d), week (w), month (mo), and year (yr).
501-
Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1yr = 365d.
500+
Supports time.Duration units + day (d), week (w), month (mo), and year (y).
501+
Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1y = 365d.
502502
type: string
503503
uploaderConfig:
504504
description: UploaderConfig specifies the configuration for the uploader.

config/crd/v1/bases/velero.io_schedules.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,8 @@ spec:
538538
description: |-
539539
TTL is a time.Duration-compatible string describing how long
540540
the Backup should be retained for.
541-
Supports time.Duration units + day (d), week (w), month (mo), and year (yr).
542-
Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1yr = 365d.
541+
Supports time.Duration units + day (d), week (w), month (mo), and year (y).
542+
Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1y = 365d.
543543
type: string
544544
uploaderConfig:
545545
description: UploaderConfig specifies the configuration for the

config/crd/v1/crds/crds.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/velero/v1/backup_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ type BackupSpec struct {
110110

111111
// TTL is a time.Duration-compatible string describing how long
112112
// the Backup should be retained for.
113-
// Supports time.Duration units + day (d), week (w), month (mo), and year (yr).
114-
// Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1yr = 365d.
113+
// Supports time.Duration units + day (d), week (w), month (mo), and year (y).
114+
// Note that days, months, and years are static durations: 1d = 24h, 1mo = 30d, 1y = 365d.
115115
// +optional
116116
TTL metav1.Duration `json:"ttl,omitempty"`
117117

pkg/cmd/util/flag/duration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var unitMap = map[string]uint64{
2828
"d": uint64(24 * time.Hour),
2929
"w": uint64(7 * 24 * time.Hour),
3030
"mo": uint64(30 * 24 * time.Hour),
31+
"y": uint64(365 * 24 * time.Hour),
3132
"yr": uint64(365 * 24 * time.Hour),
3233
}
3334

0 commit comments

Comments
 (0)