Skip to content

helm diff failes when CRDs aren't present #183

@czunker

Description

@czunker

helm-diff version: 3.1.0
helm version: 3.1.0
helmfile version: 0.94.1 or 0.100.0

Hi,

we have problems installing prometheus-operator with helmfile. We get these error messages:

failed processing release prometheus-operator: helm exited with status 1:
Error: Failed to render chart: exit status 1: manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "Alertmanager" in version "monitoring.coreos.com/v1", unable to recognize no matches for kind "PrometheusRule" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "Prometheus" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "PrometheusRule" in version "monitoring.coreos.com/v1", unable to recognize "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"]
Error: plugin "diff" exited with error

I could pin it down to helm-diff:

$ helm diff upgrade --reset-values --allow-unreleased prometheus-operator stable/prometheus-operator --namespace monitoring --values /tmp/prom-op.values --detailed-exitcode
Error: Failed to render chart: exit status 1: manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Alertmanager" in version "monitoring.coreos.com/v1"

 Error: plugin "diff" exited with error

I installed prometheus-operator with helm-diff v3.0.0-rc.7. Then I manually deleted the alertmanager CRD and executed only helm diff.

v3.0.0-rc.7 doesn't show any diff. v3.1.0 exists with the above error.
When the CRDs are present, the diff command works without problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions