From a5db567e7ab33c49f230dc71fea7620fd736f90d Mon Sep 17 00:00:00 2001 From: Raphael Vogel Date: Fri, 13 Sep 2024 08:22:18 +0200 Subject: [PATCH] Update pkg/controller/issuer/ca/handler.go cherry picked from: 32bd917208f0c8ac2a7531958ebac5f3c70a6a16 --- pkg/controller/issuer/certificate/reconciler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/issuer/certificate/reconciler.go b/pkg/controller/issuer/certificate/reconciler.go index ff9e435e..19c7c184 100644 --- a/pkg/controller/issuer/certificate/reconciler.go +++ b/pkg/controller/issuer/certificate/reconciler.go @@ -22,6 +22,7 @@ import ( apierrrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/utils/ptr" "github.com/gardener/controller-manager-library/pkg/controllermanager/cluster" "github.com/gardener/controller-manager-library/pkg/controllermanager/controller" @@ -563,8 +564,7 @@ func (r *certReconciler) obtainCertificateCA(logctx logger.LogContext, obj resou return r.failedStop(logctx, obj, api.StateError, err) } if duration == nil { - defaultDuration := 2 * legobridge.DefaultCertDuration - duration = &defaultDuration + duration = ptr.To(2 * legobridge.DefaultCertDuration) } err = r.validateCertDuration(duration, CAKeyPair) if err != nil {