Skip to content

v3.12.2 breaks with "ensure CRDs are installed first" with --disable-validation #804

Open
@z0rc

Description

@z0rc

Helmfile version 1.1.2.

After upgrading helm-diff from v3.12.1 to v3.12.2, I started to see errors running helmfile apply on empty cluster. My helmfile.yaml.gotmpl has number of releases where one release installs CRD (as example using https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-operator-crds) and second release deployes CR. Second release needs first release and also has disableValidationOnInstall: true.

My env vars:

% env | grep HELM
HELM_DIFF_COLOR=true
HELM_DIFF_NORMALIZE_MANIFESTS=true
HELM_DIFF_OUTPUT_CONTEXT=5
HELM_DIFF_THREE_WAY_MERGE=true
HELM_DIFF_USE_UPGRADE_DRY_RUN=true

I tried to change HELM_DIFF_USE_UPGRADE_DRY_RUN=false, but it didn't have an effect on the error. #795 might be related.

Error:

PATH:
  /opt/homebrew/bin/helm

ARGS:
  0: helm (4 bytes)
  1: --kube-context (14 bytes)
  2: poc-01 (6 bytes)
  3: diff (4 bytes)
  4: upgrade (7 bytes)
  5: --allow-unreleased (18 bytes)
  6: node-local-dns (14 bytes)
  7: deliveryhero/node-local-dns (27 bytes)
  8: --version (9 bytes)
  9: 2.1.8 (5 bytes)
  10: --disable-validation (20 bytes)
  11: --kube-context (14 bytes)
  12: poc-01 (6 bytes)
  13: --namespace (11 bytes)
  14: kube-system (11 bytes)
  15: --values (8 bytes)
  16: /var/folders/r0/96rf0nss61v_4twdyp_k4zf40000gn/T/helmfile248792395/kube-system-node-local-dns-values-699c4c4fb7 (111 bytes)
  17: --reset-values (14 bytes)
  18: --detailed-exitcode (19 bytes)
  19: --color (7 bytes)

ERROR:
  exit status 1

EXIT STATUS
  1

STDERR:
  Enabled three way merge via the envvar
  Enabled normalize manifests via the envvar
  Error: unable to generate manifests: unable to build kubernetes objects from new release manifest: resource mapping not found for name: "node-local-dns" namespace: "kube-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
  ensure CRDs are installed first
  Error: plugin "diff" exited with error

COMBINED OUTPUT:
  Enabled three way merge via the envvar
  Enabled normalize manifests via the envvar
  Error: unable to generate manifests: unable to build kubernetes objects from new release manifest: resource mapping not found for name: "node-local-dns" namespace: "kube-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
  ensure CRDs are installed first
  Error: plugin "diff" exited with error
err 11: command "/opt/homebrew/bin/helm" exited with non-zero status:

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions