Skip to content

Commit 832392c

Browse files
cerealsnowrobinschneidermaboehm
authored
Cherry pick changes to v1.147.1 (#175)
* Add a jitter to logrotate (#172) Signed-off-by: Robin Schneider <mail@robinschneider.dev> * Skip etcdEncryptionKeyRotation when cluster is hibernated (#173) --------- Signed-off-by: Robin Schneider <mail@robinschneider.dev> Co-authored-by: Robin Schneider <45321827+robinschneider@users.noreply.github.com> Co-authored-by: Marcel Boehm <marcel.boehm@inovex.de>
1 parent e8727ad commit 832392c

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

pkg/component/extensions/operatingsystemconfig/original/components/containerd/component_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ WantedBy=multi-user.target`),
4848
Command: new(extensionsv1alpha1.CommandStart),
4949
Enable: new(true),
5050
Content: new(`[Unit]
51-
Description=Log Rotation at each 10 minutes
51+
Description=Log Rotation once a day
5252
[Timer]
53-
OnCalendar=*:0/10
53+
OnCalendar=daily
5454
AccuracySec=1min
55+
RandomizedDelaySec=4h
5556
Persistent=true
5657
[Install]
5758
WantedBy=multi-user.target`),

pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ WantedBy=multi-user.target`),
5353
Command: new(extensionsv1alpha1.CommandStart),
5454
Enable: new(true),
5555
Content: new(`[Unit]
56-
Description=Log Rotation at each 10 minutes
56+
Description=Log Rotation once a day
5757
[Timer]
58-
OnCalendar=*:0/10
58+
OnCalendar=daily
5959
AccuracySec=1min
60+
RandomizedDelaySec=4h
6061
Persistent=true
6162
[Install]
6263
WantedBy=multi-user.target`),

pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ WantedBy=multi-user.target`),
4848
Command: new(extensionsv1alpha1.CommandStart),
4949
Enable: new(true),
5050
Content: new(`[Unit]
51-
Description=Log Rotation at each 10 minutes
51+
Description=Log Rotation once a day
5252
[Timer]
53-
OnCalendar=*:0/10
53+
OnCalendar=daily
5454
AccuracySec=1min
55+
RandomizedDelaySec=4h
5556
Persistent=true
5657
[Install]
5758
WantedBy=multi-user.target`),

pkg/controllermanager/controller/shoot/maintenance/reconciler.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,8 @@ func computeCredentialsToRotationResults(log logr.Logger, shoot *gardencorev1bet
691691
}
692692

693693
if etcdEncryptionKeyRotationEnabled &&
694-
etcdEncryptionKeyRotationPassedRotationPeriod(shoot, now.Time, *shoot.Spec.Maintenance.AutoRotation.Credentials.ETCDEncryptionKey.RotationPeriod) {
694+
etcdEncryptionKeyRotationPassedRotationPeriod(shoot, now.Time, *shoot.Spec.Maintenance.AutoRotation.Credentials.ETCDEncryptionKey.RotationPeriod) &&
695+
!v1beta1helper.HibernationIsEnabled(shoot) {
695696
if len(etcdEncryptionKeyRotationPhase) == 0 || etcdEncryptionKeyRotationPhase == gardencorev1beta1.RotationCompleted {
696697
reason := "Automatic rotation of etcd encryption key configured"
697698
log.Info("ETCD Encryption key will be rotated", "reason", reason)

0 commit comments

Comments
 (0)