Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The CustomResourceDefinition "terraforms.infra.contrib.fluxcd.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes #1533

Closed
jlewi opened this issue Feb 25, 2025 · 1 comment

Comments

@jlewi
Copy link

jlewi commented Feb 25, 2025

When I tried to deploy TOFU I ran into the error.

The CustomResourceDefinition "terraforms.infra.contrib.fluxcd.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

I think this is because the CRD definition is too long. To work around this I simply deleted the older versions (v1alpha1) since I didn't need this.

I did this using kustomize with a patch.

patches:
  - target:
      group: apiextensions.k8s.io
      version: v1
      kind: CustomResourceDefinition
      name: terraforms.infra.contrib.fluxcd.io
    patch: |-
      - op: remove
        path: /spec/versions/0

Purpose of this issue is just to document it in case others run into it.

@jlewi
Copy link
Author

jlewi commented Feb 25, 2025

Closing because the purpose of this issue was just to document.

@jlewi jlewi closed this as completed Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant