Skip to content

Commit a010487

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

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +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-
"yr": uint64(365 * 24 * time.Hour),
31+
"y": uint64(365 * 24 * time.Hour),
3232
}
3333

3434
// ParseDuration parses strings like "2d5h10.5m"

pkg/cmd/util/flag/duration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestParseDuration(t *testing.T) {
5757
},
5858
{
5959
name: "years only",
60-
input: "1yr",
60+
input: "1y",
6161
expected: 365 * 24 * time.Hour,
6262
wantErr: false,
6363
},

0 commit comments

Comments
 (0)