-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the apiVersion
and kind
fields mandatory in Kustomization/Component v1
#5140
Comments
Thanks for pointing this out--during the period where we support both v1 and v1beta1 versions of our build target types (Kustomization and Component), we will need to be able to distinguish them. I suggest that when we introduce v1, we consider the empty value to be equivalent of v1beta1, and continue to default the kind to Kustomization IFF the version is v1beta1 (explicitly or by default). In other words, v1 must be supplied explicitly, and when it is, kind must be explicit as well. The deprecation and removal of the blank value the becomes synonymous with the deprecation and removal of v1beta1. I think this path would minimize action items for end users. /retitle Make the |
apiVersion
and kind
fieldsapiVersion
and kind
fields mandatory in Kustomization/Component v1
hi @koba1t! |
@afzalbin64
It means showing a warning message for stderr when these fields are omitted. |
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 |
/triage accepted |
Eschewed features
What would you like to have added?
We add the warning message when the
apiVersion
orkind
fields are omitted.Why is this needed?
Today,
kustomize
accept to omit theapiVersion
andkind
fields.This syntax is easy to start for new users, but it isn't very clear and maybe break the user config when we have a few
apiVersion
versions (Ex. when we addv1
forapiVersion
).So, Could we consider deprecating this syntax that omits the
apiVersion
andkind
fields?I think we can start by showing the warning message and adding the auto-fix function. And we can make more consideration to whether remove or not.
Can you accomplish the motivating task without this feature, and if so, how?
Probably, we can decide to use current values (Ex.
apiVersion: kustomize.config.k8s.io/v1beta1
) when that fields omitted.These values were hardcoded on codes and we can announce for we require set these values when you need to use
v1
and new functions.But I think we need to add the warning message because we must remove the old apiVersion in the future.
What other solutions have you considered?
Probably, we have enough to add the warning message only.
But if we don't deprecate that, maybe user got to break their config when updating
kustomize
.Anything else we should know?
No response
Feature ownership
The text was updated successfully, but these errors were encountered: