Skip to content

ValidatingAdmissionPolicy in charts/crds/crds/ (Helm CRD dir) breaks external CRD management tools #9015

@p-zany

Description

@p-zany

If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
envoy-gateway-security@googlegroups.com where the issue will be triaged appropriately.

Description:

Since v1.8.0, the gateway-helm chart bundles ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding resources (safe-upgrades.gateway.networking.k8s.io) inside charts/crds/crds/gatewayapi-crds.yaml — which is the crds/ directory of the crds sub-chart.

Helm treats crds/ as a special directory for CustomResourceDefinition objects only. Placing non-CRD resources there causes breakage in tools that process chart CRD directories, such as the Flux helm-controller's crds: CreateReplace strategy, which fails with:

failed to apply CustomResourceDefinitions: failed to update CustomResourceDefinition(s):
no ValidatingAdmissionPolicy with the name "safe-upgrades.gateway.networking.k8s.io" found

The same resources already appear correctly in charts/gateway-crds-helm/templates/standard-gatewayapi-crds.yaml (inside templates/), suggesting the placement in crds/ may be unintentional.

Repro steps:

  1. Use Flux with a HelmRelease pointing to oci://docker.io/envoyproxy/gateway-helm with version: "*" and crds: CreateReplace
  2. When chart resolves to v1.8.0, install fails immediately with the error above
  3. The ValidatingAdmissionPolicy does not exist yet in the cluster (first install or fresh cluster)

Environment:

  • Gateway version: v1.8.0 (gateway-helm chart 1.8.0)
  • Kubernetes: v1.32.7

Logs:

Helm install failed for release infrastructure/envoy-gateway with chart gateway-helm@1.8.0:
failed to apply CustomResourceDefinitions: failed to update CustomResourceDefinition(s):
no ValidatingAdmissionPolicy with the name "safe-upgrades.gateway.networking.k8s.io" found

Suggested fix:

Move ValidatingAdmissionPolicy / ValidatingAdmissionPolicyBinding from charts/crds/crds/gatewayapi-crds.yaml to templates/ (as is already done in charts/gateway-crds-helm/templates/), so the crds/ directory contains only CustomResourceDefinition objects.

Related Flux issue: fluxcd/helm-controller#1486

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions