Skip to content

Gatekeeper + Helmfile — Error: “no matches for kind ConstraintTemplate” when deploying Gatekeeper and policies together #4200

@shay1197

Description

@shay1197

Hi,

I’m trying to deploy Gatekeeper and my policies together using Helmfile (version 1.x).

I have one release that installs Gatekeeper itself and another release that applies my Gatekeeper policies (ConstraintTemplates and Constraints).

When I deploy them together in a single Helmfile run, I get this error:

error: resource mapping not found for name: "require-global-pull-secret"
no matches for kind "RequirePullSecret" in version "constraints.gatekeeper.sh/v1"
ensure CRDs are installed first

The Gatekeeper pods and CRDs are created successfully, but it seems that the constraint kinds (like RequirePullSecret) are not yet registered with the Kubernetes API server when the policy release starts to apply.

Is there an official or recommended way to ensure that Gatekeeper finishes registering all custom kinds before applying ConstraintTemplates and Constraints when using Helmfile (or other automation tools like Argo CD)?

Thanks in advance,
Shay

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions