File tree Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Expand file tree Collapse file tree 4 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,15 @@ ifndef FEATURE_DNS
96
96
FEATURE_DNS =true
97
97
endif
98
98
endif
99
+
100
+ ifndef FEATURE_MANAGEMENT_API
101
+ ifeq ($(shell shuf -i 0-1 -n 1), 0)
102
+ FEATURE_MANAGEMENT_API =false
103
+ else
104
+ FEATURE_MANAGEMENT_API =true
105
+ endif
106
+ endif
107
+
99
108
# Make bash pickier about errors.
100
109
SHELL =/bin/bash -euo pipefail
101
110
@@ -210,6 +219,7 @@ foundationdb-nightly-tests: run
210
219
--feature-synchronization-mode=$(FEATURE_SYNCHRONIZATION_MODE ) \
211
220
--feature-dns=$(FEATURE_DNS ) \
212
221
--feature-localities=$(FEATURE_LOCALITIES ) \
222
+ --feature-management-api=$(FEATURE_MANAGEMENT_API ) \
213
223
--node-selector=" $( NODE_SELECTOR) " \
214
224
--default-unavailable-threshold=$(DEFAULT_UNAVAILABLE_THRESHOLD ) \
215
225
--seaweedfs-image=$(SEAWEEDFS_IMAGE ) \
Original file line number Diff line number Diff line change @@ -83,6 +83,8 @@ type ClusterConfig struct {
83
83
UseDNS * bool
84
84
// If enabled the cluster will be setup with the unified image.
85
85
UseUnifiedImage * bool
86
+ // ManagementAPI if set to true, the operator will make use of the management API.
87
+ ManagementAPI * bool
86
88
// SimulateCustomFaultDomainEnv will simulate the use case that a user has set a custom environment variable to
87
89
// be used as zone ID.
88
90
SimulateCustomFaultDomainEnv bool
@@ -225,6 +227,10 @@ func (config *ClusterConfig) SetDefaults(factory *Factory) {
225
227
if config .Version == nil {
226
228
config .Version = ptr .To (factory .GetFDBVersion ().String ())
227
229
}
230
+
231
+ if config .ManagementAPI == nil {
232
+ config .ManagementAPI = ptr .To (factory .options .featureManagementAPI )
233
+ }
228
234
}
229
235
230
236
// getVolumeSize returns the volume size in as a string. If no volume size is defined a default will be set based on
@@ -632,5 +638,6 @@ func (config *ClusterConfig) Copy() *ClusterConfig {
632
638
SynchronizationMode : config .SynchronizationMode ,
633
639
EnableTLS : config .EnableTLS ,
634
640
Version : config .Version ,
641
+ ManagementAPI : config .ManagementAPI ,
635
642
}
636
643
}
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ func (factory *Factory) createFDBClusterSpec(
106
106
},
107
107
UseLocalitiesForExclusion : config .UseLocalityBasedExclusions ,
108
108
SynchronizationMode : ptr .To (string (config .SynchronizationMode )),
109
+ UseManagementAPI : config .ManagementAPI ,
109
110
},
110
111
Routing : fdbv1beta2.RoutingConfig {
111
112
UseDNSInClusterFile : config .UseDNS ,
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ type FactoryOptions struct {
59
59
featureOperatorLocalities bool
60
60
featureOperatorUnifiedImage bool
61
61
featureOperatorServerSideApply bool
62
+ featureManagementAPI bool
62
63
dumpOperatorState bool
63
64
defaultUnavailableThreshold time.Duration
64
65
}
@@ -204,6 +205,12 @@ func (options *FactoryOptions) BindFlags(fs *flag.FlagSet) {
204
205
false ,
205
206
"defines if the operator should make use of server side apply." ,
206
207
)
208
+ fs .BoolVar (
209
+ & options .featureManagementAPI ,
210
+ "feature-management-api" ,
211
+ false ,
212
+ "defines if the operator should make use of the management API" ,
213
+ )
207
214
fs .StringVar (
208
215
& options .clusterName ,
209
216
"cluster-name" ,
You can’t perform that action at this time.
0 commit comments