Skip to content

Commit fdcd2c4

Browse files
authored
Merge pull request #3127 from chrischdi/pr-bump-capi-1-8-rc-0
🌱 Bump CAPI to v1.8.0-rc.0
2 parents a4a546f + b81542b commit fdcd2c4

File tree

10 files changed

+69
-58
lines changed

10 files changed

+69
-58
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ IMPORT_BOSS_VER := v0.28.1
185185
IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN))
186186
IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss
187187

188-
CAPI_HACK_TOOLS_VER := 176d7705c42f7254521dc3afd6cac0a65fcc4584 # Note: this is the commit ID of CAPI v1.8.0-beta.1
188+
CAPI_HACK_TOOLS_VER := c05c45e8c9096e232acf60ebc31a6d9ef837c318 # Note: this is the commit ID of CAPI v1.8.0-rc.0
189189

190190
BOSKOSCTL_BIN := boskosctl
191191
BOSKOSCTL := $(abspath $(TOOLS_BIN_DIR)/$(BOSKOSCTL_BIN))

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-vsphere
22

33
go 1.22.0
44

5-
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-beta.1
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-rc.0
66

77
replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505
88

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
10091009
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
10101010
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 h1:Tc9rS7JJoZ9sl3OpL4842oIk6lH7gWBb0JOmJ0ute7M=
10111011
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0/go.mod h1:1ewhL9l1gkPcU/IU/6rFYfikf+7Y5imWv7ARVbBOzNs=
1012-
sigs.k8s.io/cluster-api v1.8.0-beta.1 h1:VDEw9hLARr/yxmHbfMtuwpsG0ZEZeay7djl1wllY/B8=
1013-
sigs.k8s.io/cluster-api v1.8.0-beta.1/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0=
1012+
sigs.k8s.io/cluster-api v1.8.0-rc.0 h1:Q103UfK++rI160mtURBjg4ovJ9vxJTIrrdkL7NQBdFQ=
1013+
sigs.k8s.io/cluster-api v1.8.0-rc.0/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0=
10141014
sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8=
10151015
sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw=
10161016
sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=

main.go

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ var (
6565
logOptions = logs.NewOptions()
6666
controllerName = "cluster-api-vsphere-manager"
6767

68-
enableContentionProfiling bool
69-
leaderElectionLeaseDuration time.Duration
70-
leaderElectionRenewDeadline time.Duration
71-
leaderElectionRetryPeriod time.Duration
72-
managerOpts manager.Options
73-
restConfigBurst int
74-
restConfigQPS float32
75-
syncPeriod time.Duration
76-
webhookOpts webhook.Options
77-
watchNamespace string
68+
enableContentionProfiling bool
69+
leaderElectionLeaseDuration time.Duration
70+
leaderElectionRenewDeadline time.Duration
71+
leaderElectionRetryPeriod time.Duration
72+
managerOpts manager.Options
73+
restConfigBurst int
74+
restConfigQPS float32
75+
clusterCacheTrackerClientQPS float32
76+
clusterCacheTrackerClientBurst int
77+
syncPeriod time.Duration
78+
webhookOpts webhook.Options
79+
watchNamespace string
7880

7981
clusterCacheTrackerConcurrency int
8082
vSphereClusterConcurrency int
@@ -85,8 +87,7 @@ var (
8587
vSphereClusterIdentityConcurrency int
8688
vSphereDeploymentZoneConcurrency int
8789

88-
tlsOptions = capiflags.TLSOptions{}
89-
diagnosticsOptions = capiflags.DiagnosticsOptions{}
90+
managerOptions = capiflags.ManagerOptions{}
9091

9192
defaultProfilerAddr = os.Getenv("PROFILER_ADDR")
9293
defaultSyncPeriod = manager.DefaultSyncPeriod
@@ -181,10 +182,16 @@ func InitFlags(fs *pflag.FlagSet) {
181182
"The minimum interval at which watched resources are reconciled (e.g. 15m)")
182183

183184
fs.Float32Var(&restConfigQPS, "kube-api-qps", 20,
184-
"Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20")
185+
"Maximum queries per second from the controller client to the Kubernetes API server.")
185186

186187
fs.IntVar(&restConfigBurst, "kube-api-burst", 30,
187-
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30")
188+
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server.")
189+
190+
fs.Float32Var(&clusterCacheTrackerClientQPS, "clustercachetracker-client-qps", 20,
191+
"Maximum queries per second from the cluster cache tracker clients to the Kubernetes API server of workload clusters.")
192+
193+
fs.IntVar(&clusterCacheTrackerClientBurst, "clustercachetracker-client-burst", 30,
194+
"Maximum number of queries that should be allowed in one burst from the cluster cache tracker clients to the Kubernetes API server of workload clusters.")
188195

189196
fs.IntVar(&webhookOpts.Port, "webhook-port", defaultWebhookPort,
190197
"Webhook Server port")
@@ -196,8 +203,7 @@ func InitFlags(fs *pflag.FlagSet) {
196203
"The address the health endpoint binds to.",
197204
)
198205

199-
capiflags.AddTLSOptions(fs, &tlsOptions)
200-
capiflags.AddDiagnosticsOptions(fs, &diagnosticsOptions)
206+
capiflags.AddManagerOptions(fs, &managerOptions)
201207
feature.MutableGates.AddFlag(fs)
202208
}
203209

@@ -298,15 +304,15 @@ func main() {
298304
return nil
299305
}
300306

301-
tlsOptionOverrides, err := capiflags.GetTLSOptionOverrideFuncs(tlsOptions)
307+
tlsOptions, metricsOptions, err := capiflags.GetManagerOptions(managerOptions)
302308
if err != nil {
303-
setupLog.Error(err, "unable to add TLS settings to the webhook server")
309+
setupLog.Error(err, "Unable to start manager: invalid flags")
304310
os.Exit(1)
305311
}
306-
webhookOpts.TLSOpts = tlsOptionOverrides
312+
webhookOpts.TLSOpts = tlsOptions
307313
managerOpts.WebhookServer = webhook.NewServer(webhookOpts)
308314
managerOpts.AddToManager = addToManager
309-
managerOpts.Metrics = capiflags.GetDiagnosticsOptions(diagnosticsOptions)
315+
managerOpts.Metrics = *metricsOptions
310316

311317
// Set up the context that's going to be used in controllers and for the manager.
312318
ctx := ctrl.SetupSignalHandler()
@@ -446,6 +452,8 @@ func setupRemoteClusterCacheTracker(ctx context.Context, mgr ctrlmgr.Manager) (*
446452
SecretCachingClient: secretCachingClient,
447453
ControllerName: controllerName,
448454
Log: &ctrl.Log,
455+
ClientQPS: clusterCacheTrackerClientQPS,
456+
ClientBurst: clusterCacheTrackerClientBurst,
449457
},
450458
)
451459
if err != nil {

test/e2e/config/vsphere.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ providers:
2727
type: CoreProvider
2828
versions:
2929
- name: "v1.8.0" # supported release in the v1beta1 series
30-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/core-components.yaml"
30+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/core-components.yaml"
3131
type: "url"
3232
contract: v1beta1
3333
files:
@@ -67,7 +67,7 @@ providers:
6767
type: BootstrapProvider
6868
versions:
6969
- name: "v1.8.0" # supported release in the v1beta1 series
70-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/bootstrap-components.yaml"
70+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/bootstrap-components.yaml"
7171
type: "url"
7272
contract: v1beta1
7373
files:
@@ -107,7 +107,7 @@ providers:
107107
type: ControlPlaneProvider
108108
versions:
109109
- name: "v1.8.0" # supported release in the v1beta1 series
110-
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/control-plane-components.yaml"
110+
value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/control-plane-components.yaml"
111111
type: "url"
112112
contract: v1beta1
113113
files:

test/extension/main.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ var (
8686
webhookCertName string
8787
webhookKeyName string
8888
healthAddr string
89-
tlsOptions = flags.TLSOptions{}
90-
diagnosticsOptions = flags.DiagnosticsOptions{}
89+
managerOptions = flags.ManagerOptions{}
9190
logOptions = logs.NewOptions()
9291
)
9392

@@ -136,10 +135,10 @@ func InitFlags(fs *pflag.FlagSet) {
136135
"The minimum interval at which watched resources are reconciled (e.g. 15m)")
137136

138137
fs.Float32Var(&restConfigQPS, "kube-api-qps", 20,
139-
"Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20")
138+
"Maximum queries per second from the controller client to the Kubernetes API server.")
140139

141140
fs.IntVar(&restConfigBurst, "kube-api-burst", 30,
142-
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30")
141+
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server.")
143142

144143
fs.IntVar(&webhookPort, "webhook-port", 9443,
145144
"Webhook Server port")
@@ -156,8 +155,7 @@ func InitFlags(fs *pflag.FlagSet) {
156155
fs.StringVar(&healthAddr, "health-addr", ":9440",
157156
"The address the health endpoint binds to.")
158157

159-
flags.AddDiagnosticsOptions(fs, &diagnosticsOptions)
160-
flags.AddTLSOptions(fs, &tlsOptions)
158+
flags.AddManagerOptions(fs, &managerOptions)
161159

162160
// Add test-extension specific flags
163161
// NOTE: it is not mandatory to use the same flag names in all RuntimeExtension, but it is recommended when
@@ -200,14 +198,12 @@ func main() {
200198
restConfig.Burst = restConfigBurst
201199
restConfig.UserAgent = remote.DefaultClusterAPIUserAgent(controllerName)
202200

203-
tlsOptionOverrides, err := flags.GetTLSOptionOverrideFuncs(tlsOptions)
201+
tlsOptions, metricsOptions, err := flags.GetManagerOptions(managerOptions)
204202
if err != nil {
205-
setupLog.Error(err, "Unable to add TLS settings to the webhook server")
203+
setupLog.Error(err, "Unable to start manager: invalid flags")
206204
os.Exit(1)
207205
}
208206

209-
diagnosticsOpts := flags.GetDiagnosticsOptions(diagnosticsOptions)
210-
211207
if enableContentionProfiling {
212208
goruntime.SetBlockProfileRate(1)
213209
}
@@ -218,7 +214,7 @@ func main() {
218214
CertDir: webhookCertDir,
219215
CertName: webhookCertName,
220216
KeyName: webhookKeyName,
221-
TLSOpts: tlsOptionOverrides,
217+
TLSOpts: tlsOptions,
222218
Catalog: catalog,
223219
})
224220
if err != nil {
@@ -236,7 +232,7 @@ func main() {
236232
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
237233
HealthProbeBindAddress: healthAddr,
238234
PprofBindAddress: profilerAddress,
239-
Metrics: diagnosticsOpts,
235+
Metrics: *metricsOptions,
240236
Cache: cache.Options{
241237
SyncPeriod: &syncPeriod,
242238
},

test/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ module sigs.k8s.io/cluster-api-provider-vsphere/test
22

33
go 1.22.0
44

5-
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-beta.1
5+
replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-rc.0
66

7-
replace sigs.k8s.io/cluster-api/test => sigs.k8s.io/cluster-api/test v1.8.0-beta.1
7+
replace sigs.k8s.io/cluster-api/test => sigs.k8s.io/cluster-api/test v1.8.0-rc.0
88

99
replace sigs.k8s.io/cluster-api-provider-vsphere => ../
1010

test/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,10 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
10901090
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg=
10911091
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 h1:Tc9rS7JJoZ9sl3OpL4842oIk6lH7gWBb0JOmJ0ute7M=
10921092
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0/go.mod h1:1ewhL9l1gkPcU/IU/6rFYfikf+7Y5imWv7ARVbBOzNs=
1093-
sigs.k8s.io/cluster-api v1.8.0-beta.1 h1:VDEw9hLARr/yxmHbfMtuwpsG0ZEZeay7djl1wllY/B8=
1094-
sigs.k8s.io/cluster-api v1.8.0-beta.1/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0=
1095-
sigs.k8s.io/cluster-api/test v1.8.0-beta.1 h1:04m4hvYiEqxUcQxA6CpM7E05MOjuyb8ZD8A1evALhJw=
1096-
sigs.k8s.io/cluster-api/test v1.8.0-beta.1/go.mod h1:dwVWpEtSXNUTYb+rSQ/KNNv4lVadx26teQB9CS+yaXM=
1093+
sigs.k8s.io/cluster-api v1.8.0-rc.0 h1:Q103UfK++rI160mtURBjg4ovJ9vxJTIrrdkL7NQBdFQ=
1094+
sigs.k8s.io/cluster-api v1.8.0-rc.0/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0=
1095+
sigs.k8s.io/cluster-api/test v1.8.0-rc.0 h1:JNAxc+8QE4Vk51NFgtex6Yh4KlTJfVOjOH6ybiO3HTI=
1096+
sigs.k8s.io/cluster-api/test v1.8.0-rc.0/go.mod h1:dwVWpEtSXNUTYb+rSQ/KNNv4lVadx26teQB9CS+yaXM=
10971097
sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8=
10981098
sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw=
10991099
sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=

test/infrastructure/net-operator/main.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var (
7171
restConfigQPS float32
7272
restConfigBurst int
7373
healthAddr string
74-
diagnosticsOptions = flags.DiagnosticsOptions{}
74+
managerOptions = flags.ManagerOptions{}
7575
logOptions = logs.NewOptions()
7676
// net operator specific flags.
7777
networkInterfaceConcurrency int
@@ -118,15 +118,15 @@ func InitFlags(fs *pflag.FlagSet) {
118118
"The minimum interval at which watched resources are reconciled (e.g. 15m)")
119119

120120
fs.Float32Var(&restConfigQPS, "kube-api-qps", 20,
121-
"Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20")
121+
"Maximum queries per second from the controller client to the Kubernetes API server.")
122122

123123
fs.IntVar(&restConfigBurst, "kube-api-burst", 30,
124-
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30")
124+
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server.")
125125

126126
fs.StringVar(&healthAddr, "health-addr", ":9440",
127127
"The address the health endpoint binds to.")
128128

129-
flags.AddDiagnosticsOptions(fs, &diagnosticsOptions)
129+
flags.AddManagerOptions(fs, &managerOptions)
130130

131131
feature.MutableGates.AddFlag(fs)
132132
}
@@ -159,7 +159,11 @@ func main() {
159159
restConfig.Burst = restConfigBurst
160160
restConfig.UserAgent = remote.DefaultClusterAPIUserAgent(controllerName)
161161

162-
diagnosticsOpts := flags.GetDiagnosticsOptions(diagnosticsOptions)
162+
_, metricsOptions, err := flags.GetManagerOptions(managerOptions)
163+
if err != nil {
164+
setupLog.Error(err, "Unable to start manager: invalid flags")
165+
os.Exit(1)
166+
}
163167

164168
var watchNamespaces map[string]cache.Config
165169
if watchNamespace != "" {
@@ -182,7 +186,7 @@ func main() {
182186
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
183187
HealthProbeBindAddress: healthAddr,
184188
PprofBindAddress: profilerAddress,
185-
Metrics: diagnosticsOpts,
189+
Metrics: *metricsOptions,
186190
Cache: cache.Options{
187191
DefaultNamespaces: watchNamespaces,
188192
SyncPeriod: &syncPeriod,

test/infrastructure/vcsim/main.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var (
8080
restConfigQPS float32
8181
restConfigBurst int
8282
healthAddr string
83-
diagnosticsOptions = flags.DiagnosticsOptions{}
83+
managerOptions = flags.ManagerOptions{}
8484
logOptions = logs.NewOptions()
8585
// vcsim specific flags.
8686
vSphereVMConcurrency int
@@ -159,15 +159,15 @@ func InitFlags(fs *pflag.FlagSet) {
159159
"The minimum interval at which watched resources are reconciled (e.g. 15m)")
160160

161161
fs.Float32Var(&restConfigQPS, "kube-api-qps", 20,
162-
"Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20")
162+
"Maximum queries per second from the controller client to the Kubernetes API server.")
163163

164164
fs.IntVar(&restConfigBurst, "kube-api-burst", 30,
165-
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30")
165+
"Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server.")
166166

167167
fs.StringVar(&healthAddr, "health-addr", ":9440",
168168
"The address the health endpoint binds to.")
169169

170-
flags.AddDiagnosticsOptions(fs, &diagnosticsOptions)
170+
flags.AddManagerOptions(fs, &managerOptions)
171171

172172
feature.MutableGates.AddFlag(fs)
173173
}
@@ -200,8 +200,11 @@ func main() {
200200
restConfig.Burst = restConfigBurst
201201
restConfig.UserAgent = remote.DefaultClusterAPIUserAgent(controllerName)
202202

203-
diagnosticsOpts := flags.GetDiagnosticsOptions(diagnosticsOptions)
204-
203+
_, metricsOptions, err := flags.GetManagerOptions(managerOptions)
204+
if err != nil {
205+
setupLog.Error(err, "Unable to start manager: invalid flags")
206+
os.Exit(1)
207+
}
205208
var watchNamespaces map[string]cache.Config
206209
if watchNamespace != "" {
207210
watchNamespaces = map[string]cache.Config{
@@ -223,7 +226,7 @@ func main() {
223226
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
224227
HealthProbeBindAddress: healthAddr,
225228
PprofBindAddress: profilerAddress,
226-
Metrics: diagnosticsOpts,
229+
Metrics: *metricsOptions,
227230
Cache: cache.Options{
228231
DefaultNamespaces: watchNamespaces,
229232
SyncPeriod: &syncPeriod,

0 commit comments

Comments
 (0)