File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -65,3 +65,11 @@ func FeatureGates() map[string]bool {
65
65
func Enabled (feature string ) (bool , error ) {
66
66
return feathelper .Enabled (feature )
67
67
}
68
+
69
+ // Disable disables the specified feature. If the feature is not
70
+ // present, it's a no-op
71
+ func Disable (feature string ) {
72
+ if _ , ok := features [feature ]; ok {
73
+ features [feature ] = false
74
+ }
75
+ }
Original file line number Diff line number Diff line change @@ -314,11 +314,10 @@ func main() {
314
314
managed .InitManagedTransport (ctrl .Log .WithName ("managed-transport" ))
315
315
} else {
316
316
if optimize , _ := feathelper .Enabled (features .OptimizedGitClones ); optimize {
317
- setupLog . Error (
318
- fmt . Errorf ( "OptimizedGitClones=true but GitManagedTransport=false" ),
319
- "git clones can only be optimized when using managed transort" ,
317
+ features . Disable ( features . OptimizedGitClones )
318
+ setupLog . Info (
319
+ "disabling optimzied git clones; git clones can only be optimized when using managed transort" ,
320
320
)
321
- os .Exit (1 )
322
321
}
323
322
}
324
323
You can’t perform that action at this time.
0 commit comments