hello, having some issues with creating a stack in...
# general
hello, having some issues with creating a stack in kubernetes with a helm chart stable/prometheus-operator. It is giving me a duplicate resource URN error, I have manually searched for a duplicate on the cluster (doesn’t exist), tried a different namespace, tried a different stack name. Looking for some guidance where to look
Copy code
  kubernetes:<http://rbac.authorization.k8s.io:Role|rbac.authorization.k8s.io:Role> (default/prometheus-operator-prometheus):
    error: Duplicate resource URN 'urn:pulumi:prometheus-monitoring-test::eks-devops-metrics-server::kubernetes:<http://helm.sh/v2:Chart$kubernetes:rbac.authorization.k8s.io/v1:Role::default/prometheus-operator-prometheus';|helm.sh/v2:Chart$kubernetes:rbac.authorization.k8s.io/v1:Role::default/prometheus-operator-prometheus';> try giving it a unique name
we've heard this before. can you share the exact call to helm.v2.chart
in previous instances of this problem it has been the case that the chart has generated two of the same crd. that issue should have been fixed though
this is my index.ts:
Copy code
import * as k8s from "@pulumi/kubernetes";
import * as config from './config';

function addNamespace(o: any) {
    if (o !== undefined) {
        o.metadata = Object.assign(o.metadata || {}, {namespace});

const namespace = config.namespace;

if (namespace !== 'default') {
    new k8s.core.v1.Namespace("testrandom0x112", {
        metadata: {
            name: namespace
    }, {
        provider: config.k8sProvider

const prometheus_operator2 = new k8s.helm.v2.Chart(
        repo: "stable",
        chart: "prometheus-operator",
        version: "4.2.1",
        values: {
            replicaCount: 1
        transformations: [addNamespace]
    { providers: { kubernetes: config.k8sProvider } },
cc @gorgeous-egg-16927 I'm not back until 1 or so
my colleague looked deeper, added more conditions to the addNamespace function in index.ts to get around this issue
I believe this is another instance of https://github.com/pulumi/pulumi-kubernetes/issues/456