-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix aliases for several resource kinds #990
Conversation
The following resource Kinds had the wrong Group specified in the aliases: - ClusterRole - ClusterRoleBinding - Ingress - NetworkPolicy - PriorityClass - Role - RoleBinding
Is there a source of truth for this data we can use to make sure we are right here (and link to from source code)? Is it in Kubernetes API docs anywhere? Is it in Kubernetes source code anywhere? |
Yeah, it's in the API docs |
Specifically - you mean the "Other API versions of this object exist:" annotations? Do we now map precisely the same kinds as specified in these docs? Can we pull this from API specs somehow? (that is - where is this data for the API docs sourced from, and why can't we source from the same place)? |
Yes
Yes
It's generated from the OpenAPI spec, so it's doable with some caveats:
|
We should take this PR as-is to fix the current issues. That said:
It sounds rather suspicious to me that we are trying to outsmart Kubernetes' own notion of what resouce kinds are "the same". Any place we don't match we will run into very weird issues with Helm/YAML, and just with overall model compatibility. Barring any explicit Pulumi-specific issues, I'm inclined to align with the platform.
I may be biased, but I think it is basically always going to be worth it to derive things from official specs than to rely on ourselves to do ongoing manual work. It removes so much risk around long term maintenance and just human error to derive these sorts of things programmatically.
Seems we have to fundamentally solve for this anyway - we very much don't want to drop old resource types in general, even if they are deprecated. |
Tracking further work in #828 |
Proposed changes
The following resource Kinds had the wrong Group
specified in the aliases:
Related issues (optional)
Fixes #989