Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for StartTimeUTC (0.28 sec)

  1. cmd/kubeadm/app/util/starttime.go

    // in multiple locations and ending up with minor time deviations.
    var startTime time.Time
    
    func init() {
    	startTime = time.Now()
    }
    
    // StartTimeUTC returns startTime with its location set to UTC.
    func StartTimeUTC() time.Time {
    	return startTime.UTC()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/kubeconfig.go

    					validityPeriod, kubeadmconstants.CertificateValidityPeriod)
    			}
    			internalCfg.ClusterConfiguration.CertificateValidityPeriod = &metav1.Duration{
    				Duration: validityPeriod,
    			}
    
    			startTime := kubeadmutil.StartTimeUTC()
    			notAfter := startTime.Add(kubeadmconstants.CertificateValidityPeriod)
    			if internalCfg.ClusterConfiguration.CertificateValidityPeriod != nil {
    				notAfter = startTime.Add(validityPeriod)
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/cmd/kubeconfig_test.go

    				if test.expectedValidityPeriod == 0 {
    					test.expectedValidityPeriod = kubeadmconstants.CertificateValidityPeriod
    				}
    				// checks that kubeconfig files have expected client cert
    				startTime := kubeadmutil.StartTimeUTC()
    				notAfter := startTime.Add(test.expectedValidityPeriod)
    				kubeconfigtestutil.AssertKubeConfigCurrentAuthInfoWithClientCert(t, config, caCert, notAfter, "myUser")
    			}
    
    			if test.withToken {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/phases/certs/renewal/manager_test.go

    	}
    	rm, err := NewManager(cfg, dir)
    	if err != nil {
    		t.Fatalf("Failed to create the certificate renewal manager: %v", err)
    	}
    
    	// Prepare test certs with a past validity.
    	startTime := kubeadmutil.StartTimeUTC()
    
    	fmt.Println("START TIME TEST", startTime)
    
    	notBefore := startTime.Add(-rm.cfg.CertificateValidityPeriod.Duration * 2)
    	notAfter := startTime.Add(-rm.cfg.CertificateValidityPeriod.Duration)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/phases/certs/certlist.go

    			return nil, err
    		}
    	}
    
    	// creationTime should be set only during unit tests, otherwise the kubeadm start time
    	// should be
    	if k.creationTime.IsZero() {
    		k.creationTime = kubeadmutil.StartTimeUTC()
    	}
    
    	// Backdate certificate to allow small time jumps.
    	k.config.NotBefore = k.creationTime.Add(-kubeadmconstants.CertificateBackdate)
    
    	// Use the validity periods defined in the ClusterConfiguration.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/phases/certs/renewal/manager.go

    			return false, err
    		}
    	}
    
    	cfg := &pkiutil.CertConfig{
    		Config:              certConfig,
    		EncryptionAlgorithm: rm.cfg.EncryptionAlgorithmType(),
    	}
    
    	startTime := kubeadmutil.StartTimeUTC()
    
    	// Backdate certificate to allow small time jumps.
    	cfg.NotBefore = startTime.Add(-kubeadmconstants.CertificateBackdate)
    
    	// Use the validity periods defined in the ClusterConfiguration.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go

    	if err != nil {
    		return nil, err
    	}
    	localAPIEndpoint, err := kubeadmutil.GetLocalAPIEndpoint(&cfg.LocalAPIEndpoint)
    	if err != nil {
    		return nil, err
    	}
    
    	startTime := kubeadmutil.StartTimeUTC()
    	notAfter := startTime.Add(kubeadmconstants.CertificateValidityPeriod)
    	if cfg.ClusterConfiguration.CertificateValidityPeriod != nil {
    		notAfter = startTime.Add(cfg.ClusterConfiguration.CertificateValidityPeriod.Duration)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 17:04:18 UTC 2024
    - 27K bytes
    - Viewed (0)
Back to top