Skip to content

Commit 3efdec4

Browse files
sbueringercahillsf
authored andcommitted
Improve Kubernetes bump issue template
Signed-off-by: Stefan Büringer [email protected]
1 parent 236271c commit 3efdec4

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

.github/ISSUE_TEMPLATE/kubernetes_bump.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ changes should be cherry-picked to all release series that will support the new
2121

2222
* [ ] Continuously modify CAPD to use early versions of the upcoming Kubernetes release (betas and rcs):
2323
* Bump the Kubernetes version in `test/*` except for `test/infrastructure/kind/*`.
24-
* Prior art: #10384
24+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10922
2525
* [ ] Modify CAPD to use the new Kubernetes release after it is GA:
2626
* Bump the Kubernetes version in `test/*` except for `test/infrastructure/kind/*`.
27-
* Prior art: #10454
27+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/11030
2828
* [ ] Ensure the jobs are adjusted to provide test coverage according to our [support policy](https://cluster-api.sigs.k8s.io/reference/versions.html#supported-kubernetes-versions):
2929

3030
* At the `.versions` section in the `cluster-api-prowjob-gen.yaml` file in [test-infra](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/cluster-api/):
@@ -45,11 +45,11 @@ changes should be cherry-picked to all release series that will support the new
4545
TEST_INFRA_DIR=../../k8s.io/test-infra make generate-test-infra-prowjobs
4646
```
4747

48-
* Prior art: #32456
48+
* Prior art: https://github.com/kubernetes/test-infra/pull/33294
4949

5050
* [ ] Update book:
5151
* Update supported versions in `versions.md`
52-
* Prior art: #10454
52+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/11030
5353

5454
* [ ] Issues specific to the Kubernetes minor release:
5555
* Sometimes there are adjustments that we have to make in Cluster API to be able to support
@@ -72,7 +72,7 @@ Prerequisites:
7272
* Set new default image for the [test framework](https://github.com/kubernetes-sigs/cluster-api/blob/0f47a19e038ee6b0d3b1e7675a62cdaf84face8c/test/framework/bootstrap/kind_provider.go#L40)
7373
* If code changes are required for CAPD to incorporate the new Kind version, update [kind latestMode](https://github.com/kubernetes-sigs/cluster-api/blob/0f47a19e038ee6b0d3b1e7675a62cdaf84face8c/test/infrastructure/kind/mapper.go#L66)
7474
* Verify the quickstart manually
75-
* Prior art: #10610
75+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10610
7676
* [ ] Cherry-pick above PR to the latest release branch.
7777

7878
### Using new Kubernetes dependencies
@@ -83,21 +83,20 @@ need them in older releases as they are not necessary to manage workload cluster
8383
run the Cluster API controllers on the new Kubernetes version.
8484
8585
* [ ] Ensure there is a new controller-runtime minor release which uses the new Kubernetes Go dependencies.
86-
* [ ] Update our Prow jobs for the `main` branch to use the correct `kubekins-e2e` image via the configuration file and by running `make generate-test-infra-prowjobs`.
86+
* [ ] Update our ProwJobs for the `main` branch to use the `kubekins-e2e` with the correct Kubernetes version via [cluster-api-prowjob-gen.yaml](https://github.com/kubernetes/test-infra/blob/master/config/jobs/kubernetes-sigs/cluster-api/cluster-api-prowjob-gen.yaml) and by running `make generate-test-infra-prowjobs`.
8787
* It is recommended to have one PR for presubmit and one for periodic jobs to reduce the risk of breaking the periodic jobs.
8888
* Prior art: https://github.com/kubernetes/test-infra/pull/32380
8989
* [ ] Bump the Go version in Cluster API: (if Kubernetes is using a new Go minor version)
9090
* Search for the currently used Go version across the repository and update it
9191
* We have to at least modify it in: `hack/ensure-go.sh`, `.golangci.yml`, `cloudbuild*.yaml`, `go.mod`, `Makefile`, `netlify.toml`, `Tiltfile`
92-
* Prior art: #10452
93-
* [ ] Bump controller-runtime
94-
* [ ] Bump controller-tools
92+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10452
93+
* [ ] Bumps in Cluster API repo:
94+
* controller-runtime & controller-tools in go.mod files
95+
* controller-gen via `CONTROLLER_GEN_VER` in `Makefile`
96+
* conversion-gen via `CONVERSION_GEN_VER` in `Makefile`
97+
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10803
9598
* [ ] Bump the Kubernetes version used in integration tests via `KUBEBUILDER_ENVTEST_KUBERNETES_VERSION` in `Makefile`
96-
* **Note**: This PR should be cherry-picked as well. It is part of this section as it depends on kubebuilder/controller-runtime
97-
releases and is not strictly necessary for [Supporting managing and running on the new Kubernetes version](#supporting-managing-and-running-on-the-new-kubernetes-version).
98-
* Prior art to release envtest binaries: https://github.com/kubernetes-sigs/kubebuilder/pull/3864
99+
* **Note**: This PR should be cherry-picked as well. It is part of this section as it depends on kubebuilder/controller-runtime releases and is not strictly necessary for [Supporting managing and running on the new Kubernetes version](#supporting-managing-and-running-on-the-new-kubernetes-version).
100+
* Prior art to release envtest binaries: https://github.com/kubernetes-sigs/controller-tools/pull/1032
99101
* Prior art: #7193
100-
* [ ] Bump conversion-gen via `CONVERSION_GEN_VER` in `Makefile`
101-
* Prior art: #7118
102102
103-
After release of CAPI v1.X.x (that supports Kubernetes v1.Y):

exp/internal/controllers/machinepool_controller_phases_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"sigs.k8s.io/controller-runtime/pkg/log"
3737

3838
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
39+
"sigs.k8s.io/cluster-api/api/v1beta1/index"
3940
"sigs.k8s.io/cluster-api/controllers/external"
4041
"sigs.k8s.io/cluster-api/controllers/remote"
4142
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
@@ -456,7 +457,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) {
456457
{Kind: "Node", Name: "machinepool-test-node-3"},
457458
}
458459

459-
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build()
460+
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
460461
r := &MachinePoolReconciler{
461462
Client: fakeClient,
462463
Tracker: remote.NewTestClusterCacheTracker(logr.New(log.NullLogSink{}), fakeClient, fakeClient, fakeClient.Scheme(), client.ObjectKey{Name: defaultCluster.Name, Namespace: defaultCluster.Namespace}),
@@ -586,7 +587,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) {
586587
machinePool.Status.ReadyReplicas = 1
587588
machinePool.Status.Replicas = 1
588589

589-
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinePool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build()
590+
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinePool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
590591
r := &MachinePoolReconciler{
591592
Client: fakeClient,
592593
Tracker: remote.NewTestClusterCacheTracker(logr.New(log.NullLogSink{}), fakeClient, fakeClient, fakeClient.Scheme(), client.ObjectKey{Name: defaultCluster.Name, Namespace: defaultCluster.Namespace}),
@@ -672,7 +673,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) {
672673
machinePool.Status.ReadyReplicas = 1
673674
machinePool.Status.Replicas = 1
674675

675-
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinePool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build()
676+
fakeClient := fake.NewClientBuilder().WithObjects(defaultCluster, defaultKubeconfigSecret, machinePool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
676677
r := &MachinePoolReconciler{
677678
Client: fakeClient,
678679
Tracker: remote.NewTestClusterCacheTracker(logr.New(log.NullLogSink{}), fakeClient, fakeClient, fakeClient.Scheme(), client.ObjectKey{Name: defaultCluster.Name, Namespace: defaultCluster.Namespace}),
@@ -1997,7 +1998,7 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
19971998
err = unstructured.SetNestedField(infraConfig.Object, int64(1), "status", "replicas")
19981999
g.Expect(err).ToNot(HaveOccurred())
19992000

2000-
fakeClient := fake.NewClientBuilder().WithObjects(testCluster, kubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build()
2001+
fakeClient := fake.NewClientBuilder().WithObjects(testCluster, kubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
20012002
r := &MachinePoolReconciler{
20022003
Client: fakeClient,
20032004
Tracker: remote.NewTestClusterCacheTracker(logr.New(log.NullLogSink{}), env.GetClient(), env.GetClient(), env.GetClient().Scheme(), client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}),

exp/internal/controllers/machinepool_controller_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"sigs.k8s.io/controller-runtime/pkg/reconcile"
3737

3838
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
39+
"sigs.k8s.io/cluster-api/api/v1beta1/index"
3940
"sigs.k8s.io/cluster-api/controllers/remote"
4041
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
4142
"sigs.k8s.io/cluster-api/internal/test/builder"
@@ -548,7 +549,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) {
548549
}
549550
return nil
550551
},
551-
}).WithObjects(trackerObjects...).Build()
552+
}).WithObjects(trackerObjects...).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
552553

553554
r := &MachinePoolReconciler{
554555
Client: clientFake,
@@ -1090,7 +1091,7 @@ func TestMachinePoolConditions(t *testing.T) {
10901091
&nodes.Items[1],
10911092
builder.TestBootstrapConfigCRD,
10921093
builder.TestInfrastructureMachineTemplateCRD,
1093-
).WithStatusSubresource(&expv1.MachinePool{}).Build()
1094+
).WithStatusSubresource(&expv1.MachinePool{}).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
10941095

10951096
r := &MachinePoolReconciler{
10961097
Client: clientFake,

0 commit comments

Comments
 (0)