https://pulumi.com logo
#kubernetes
Title
# kubernetes
g

gorgeous-minister-41131

02/26/2024, 7:51 PM
Is there a proper way to use OCI scheme Charts/Release with Pulumi's helm v3 bindings? Im' using Pulumi 3.107.0 w/ kubernetes provider 4.7.1.
Copy code
error: kubernetes:<http://helm.sh/v3:Release|helm.sh/v3:Release> resource 'rabbitmq': property chart value {rabbitmq} has a problem: looks like "<oci://registry-1.docker.io/bitnamicharts/rabbitmq>" is not a valid chart repository or cannot be reached: object required; check the chart name and repository configuration.
l

limited-rainbow-51650

02/29/2024, 8:27 AM
We should have OCI registry support for the Helm
Release
resource, not the
Chart
. https://github.com/pulumi/pulumi-kubernetes/pull/1892 Is this a registry which requires authentication? We don't have support for that yet it seems: https://github.com/pulumi/pulumi-kubernetes/issues/1914
g

gorgeous-minister-41131

02/29/2024, 9:02 AM
Thanks Ringo on the note about auth. Although, I realized what I did wrong... the
chart
arg should be the whole OCI URL. The docs don't seem clear on its usage. Perhaps I misread something though. Anyways, this works for me now:
Copy code
rabbitmq_release = Release(
    "rabbitmq",
    args=ReleaseArgs(
        name="rabbitmq",
        chart="<oci://registry-1.docker.io/bitnamicharts/rabbitmq>",
        version="12.14.0",
        namespace=ns.metadata.name,
        values=rabbitmq_release_values,
        atomic=True,
        timeout=600,
    ),
    opts=ResourceOptions(provider=k8s_provider),
)
l

limited-rainbow-51650

02/29/2024, 10:02 AM
Besides the
chart
name,
ReleaseArgs
also allows for
repository_opts
pointing to the repository. See the
Remote Chart
example where it is used with an https registry: https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/release/#remote-chart
g

gorgeous-minister-41131

02/29/2024, 7:03 PM
Yeah that's what I was trying to use it with, and it doesn't work with OCI. Most likely because the repository_opts tries to have helm run helm repo add which isn't applicable with OCI. Makes sense because OCI with Helm was purposely designed to combine both repository and zero or more Charts together; probably why it works with the Release/name arg. Thanks Ringo.
2 Views