@@ -29,6 +29,10 @@ type CvoGateChecker interface {
29
29
// StatusReleaseArchitecture controls whether CVO populates
30
30
// Release.Architecture in status properties like status.desired and status.history[].
31
31
StatusReleaseArchitecture () bool
32
+
33
+ // CVOConfiguration controls whether the CVO reconciles the ClusterVersionOperator resource that corresponds
34
+ // to its configuration.
35
+ CVOConfiguration () bool
32
36
}
33
37
34
38
type panicOnUsageBeforeInitializationFunc func ()
@@ -56,6 +60,11 @@ func (p panicOnUsageBeforeInitializationFunc) UnknownVersion() bool {
56
60
return false
57
61
}
58
62
63
+ func (p panicOnUsageBeforeInitializationFunc ) CVOConfiguration () bool {
64
+ p ()
65
+ return false
66
+ }
67
+
59
68
// CvoGates contains flags that control CVO functionality gated by product feature gates. The
60
69
// names do not correspond to product feature gates, the booleans here are "smaller" (product-level
61
70
// gate will enable multiple CVO behaviors).
@@ -68,6 +77,7 @@ type CvoGates struct {
68
77
unknownVersion bool
69
78
reconciliationIssuesCondition bool
70
79
statusReleaseArchitecture bool
80
+ cvoConfiguration bool
71
81
}
72
82
73
83
func (c CvoGates ) ReconciliationIssuesCondition () bool {
@@ -82,13 +92,18 @@ func (c CvoGates) UnknownVersion() bool {
82
92
return c .unknownVersion
83
93
}
84
94
95
+ func (c CvoGates ) CVOConfiguration () bool {
96
+ return c .cvoConfiguration
97
+ }
98
+
85
99
// DefaultCvoGates apply when actual features for given version are unknown
86
100
func DefaultCvoGates (version string ) CvoGates {
87
101
return CvoGates {
88
102
desiredVersion : version ,
89
103
unknownVersion : true ,
90
104
reconciliationIssuesCondition : false ,
91
105
statusReleaseArchitecture : false ,
106
+ cvoConfiguration : false ,
92
107
}
93
108
}
94
109
@@ -110,6 +125,8 @@ func CvoGatesFromFeatureGate(gate *configv1.FeatureGate, version string) CvoGate
110
125
enabledGates .reconciliationIssuesCondition = true
111
126
case features .FeatureGateImageStreamImportMode :
112
127
enabledGates .statusReleaseArchitecture = true
128
+ case features .FeatureGateCVOConfiguration :
129
+ enabledGates .cvoConfiguration = true
113
130
}
114
131
}
115
132
for _ , disabled := range g .Disabled {
@@ -118,6 +135,8 @@ func CvoGatesFromFeatureGate(gate *configv1.FeatureGate, version string) CvoGate
118
135
enabledGates .reconciliationIssuesCondition = false
119
136
case features .FeatureGateImageStreamImportMode :
120
137
enabledGates .statusReleaseArchitecture = false
138
+ case features .FeatureGateCVOConfiguration :
139
+ enabledGates .cvoConfiguration = false
121
140
}
122
141
}
123
142
}
0 commit comments