kubernetes-sigs / cluster-api

Home for Cluster API, a subproject of sig-cluster-lifecycle
https://cluster-api.sigs.k8s.io
Apache License 2.0
3.49k stars 1.29k forks source link

Add validation for KubeadmConfigSpec defaulting #8147

Open sbueringer opened 1 year ago

sbueringer commented 1 year ago

We repeatedly had the issue that we added new defaulting to KubeadmConfigSpec fields, which lead to rollouts in KCP after CAPI upgrade:

The goal of this issue is to add some sort of validation that we can run as part of presubmits to ensure this doesn't happen again.

We basically want to validate that all defaulting that we implement for KubeadmConfigSpec is done in DefaultKubeadmConfigSpec and not via OpenAPI.

Some ideas:

/kind feature /area control-plane

sbueringer commented 1 year ago

@vincepri @fabriziopandini @ykakarap

The unit tests sounds sufficient and pretty straightforward to me, WDYT?

ykakarap commented 1 year ago

Yup, unit test looks like a good idea. +1. Since we will use envtest with the defaulting webhook it will closely reflect the real world case too.

fabriziopandini commented 1 year ago

/triage accepted /help 💯 this will be very useful!

k8s-ci-robot commented 1 year ago

@fabriziopandini: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api/issues/8147): >/triage accepted >/help >💯 this will be very useful! > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sbueringer commented 1 year ago

Let's see if some takes this over. I added it to the v1.5 milestone to ensure we'll implement it until then.

I would take over if nobody volunteers until then.

k8s-triage-robot commented 2 months ago

This issue has not been updated in over 1 year, and should be re-triaged.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

sbueringer commented 2 months ago

/triage accepted