Skip to content
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

Chart v4 fails when resource name is mixed case #3056

Open
EronWright opened this issue Jun 12, 2024 · 0 comments
Open

Chart v4 fails when resource name is mixed case #3056

EronWright opened this issue Jun 12, 2024 · 0 comments
Labels
area/helm kind/bug Some behavior is incorrect or out of spec

Comments

@EronWright
Copy link
Contributor

What happened?

I tried to deploy the provided example and saw an unexpected error:

    io.grpc.StatusRuntimeException: UNKNOWN: release name "argocdChart": invalid release name, must match regex ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ and the length must not be longer than 53
        at io.grpc.Status.asRuntimeException(Status.java:539)
        at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:544)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:576)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:757)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:736)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)

Example

        var argocdChart = new Chart("argocdChart", ChartArgs.builder()
            .chart("argo-cd")
            .version("6.11.1")
            .namespace("argocd")
            .repositoryOpts(RepositoryOptsArgs.builder()
                .repo("https://argoproj.github.io/argo-helm")
                .build())
            .build());

Output of pulumi about

❯ p about
CLI          
Version      3.117.0
Go Version   go1.22.3
Go Compiler  gc

Plugins
KIND      NAME        VERSION
language  java        unknown
resource  kubernetes  4.13.1
resource  random      4.16.2

Additional context

The root cause is that the Chart v4 resource uses the resource name as the default "release name" for templating purposes. Apparently the Helm code requires that release names meet certain requirements.

My suggestion is to either use the chart's own name (.Metadata.Name) by default, to minimize the need to use fullnameOverride.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@EronWright EronWright added kind/bug Some behavior is incorrect or out of spec area/helm needs-triage Needs attention from the triage team labels Jun 12, 2024
@rquitales rquitales removed the needs-triage Needs attention from the triage team label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants