Skip to content

Unable to deploy large CRD due to annotation max size limit (262144 characters) #48

@siwyd

Description

@siwyd

Issue created after Slack chat: https://kubernetes.slack.com/archives/CH8KCCKA5/p1573575958163800

I'm unable to deploy a certain CRD because of the size of the kapp.k14s.io/original annotation:

Error: Applying update customresourcedefinition/alertmanagers.monitoring.coreos.com (apiextensions.k8s.io/v1beta1) cluster: Saving record of last applied resource: Updating resource customresourcedefinition/alertmanagers.monitoring.coreos.com (apiextensions.k8s.io/v1beta1) cluster: CustomResourceDefinition.apiextensions.k8s.io "alertmanagers.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 characters (reason: Invalid)

kubectl apply works because of the JSON encoding of the annotation it seems (added benefit: doesn't clutter kubectl describe output):

Annotations:  kapp.k14s.io/identity: v1;/apiextensions.k8s.io/CustomResourceDefinition/alertmanagers.monitoring.coreos.com;apiextensions.k8s.io/v1beta1
              kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{},"creationTimestamp":null,"name...

Metadata

Metadata

Assignees

No one assigned

    Labels

    carvel triageThis issue has not yet been reviewed for validityenhancementThis issue is a feature requestin progressWork has begun by a community member or a maintainer; this issue may be included in a future release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions