From 749ab74d008a1a80101962ad60e2142061d048a2 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Tue, 30 Jul 2024 18:26:03 +0200 Subject: [PATCH] Bump CAPI to v1.8.0-rc.0 --- Makefile | 2 +- go.mod | 2 +- go.sum | 4 ++-- main.go | 14 ++++++-------- test/e2e/config/vsphere.yaml | 6 +++--- test/extension/main.go | 16 ++++++---------- test/go.mod | 4 ++-- test/go.sum | 8 ++++---- 8 files changed, 25 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index b5f4952359..90b162c979 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,7 @@ IMPORT_BOSS_VER := v0.28.1 IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN)) IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss -CAPI_HACK_TOOLS_VER := 176d7705c42f7254521dc3afd6cac0a65fcc4584 # Note: this is the commit ID of CAPI v1.8.0-beta.1 +CAPI_HACK_TOOLS_VER := c05c45e8c9096e232acf60ebc31a6d9ef837c318 # Note: this is the commit ID of CAPI v1.8.0-rc.0 BOSKOSCTL_BIN := boskosctl BOSKOSCTL := $(abspath $(TOOLS_BIN_DIR)/$(BOSKOSCTL_BIN)) diff --git a/go.mod b/go.mod index a4027c4301..6dd0e6b394 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module sigs.k8s.io/cluster-api-provider-vsphere go 1.22.0 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-beta.1 +replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-rc.0 replace github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels => github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels v0.0.0-20240404200847-de75746a9505 diff --git a/go.sum b/go.sum index 5f55e49272..da4a7c7755 100644 --- a/go.sum +++ b/go.sum @@ -1009,8 +1009,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 h1:Tc9rS7JJoZ9sl3OpL4842oIk6lH7gWBb0JOmJ0ute7M= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0/go.mod h1:1ewhL9l1gkPcU/IU/6rFYfikf+7Y5imWv7ARVbBOzNs= -sigs.k8s.io/cluster-api v1.8.0-beta.1 h1:VDEw9hLARr/yxmHbfMtuwpsG0ZEZeay7djl1wllY/B8= -sigs.k8s.io/cluster-api v1.8.0-beta.1/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0= +sigs.k8s.io/cluster-api v1.8.0-rc.0 h1:Q103UfK++rI160mtURBjg4ovJ9vxJTIrrdkL7NQBdFQ= +sigs.k8s.io/cluster-api v1.8.0-rc.0/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0= sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8= sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= diff --git a/main.go b/main.go index 8631c549b9..c96a445036 100644 --- a/main.go +++ b/main.go @@ -85,8 +85,7 @@ var ( vSphereClusterIdentityConcurrency int vSphereDeploymentZoneConcurrency int - tlsOptions = capiflags.TLSOptions{} - diagnosticsOptions = capiflags.DiagnosticsOptions{} + managerOptions = capiflags.ManagerOptions{} defaultProfilerAddr = os.Getenv("PROFILER_ADDR") defaultSyncPeriod = manager.DefaultSyncPeriod @@ -196,8 +195,7 @@ func InitFlags(fs *pflag.FlagSet) { "The address the health endpoint binds to.", ) - capiflags.AddTLSOptions(fs, &tlsOptions) - capiflags.AddDiagnosticsOptions(fs, &diagnosticsOptions) + capiflags.AddManagerOptions(fs, &managerOptions) feature.MutableGates.AddFlag(fs) } @@ -298,15 +296,15 @@ func main() { return nil } - tlsOptionOverrides, err := capiflags.GetTLSOptionOverrideFuncs(tlsOptions) + tlsOptions, metricsOptions, err := capiflags.GetManagerOptions(managerOptions) if err != nil { - setupLog.Error(err, "unable to add TLS settings to the webhook server") + setupLog.Error(err, "Unable to start manager: invalid flags") os.Exit(1) } - webhookOpts.TLSOpts = tlsOptionOverrides + webhookOpts.TLSOpts = tlsOptions managerOpts.WebhookServer = webhook.NewServer(webhookOpts) managerOpts.AddToManager = addToManager - managerOpts.Metrics = capiflags.GetDiagnosticsOptions(diagnosticsOptions) + managerOpts.Metrics = *metricsOptions // Set up the context that's going to be used in controllers and for the manager. ctx := ctrl.SetupSignalHandler() diff --git a/test/e2e/config/vsphere.yaml b/test/e2e/config/vsphere.yaml index b818e492b1..ea84e9f0b7 100644 --- a/test/e2e/config/vsphere.yaml +++ b/test/e2e/config/vsphere.yaml @@ -27,7 +27,7 @@ providers: type: CoreProvider versions: - name: "v1.8.0" # supported release in the v1beta1 series - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/core-components.yaml" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/core-components.yaml" type: "url" contract: v1beta1 files: @@ -67,7 +67,7 @@ providers: type: BootstrapProvider versions: - name: "v1.8.0" # supported release in the v1beta1 series - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/bootstrap-components.yaml" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/bootstrap-components.yaml" type: "url" contract: v1beta1 files: @@ -107,7 +107,7 @@ providers: type: ControlPlaneProvider versions: - name: "v1.8.0" # supported release in the v1beta1 series - value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-beta.1/control-plane-components.yaml" + value: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.8.0-rc.0/control-plane-components.yaml" type: "url" contract: v1beta1 files: diff --git a/test/extension/main.go b/test/extension/main.go index 172bd86471..605e2c6014 100644 --- a/test/extension/main.go +++ b/test/extension/main.go @@ -86,8 +86,7 @@ var ( webhookCertName string webhookKeyName string healthAddr string - tlsOptions = flags.TLSOptions{} - diagnosticsOptions = flags.DiagnosticsOptions{} + managerOptions = flags.ManagerOptions{} logOptions = logs.NewOptions() ) @@ -156,8 +155,7 @@ func InitFlags(fs *pflag.FlagSet) { fs.StringVar(&healthAddr, "health-addr", ":9440", "The address the health endpoint binds to.") - flags.AddDiagnosticsOptions(fs, &diagnosticsOptions) - flags.AddTLSOptions(fs, &tlsOptions) + flags.AddManagerOptions(fs, &managerOptions) // Add test-extension specific flags // 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() { restConfig.Burst = restConfigBurst restConfig.UserAgent = remote.DefaultClusterAPIUserAgent(controllerName) - tlsOptionOverrides, err := flags.GetTLSOptionOverrideFuncs(tlsOptions) + tlsOptions, metricsOptions, err := flags.GetManagerOptions(managerOptions) if err != nil { - setupLog.Error(err, "Unable to add TLS settings to the webhook server") + setupLog.Error(err, "Unable to start manager: invalid flags") os.Exit(1) } - diagnosticsOpts := flags.GetDiagnosticsOptions(diagnosticsOptions) - if enableContentionProfiling { goruntime.SetBlockProfileRate(1) } @@ -218,7 +214,7 @@ func main() { CertDir: webhookCertDir, CertName: webhookCertName, KeyName: webhookKeyName, - TLSOpts: tlsOptionOverrides, + TLSOpts: tlsOptions, Catalog: catalog, }) if err != nil { @@ -236,7 +232,7 @@ func main() { LeaderElectionResourceLock: resourcelock.LeasesResourceLock, HealthProbeBindAddress: healthAddr, PprofBindAddress: profilerAddress, - Metrics: diagnosticsOpts, + Metrics: *metricsOptions, Cache: cache.Options{ SyncPeriod: &syncPeriod, }, diff --git a/test/go.mod b/test/go.mod index dc94027c79..0bd2b28981 100644 --- a/test/go.mod +++ b/test/go.mod @@ -2,9 +2,9 @@ module sigs.k8s.io/cluster-api-provider-vsphere/test go 1.22.0 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-beta.1 +replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.8.0-rc.0 -replace sigs.k8s.io/cluster-api/test => sigs.k8s.io/cluster-api/test v1.8.0-beta.1 +replace sigs.k8s.io/cluster-api/test => sigs.k8s.io/cluster-api/test v1.8.0-rc.0 replace sigs.k8s.io/cluster-api-provider-vsphere => ../ diff --git a/test/go.sum b/test/go.sum index 766e5275d8..dde3080c68 100644 --- a/test/go.sum +++ b/test/go.sum @@ -1090,10 +1090,10 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 h1:Tc9rS7JJoZ9sl3OpL4842oIk6lH7gWBb0JOmJ0ute7M= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0/go.mod h1:1ewhL9l1gkPcU/IU/6rFYfikf+7Y5imWv7ARVbBOzNs= -sigs.k8s.io/cluster-api v1.8.0-beta.1 h1:VDEw9hLARr/yxmHbfMtuwpsG0ZEZeay7djl1wllY/B8= -sigs.k8s.io/cluster-api v1.8.0-beta.1/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0= -sigs.k8s.io/cluster-api/test v1.8.0-beta.1 h1:04m4hvYiEqxUcQxA6CpM7E05MOjuyb8ZD8A1evALhJw= -sigs.k8s.io/cluster-api/test v1.8.0-beta.1/go.mod h1:dwVWpEtSXNUTYb+rSQ/KNNv4lVadx26teQB9CS+yaXM= +sigs.k8s.io/cluster-api v1.8.0-rc.0 h1:Q103UfK++rI160mtURBjg4ovJ9vxJTIrrdkL7NQBdFQ= +sigs.k8s.io/cluster-api v1.8.0-rc.0/go.mod h1:TNkfly2mrCG8O6DjGFru0USq1NhWbo2njpSXxKrRgL0= +sigs.k8s.io/cluster-api/test v1.8.0-rc.0 h1:JNAxc+8QE4Vk51NFgtex6Yh4KlTJfVOjOH6ybiO3HTI= +sigs.k8s.io/cluster-api/test v1.8.0-rc.0/go.mod h1:dwVWpEtSXNUTYb+rSQ/KNNv4lVadx26teQB9CS+yaXM= sigs.k8s.io/controller-runtime v0.9.0/go.mod h1:TgkfvrhhEw3PlI0BRL/5xM+89y3/yc0ZDfdbTl84si8= sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=