https://pulumi.com logo
Title
s

square-tiger-5809

02/16/2023, 8:38 PM
If I run a helm chart like this:
import pulumi
import pulumi_kubernetes as k8s
from pulumi_kubernetes.helm.v3 import Chart, ChartOpts, FetchOpts
very_important_chart = Chart(
    "stakater-reloader",
    ChartOpts(
        chart="reloader",
        version="v1.0.5",
        fetch_opts=FetchOpts(
            repo="<https://stakater.github.io/stakater-charts>",
        )
    ),
)
I confirm resources are installed, great. Let's say we need to know what Pulumi stacks have applied helm charts....
helm ls --all-namespaces --all
My chart isn't listed. I can only see charts installed by
helm cli
directly. This is because
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: pulumi
is used instead of
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: helm
. Is there a way for Pulumi to list all charts managed in the cluster, or do users have to patch/rewrite the helm CLI (or custom tools) to support looking at other managed-by labels from third parties like pulumi? Not sure if there is an easier way to give some method to inspect the installed charts.
I can just write my own tool to scrape the k8s API and gather information about Pulumi helm deployments. Like
result = v1.list_namespaced_pod( "default", label_selector="<http://app.kubernetes.io/managed-by=pulumi|app.kubernetes.io/managed-by=pulumi>",watch=False)
but if there's any community ideas that sound better, I'd like to know.
b

billowy-army-68599

02/16/2023, 9:27 PM
a
helm.Chart
doesn’t install it as a helm release, it uses
helm template
to render the yaml as a standard kubernetes object. if you want the helm release functionality, use
helm.Release
s

square-tiger-5809

02/16/2023, 9:29 PM
I'm going to dig into helm.Release a bit deeper. Thank you!