operator-lifecycle-manager icon indicating copy to clipboard operation
operator-lifecycle-manager copied to clipboard

Applying OLM CRDs fails due to last-applied-configuration annotation

Open exdx opened this issue 3 years ago • 1 comments

Bug Report

What did you do? A clear and concise description of the steps you took (or insert a code snippet). Installing OLM CRDs via kubectl apply in the v0.21+ versions of OLM fails due to the size of the last-applied-configuration annotation that gets auto-appended to the object. See #2767 for more information.

What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet). Successful installation

What did you see instead? Under which circumstances? A clear and concise description of what you expected to happen (or insert a code snippet).

The CustomResourceDefinition "clusterserviceversions.operators.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Environment

  • operator-lifecycle-manager version: v0.21+
  • Kubernetes version information:
  • Kubernetes cluster kind:

Possible Solution

Additional context Add any other context about the problem here.

Solution requires potentially slimming down the OpenAPI schema that is generated by codegen.

exdx avatar May 12 '22 19:05 exdx

Related, I noticed that operator-sdk olm install from latest version installs without errors, but the clusterserviceversions.operators.coreos.com CRD is not created. olm install uses https://github.com/operator-framework/operator-lifecycle-manager/releases/latest/download/crds.yaml to apply the CRDs, which also has this issue.

anders-swanson avatar May 19 '22 20:05 anders-swanson

I'm going to close this original issue as a duplicate of #2695. Please follow that issue for more updates.

exdx avatar Oct 12 '22 14:10 exdx