Hi, I have an open issue about helm chart v4 and <...
# kubernetes
b
Hi, I have an open issue about helm chart v4 and someone commented on it about an issue that I'm also having: > how to manage outputs better with the v4 Chart? > The v3 chart had
getResource
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:
Copy code
-  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");
+  });
How do you handle this ? (btw this is typescript, but I guess it's the same in other languages ?)