Thread
#kubernetes
    b

    bored-spoon-83710

    1 month ago
    Hello, I’m trying to deploy the same chart in two different clusters (in the same Pulumi project), but I’m having issue with naming: I can’t use the same Pulumi logical name for my two chart resources (else Pulumi complains about duplicate resource URN) and I didn’t find a way to override the release name used when templating the chart. Is it a deliberate choice to not let the user modify the release name (maybe I just didn’t see how to do it) or is it a missing feature which could be implemented (potentially by me when I’ve time)?
    b

    billowy-army-68599

    1 month ago
    can you share your code?
    b

    bored-spoon-83710

    1 month ago
    I’ve this inside a component which is instantiated two times (once for each EKS cluster):
    _, err = helm.NewChart(ctx, t.name+"-"+chartName,
    		helm.ChartArgs{
    			Path:      pulumi.String(path.Join(path.Dir(currentFile), "helm")),
    			Namespace: t.Namespace.Metadata.Name().Elem(),
    			Values:    values,
    		},
    		pulumi.Parent(t),
    	)
    	if err != nil {
    		return errors.NewResourceCreationError("Helm chart", chartName, err)
    	}
    If I remove the
    t.name
    prefix, I get the duplicate error issue, but with it, all the resources deployed by the chart have
    t.name
    prefix in their name.
    b

    billowy-army-68599

    1 month ago
    are you adding an index to the chart name? you need a unique urn for each
    b

    bored-spoon-83710

    1 month ago
    No, this is a constant (in fact, this is the name which I’d like to be used as the release name for the two charts templating). I’d like the chart deployment to be identical in the two clusters.
    b

    billowy-army-68599

    1 month ago
    sorry I was focusing on this part of the problem:
    else Pulumi complains about duplicate resource URN
    duplicate urns are easy to fix, if you want to go down that path
    the release name is
    t.name+"-"+chartName
    so you can override it if you wish
    but yes, the logical name = release name
    b

    bored-spoon-83710

    1 month ago
    Sure, the problem isn’t really the duplicate URN, it’s more that one can’t override the release name used during templating, it’s tightly coupled to the logical name, which I’d like to avoid.
    OK, so is there a technical reason behind this tight coupling or would you allow a PR to add the ability to change the release name (kind of physical name)?
    b

    billowy-army-68599

    1 month ago
    I think we could consider adding a release name property, feel free to send a PR
    b

    bored-spoon-83710

    1 month ago
    Thanks, I don’t have time to do this myself right now, but I’ll see with my colleagues and I’m definitely adding it on my todo list 😉
    Hello @billowy-army-68599, I finally couldn’t resist having a look at it and came up with small change to start with:https://github.com/yann-soubeyrand/pulumi-kubernetes/commit/b405b9f49c24775e6b33f52d4d0ceb3b8bf94369 From now on, I don’t know exactly what to do: I tried
    make build
    and it gave me a working Go SDK, but I’ve errors about Java (the requirements for Java aren’t indicated in the
    CONTRIBUTING.md
    file) and I get a lot of space differences in the Go SDK files which seems strange. Can you give me hint please?