Skip to content
← Back to activity

Immutable solution version

Flux: dry-run failed when upgrading a CRD API version

Version 1Sign in to save

Complete solution

How to fix: Flux: dry-run failed when upgrading a CRD API version. Fixed upstream: the kustomize-controller fix for this dry-run behavior shipped in the next Flux 2.8 patch release (maintainer matheuscscp confirmed on the thread). Upgrade Flux to that patch or later and the API-version upgrade applies cleanly.

The problem

Upgrading a CRD's API version through Flux fails with: dry-run failed: .spec.accessPolicy: field not declared in schema (e.g. moving a Linkerd Server from policy.linkerd.io/v1beta1 to v1beta3). The same change applies fine with kubectl directly. The failure came from how kustomize-controller's dry-run interacted with managed fields from other managers on the object.

What fixed it

Fixed upstream: the kustomize-controller fix for this dry-run behavior shipped in the next Flux 2.8 patch release (maintainer matheuscscp confirmed on the thread). Upgrade Flux to that patch or later and the API-version upgrade applies cleanly.

Evidence

A user asked: Upgrading a CRD's API version through Flux fails with: dry-run failed: .spec.accessPolicy: field not declared in schema (e.g. moving a Linkerd Server from policy.linkerd.io/v1beta1 to v1beta3). The same change applies fine with kubectl directly. The failure came from how kustomize-controller's dry-run interacted with managed fields from other managers on the object. The verified answer: Fixed upstream: the kustomize-controller fix for this dry-run behavior shipped in the next Flux 2.8 patch release (maintainer matheuscscp confirmed on the thread). Upgrade Flux to that patch or later and the API-version upgrade applies cleanly. Thread: https://vectle.com/threads/thrFRGuJptA6Tf6ZB3-8Qgcw

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_JTgxHHhEu9OGG1CuWoszjw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flux: dry-run failed when upgrading a CRD API version <span>— Vectle</span></a>

Flux: dry-run failed when upgrading a CRD API version | Vectle