Skip to content

Commit d2db42c

Browse files
Merge pull request #2155 from jubittajohn/fix-makeServerCert-call
OCPBUGS-62792: Fix self-signed serving cert using 30ns lifetime instead of 30 days
2 parents c57da2b + 13b8307 commit d2db42c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • pkg/controller/controllercmd

pkg/controller/controllercmd/cmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ package controllercmd
33
import (
44
"context"
55
"fmt"
6-
"k8s.io/utils/clock"
76
"math/rand"
87
"os"
98
"path/filepath"
109
"time"
1110

11+
"k8s.io/utils/clock"
12+
1213
"github.com/spf13/cobra"
1314
"k8s.io/apiserver/pkg/server/healthz"
1415

@@ -280,7 +281,7 @@ func (c *ControllerCommandConfig) AddDefaultRotationToConfig(config *operatorv1a
280281
config.ServingInfo.CertFile = filepath.Join(temporaryCertDir, "tls.crt")
281282
config.ServingInfo.KeyFile = filepath.Join(temporaryCertDir, "tls.key")
282283
// nothing can trust this, so we don't really care about hostnames
283-
servingCert, err := ca.MakeServerCert(sets.New("localhost"), 30)
284+
servingCert, err := ca.MakeServerCert(sets.New("localhost"), time.Hour*24*30)
284285
if err != nil {
285286
return nil, nil, err
286287
}

0 commit comments

Comments
 (0)