Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Aug 8, 2024
1 parent 5c59a6f commit 18d0325
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions pkg/controller/servingcert/starter/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ func StartServiceServingCertSigner(ctx context.Context, controllerContext *contr
configInformers.Config().V1().ClusterVersions(), configInformers.Config().V1().FeatureGates(),
controllerContext.EventRecorder,
)
featureGates, err := featureGateAccessor.CurrentFeatureGates()
if err != nil {
return fmt.Errorf("unable to get FeatureGates: %w", err)
var featureGates featuregates.FeatureGate
select {
case <-featureGateAccessor.InitialFeatureGatesObserved():
featureGates, _ = featureGateAccessor.CurrentFeatureGates()
klog.Infof("FeatureGates initialized: knownFeatureGates=%v", featureGates.KnownFeatures())
case <-time.After(1 * time.Minute):
klog.Errorf("timed out waiting for FeatureGate detection")
return fmt.Errorf("timed out waiting for FeatureGate detection")
}

minTimeLeftForCert := time.Hour
Expand Down
11 changes: 8 additions & 3 deletions pkg/operator/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,14 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
configInformers.Config().V1().ClusterVersions(), configInformers.Config().V1().FeatureGates(),
controllerContext.EventRecorder,
)
featureGates, err := featureGateAccessor.CurrentFeatureGates()
if err != nil {
return fmt.Errorf("unable to get FeatureGates: %w", err)
var featureGates featuregates.FeatureGate
select {
case <-featureGateAccessor.InitialFeatureGatesObserved():
featureGates, _ = featureGateAccessor.CurrentFeatureGates()
klog.Infof("FeatureGates initialized: knownFeatureGates=%v", featureGates.KnownFeatures())
case <-time.After(1 * time.Minute):
klog.Errorf("timed out waiting for FeatureGate detection")
return fmt.Errorf("timed out waiting for FeatureGate detection")
}

minimumTrustDuration := 395 * 24 * time.Hour
Expand Down

0 comments on commit 18d0325

Please sign in to comment.