aloof-jelly-80665
05/05/2021, 1:21 AMException: invoke of kubernetes:helm:template failed: invocation of kubernetes:helm:template returned an error: failed to generate YAML for specified Helm chart: failed to pull chart: chart "prometheus-community/kube-state-metrics" version "3.0.1" not found in <https://prometheus-community.github.io/helm-charts> repository
def deploy_kube_state_metrics(k8s_provider):
from pulumi_kubernetes.helm.v3 import Chart, ChartOpts, FetchOpts
def fix_crd_issue(obj, opts):
# <https://github.com/pulumi/pulumi-kubernetes/issues/800>
# also, <https://github.com/pulumi/pulumi-kubernetes/issues/1541>
if obj["kind"] == "CustomResourceDefinition" and obj.get("status"):
del obj["status"]
Chart(
"kube-state-metrics-helm-chart",
config=ChartOpts(
chart="prometheus-community/kube-state-metrics",
version="3.0.1",
namespace="kube-state-metrics",
fetch_opts=FetchOpts(
repo="<https://prometheus-community.github.io/helm-charts>",
),
transformations=[fix_crd_issue],
),
opts=pulumi.ResourceOptions(provider=k8s_provider),
)