-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for non-overlay components in codegen for pulumi-kubernetes provider #15490
Conversation
Changelog[uncommitted] (2024-03-04)Features
|
@lblackstone would you happen to know the origin story of the Also, I just noticed that the old |
As far as I recall, that was copied over from the original TS implementation. I think the extra base class may have added k8s-specific get methods, or something along those lines. I don't know offhand what the implications of changing it would be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really ought to have a test in pkg/codegen/testing/test/testdata if just to make sure we don't break it.
A follow-up about /// <summary>
/// Base component for containers of Kubernetes resources.
/// </summary>
public abstract class CollectionComponentResource : ComponentResource
{
/// <summary>
/// Returns a resource defined by the given name.
/// </summary>
/// <param name="name">Resource name.</param>
/// <param name="namespaceName">Optional namespace, e.g. "kube-prometheus-exporter-kubernetes".</param>
/// <typeparam name="T">The type of the resource.</typeparam>
public Output<T> GetResource<T>(string name, string? namespaceName = null)
where T : KubernetesResource
... From this I would say that KubernetesResource is the base class for any resource that represents a Kubernetes object (or list). The component resources would not fall under that category, nor will the MLC ones extend |
5783b52
to
a929fda
Compare
7fb971e
to
895c7b6
Compare
895c7b6
to
8c6454e
Compare
01f2056
to
d9f8904
Compare
### Features - [pkg] Make schema.NewPluginLoader respect PULUMI_DEBUG_PROVIDERS, which enables Pulumi YAML programs to work correctly with this feature [#15526](#15526) - [sdk/python] Add support for asynchronous invokes via a new `invoke_async` function [#15602](#15602) - [sdkgen/dotnet] Support for non-overlay components in codegen for pulumi-kubernetes provider [#15490](#15490) ### Bug Fixes - [backend/service] Make decrypt/encrypt network calls retryable to help work around network hiccups [#15600](#15600) - [cli/new] Strip credentials and query strings from template URLs saved to project [#15586](#15586) - [engine] Fix an issue where snapshots could become invalid when doing a targeted up [#15476](#15476) - [sdk/python] Fix determining plugins for old packages in the Python language host [#15576](#15576) - [pkg/testing] Make ProgramTest use a temporary PULUMI_HOME for each test [#15568](#15568) - [sdkgen/dotnet] Codegen fix for resources without constant input properties [#15488](#15488)
Draft changelog: ### Features - [auto/{go,nodejs,python}] Add support for suppress progress and suppress outputs parameters in the Automation API [#15596](#15596) - [pkg] Make schema.NewPluginLoader respect PULUMI_DEBUG_PROVIDERS, which enables Pulumi YAML programs to work correctly with this feature [#15526](#15526) - [sdk/dotnet] Update dotnet language host to 3.60.0 [#15609](#15609) - [sdk/nodejs] Add experimental support to the NodeJS SDK for the new transforms system. [#15532](#15532) - [sdk/python] Add support for asynchronous invokes via a new `invoke_async` function [#15602](#15602) - [sdkgen/dotnet] Support for non-overlay components in codegen for pulumi-kubernetes provider [#15490](#15490) ### Bug Fixes - [cli] Fix a panic when the secrets provider is missing from the deployment snapshot [#15599](#15599) - [backend/service] Make decrypt/encrypt network calls retryable to help work around network hiccups [#15600](#15600) - [cli/new] Strip credentials and query strings from template URLs saved to project [#15586](#15586) - [engine] Fix an issue where snapshots could become invalid when doing a targeted up [#15476](#15476) - [pkg/testing] Make ProgramTest use a temporary PULUMI_HOME for each test [#15568](#15568) - [sdkgen/dotnet] Codegen fix for resources without constant input properties [#15488](#15488) - [sdk/nodejs] Properly capture node:crypto and global.crypto in node 19+ - [sdk/python] Fix determining plugins for old packages in the Python language host [#15576](#15576)
Description
This PR enhances the codegen for dotnet to allow the pulumi-kubernetes provider to have non-overlay components. Previously all components were overlays and didn't require codegen.
The specific change is to not apply the
KubernetesResource
base class when the resource is a component. It is inappropriate to useKubernetesResource
in this case because it extendsCustomResource
notComponentResource
.The sdkgen test suite for
kubernetes20
mode was updated with a new example resource:The fix is manifested here.
Checklist
make tidy
to update any new dependenciesmake lint
to verify my code passes the lint checkgofumpt
make changelog
and committed thechangelog/pending/<file>
documenting my change