Skip to content

Commit

Permalink
Merge pull request #649 from wzshiming/fix/get-kubeconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming authored Jun 12, 2023
2 parents 9fdece7 + 681faa3 commit 6d51ec0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/kwokctl/cmd/get/kubeconfig/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func runE(ctx context.Context, flags *flagpole) error {

// Sign admin cert and key
now := time.Now()
notBefore := now.UTC()
notBefore := now.Add(-24 * time.Hour).UTC()
notAfter := now.Add(pki.CertificateValidity).UTC()
cert, key, err := pki.GenerateSignCert(flags.User, caCert, caKey, notBefore, notAfter, flags.Groups, nil)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kwokctl/pki/pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
// GeneratePki generates the pki for kwokctl
func GeneratePki(pkiPath string, sans ...string) error {
now := time.Now()
notBefore := now.UTC()
notBefore := now.Add(-24 * time.Hour).UTC()
notAfter := now.Add(CertificateValidity).UTC()

// Generate CA
Expand Down

0 comments on commit 6d51ec0

Please sign in to comment.