`ManagedSeedSpec`'s field `Gardenlet` shouldn't be a pointer
How to categorize this issue?
/area quality /kind enhancement
What would you like to be added:
https://github.com/gardener/gardener/blob/78565916bef348d472d635e0e1b2449ed6b335d9/pkg/apis/seedmanagement/types_managedseed.go#L55 There is no reason for resource fields to be pointers outside of the case when we want to convey that they are optional
https://github.com/gardener/gardener/blob/78565916bef348d472d635e0e1b2449ed6b335d9/pkg/apis/seedmanagement/validation/managedseed.go#L97-L99
And from the code above we see that it can not be nil and therefore it is not an optional field
Most likely a leftover from https://github.com/gardener/gardener/issues/6898. Before https://github.com/gardener/gardener/issues/6898 in the ManagedSeed resource one of .spec.seedTemplate and .spec.gardenlet was required. That's why both of the fields were optional. But after we removed support for .spec.seedTemplate I think we can now make spec.gardenlet required. @timuthy @rfranzke to confirm.
Yes, probably @ialidzhikov is right. Before doing this, please check if .spec.gardenlet gets defaulted somewhere by gardener-apiserver (either via static defaulting in pkg/apis or via admission plugins in plugins/pkg). If not, we can make it required.
/good-first-issue
@Kostov6: This request has been marked as suitable for new contributors.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.
In response to this:
/good-first-issue
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
/assign Kostov6
/assign @RadaBDimitrova