Skip to content

Commit

Permalink
Improve Kubernetes bump issue template
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer authored and cahillsf committed Aug 20, 2024
1 parent 236271c commit 3efdec4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
29 changes: 14 additions & 15 deletions .github/ISSUE_TEMPLATE/kubernetes_bump.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ changes should be cherry-picked to all release series that will support the new

* [ ] Continuously modify CAPD to use early versions of the upcoming Kubernetes release (betas and rcs):
* Bump the Kubernetes version in `test/*` except for `test/infrastructure/kind/*`.
* Prior art: #10384
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10922
* [ ] Modify CAPD to use the new Kubernetes release after it is GA:
* Bump the Kubernetes version in `test/*` except for `test/infrastructure/kind/*`.
* Prior art: #10454
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/11030
* [ ] 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):

* 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/):
Expand All @@ -45,11 +45,11 @@ changes should be cherry-picked to all release series that will support the new
TEST_INFRA_DIR=../../k8s.io/test-infra make generate-test-infra-prowjobs
```

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

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

* [ ] Issues specific to the Kubernetes minor release:
* Sometimes there are adjustments that we have to make in Cluster API to be able to support
Expand All @@ -72,7 +72,7 @@ Prerequisites:
* Set new default image for the [test framework](https://github.com/kubernetes-sigs/cluster-api/blob/0f47a19e038ee6b0d3b1e7675a62cdaf84face8c/test/framework/bootstrap/kind_provider.go#L40)
* 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)
* Verify the quickstart manually
* Prior art: #10610
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10610
* [ ] Cherry-pick above PR to the latest release branch.

### Using new Kubernetes dependencies
Expand All @@ -83,21 +83,20 @@ need them in older releases as they are not necessary to manage workload cluster
run the Cluster API controllers on the new Kubernetes version.
* [ ] Ensure there is a new controller-runtime minor release which uses the new Kubernetes Go dependencies.
* [ ] 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`.
* [ ] 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`.
* It is recommended to have one PR for presubmit and one for periodic jobs to reduce the risk of breaking the periodic jobs.
* Prior art: https://github.com/kubernetes/test-infra/pull/32380
* [ ] Bump the Go version in Cluster API: (if Kubernetes is using a new Go minor version)
* Search for the currently used Go version across the repository and update it
* We have to at least modify it in: `hack/ensure-go.sh`, `.golangci.yml`, `cloudbuild*.yaml`, `go.mod`, `Makefile`, `netlify.toml`, `Tiltfile`
* Prior art: #10452
* [ ] Bump controller-runtime
* [ ] Bump controller-tools
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10452
* [ ] Bumps in Cluster API repo:
* controller-runtime & controller-tools in go.mod files
* controller-gen via `CONTROLLER_GEN_VER` in `Makefile`
* conversion-gen via `CONVERSION_GEN_VER` in `Makefile`
* Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/10803
* [ ] Bump the Kubernetes version used in integration tests via `KUBEBUILDER_ENVTEST_KUBERNETES_VERSION` in `Makefile`
* **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).
* Prior art to release envtest binaries: https://github.com/kubernetes-sigs/kubebuilder/pull/3864
* **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).
* Prior art to release envtest binaries: https://github.com/kubernetes-sigs/controller-tools/pull/1032
* Prior art: #7193
* [ ] Bump conversion-gen via `CONVERSION_GEN_VER` in `Makefile`
* Prior art: #7118
After release of CAPI v1.X.x (that supports Kubernetes v1.Y):
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/cluster-api/api/v1beta1/index"
"sigs.k8s.io/cluster-api/controllers/external"
"sigs.k8s.io/cluster-api/controllers/remote"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
Expand Down Expand Up @@ -456,7 +457,7 @@ func TestReconcileMachinePoolPhases(t *testing.T) {
{Kind: "Node", Name: "machinepool-test-node-3"},
}

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

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

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

fakeClient := fake.NewClientBuilder().WithObjects(testCluster, kubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).Build()
fakeClient := fake.NewClientBuilder().WithObjects(testCluster, kubeconfigSecret, machinepool, bootstrapConfig, infraConfig, builder.TestBootstrapConfigCRD, builder.TestInfrastructureMachineTemplateCRD).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()
r := &MachinePoolReconciler{
Client: fakeClient,
Tracker: remote.NewTestClusterCacheTracker(logr.New(log.NullLogSink{}), env.GetClient(), env.GetClient(), env.GetClient().Scheme(), client.ObjectKey{Name: testCluster.Name, Namespace: testCluster.Namespace}),
Expand Down
5 changes: 3 additions & 2 deletions exp/internal/controllers/machinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"

clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
"sigs.k8s.io/cluster-api/api/v1beta1/index"
"sigs.k8s.io/cluster-api/controllers/remote"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1beta1"
"sigs.k8s.io/cluster-api/internal/test/builder"
Expand Down Expand Up @@ -548,7 +549,7 @@ func TestReconcileMachinePoolRequest(t *testing.T) {
}
return nil
},
}).WithObjects(trackerObjects...).Build()
}).WithObjects(trackerObjects...).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()

r := &MachinePoolReconciler{
Client: clientFake,
Expand Down Expand Up @@ -1090,7 +1091,7 @@ func TestMachinePoolConditions(t *testing.T) {
&nodes.Items[1],
builder.TestBootstrapConfigCRD,
builder.TestInfrastructureMachineTemplateCRD,
).WithStatusSubresource(&expv1.MachinePool{}).Build()
).WithStatusSubresource(&expv1.MachinePool{}).WithIndex(&corev1.Node{}, index.NodeProviderIDField, index.NodeByProviderID).Build()

r := &MachinePoolReconciler{
Client: clientFake,
Expand Down

0 comments on commit 3efdec4

Please sign in to comment.