Skip to content

Commit

Permalink
Merge pull request #15655 from hakman/fix_backup-retention-days
Browse files Browse the repository at this point in the history
Fix modifying backupRetentionDays
  • Loading branch information
k8s-ci-robot committed Jul 17, 2023
2 parents 5d08bc3 + b6a8141 commit 9d2aa4c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ etcdClusters:
- name: us-test-1a
volumeSize: 20
manager:
backupRetentionDays: 90
backupRetentionDays: 30
env:
- name: ETCD_MANAGER_HOURLY_BACKUPS_RETENTION
value: 1d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
name: us-test-1a
volumeSize: 20
manager:
backupRetentionDays: 90
backupRetentionDays: 30
env:
- name: ETCD_MANAGER_HOURLY_BACKUPS_RETENTION
value: 1d
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
2>&1
env:
- name: ETCD_MANAGER_DAILY_BACKUPS_RETENTION
value: 90d
value: 30d
- name: ETCD_MANAGER_HOURLY_BACKUPS_RETENTION
value: 1d
image: gcr.io/k8s-staging-etcdadm/etcd:v20210430-v0.1.3-739-g7da12acc
Expand Down
4 changes: 3 additions & 1 deletion upup/pkg/fi/cloudup/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ func PerformAssignments(c *kops.Cluster, cloud fi.Cloud) error {
if etcdCluster.Manager == nil {
etcdCluster.Manager = &kops.EtcdManagerSpec{}
}
etcdCluster.Manager.BackupRetentionDays = fi.PtrTo[uint32](90)
if etcdCluster.Manager.BackupRetentionDays == nil {
etcdCluster.Manager.BackupRetentionDays = fi.PtrTo[uint32](90)
}
}

// Topology support
Expand Down

0 comments on commit 9d2aa4c

Please sign in to comment.