-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
area/helmimpact/usabilitySomething that impacts users' ability to use the product easily and intuitivelySomething that impacts users' ability to use the product easily and intuitivelykind/enhancementImprovements or new featuresImprovements or new features
Description
Hi,
When transitioning from Helm chart v3 to helm chart v4, we loose access to getResource
.
The docs surrounding the resources
output of helm chart v4 are very bare: resources any[]
Resources created by the Chart.
.
From #3110 (comment):
Wanted to wonder if there's any guidelines on how to manage outputs better with the v4 Chart?
The v3 chart hadgetResource
typed API which was very helpful.
From the docs it's not very clear how I'm supposed to do it. I switched some deployments from the v3 to the v4 chart and I end up with this sort of diff:
- const clusterCrd = operatorChart.getResource("apiextensions.k8s.io/v1/CustomResourceDefinition", "rabbitmqclusters.rabbitmq.com").apply(c => notNull(c));
+ const clusterCrd = operatorChart.resources.apply(resources => {
+ for (const r of resources) {
+ if (r.__pulumiType === "kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition" && r.__name.endsWith("rabbitmqclusters.rabbitmq.com")) {
+ return r;
+ }
+ }
+ throw new Error("Could not find rabbitmq operator CRD");
+ });
I previously posted a message on slack: https://pulumi-community.slack.com/archives/CRFURDVQB/p1728239416448769
Edregol, jkodroff, automagic and mjvankampen
Metadata
Metadata
Assignees
Labels
area/helmimpact/usabilitySomething that impacts users' ability to use the product easily and intuitivelySomething that impacts users' ability to use the product easily and intuitivelykind/enhancementImprovements or new featuresImprovements or new features