Skip to content

Commit

Permalink
Update pkg/controller/issuer/ca/handler.go
Browse files Browse the repository at this point in the history
cherry picked from: 32bd917
  • Loading branch information
RaphaelVogel authored and marc1404 committed Nov 12, 2024
1 parent 875cc76 commit a5db567
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/issuer/certificate/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a5db567

Please sign in to comment.