diff --git a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/component_test.go b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/component_test.go index 6c65320a3207..27eb18f41f59 100644 --- a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/component_test.go +++ b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/component_test.go @@ -48,10 +48,11 @@ WantedBy=multi-user.target`), Command: new(extensionsv1alpha1.CommandStart), Enable: new(true), Content: new(`[Unit] -Description=Log Rotation at each 10 minutes +Description=Log Rotation once a day [Timer] -OnCalendar=*:0/10 +OnCalendar=daily AccuracySec=1min +RandomizedDelaySec=4h Persistent=true [Install] WantedBy=multi-user.target`), diff --git a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate.go b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate.go index cff1fad74f28..9df0a7136ddb 100644 --- a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate.go +++ b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate.go @@ -53,10 +53,11 @@ WantedBy=multi-user.target`), Command: new(extensionsv1alpha1.CommandStart), Enable: new(true), Content: new(`[Unit] -Description=Log Rotation at each 10 minutes +Description=Log Rotation once a day [Timer] -OnCalendar=*:0/10 +OnCalendar=daily AccuracySec=1min +RandomizedDelaySec=4h Persistent=true [Install] WantedBy=multi-user.target`), diff --git a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate_test.go b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate_test.go index e25ff9bbe3be..db77394f4817 100644 --- a/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate_test.go +++ b/pkg/component/extensions/operatingsystemconfig/original/components/containerd/logrotate/logrotate_test.go @@ -48,10 +48,11 @@ WantedBy=multi-user.target`), Command: new(extensionsv1alpha1.CommandStart), Enable: new(true), Content: new(`[Unit] -Description=Log Rotation at each 10 minutes +Description=Log Rotation once a day [Timer] -OnCalendar=*:0/10 +OnCalendar=daily AccuracySec=1min +RandomizedDelaySec=4h Persistent=true [Install] WantedBy=multi-user.target`), diff --git a/pkg/controllermanager/controller/shoot/maintenance/reconciler.go b/pkg/controllermanager/controller/shoot/maintenance/reconciler.go index c716956d1343..af535f5745b9 100644 --- a/pkg/controllermanager/controller/shoot/maintenance/reconciler.go +++ b/pkg/controllermanager/controller/shoot/maintenance/reconciler.go @@ -691,7 +691,8 @@ func computeCredentialsToRotationResults(log logr.Logger, shoot *gardencorev1bet } if etcdEncryptionKeyRotationEnabled && - etcdEncryptionKeyRotationPassedRotationPeriod(shoot, now.Time, *shoot.Spec.Maintenance.AutoRotation.Credentials.ETCDEncryptionKey.RotationPeriod) { + etcdEncryptionKeyRotationPassedRotationPeriod(shoot, now.Time, *shoot.Spec.Maintenance.AutoRotation.Credentials.ETCDEncryptionKey.RotationPeriod) && + !v1beta1helper.HibernationIsEnabled(shoot) { if len(etcdEncryptionKeyRotationPhase) == 0 || etcdEncryptionKeyRotationPhase == gardencorev1beta1.RotationCompleted { reason := "Automatic rotation of etcd encryption key configured" log.Info("ETCD Encryption key will be rotated", "reason", reason)