9
9
)
10
10
11
11
// FeatureGateDescription is a golang-only interface used to contains details for a feature gate.
12
+ //
13
+ //nolint:all
12
14
type FeatureGateDescription struct {
13
15
// FeatureGateAttributes is the information that appears in the API
14
16
FeatureGateAttributes configv1.FeatureGateAttributes
@@ -23,9 +25,6 @@ type FeatureGateDescription struct {
23
25
OwningProduct OwningProduct
24
26
// EnhancementPR is the PR for the enhancement.
25
27
EnhancementPR string
26
- // RequiredMinimumKubeletVersion is the lowest version the MinimumKubeletVersion field in the
27
- // nodes.config object may be set to to enable this feature.
28
- RequiredMinimumKubeletVersion string
29
28
}
30
29
31
30
type FeatureGateEnabledDisabled struct {
48
47
kubernetes = OwningProduct ("Kubernetes" )
49
48
)
50
49
50
+ //nolint:all
51
51
type featureGateBuilder struct {
52
52
name string
53
53
owningJiraComponent string
@@ -151,10 +151,20 @@ func (b *featureGateBuilder) register() (configv1.FeatureGateName, error) {
151
151
}
152
152
153
153
featureGateName := configv1 .FeatureGateName (b .name )
154
+ var minComponentVersions []configv1.RequiredMinimumComponentVersion
155
+ if b .minimumKubeletVersion != "" {
156
+ if minComponentVersions == nil {
157
+ minComponentVersions = []configv1.RequiredMinimumComponentVersion {}
158
+ }
159
+ minComponentVersions = append (minComponentVersions , configv1.RequiredMinimumComponentVersion {
160
+ Component : configv1 .RequiredMinimumComponentKubelet ,
161
+ Version : b .minimumKubeletVersion ,
162
+ })
163
+ }
154
164
description := FeatureGateDescription {
155
165
FeatureGateAttributes : configv1.FeatureGateAttributes {
156
- Name : featureGateName ,
157
- RequiredMinimumKubeletVersion : b . minimumKubeletVersion ,
166
+ Name : featureGateName ,
167
+ RequiredMinimumComponentVersions : minComponentVersions ,
158
168
},
159
169
OwningJiraComponent : b .owningJiraComponent ,
160
170
ResponsiblePerson : b .responsiblePerson ,
0 commit comments