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

CRDS stack and workspace.auto are too long #750

Open
robinlioret opened this issue Nov 16, 2024 · 0 comments
Open

CRDS stack and workspace.auto are too long #750

robinlioret opened this issue Nov 16, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team

Comments

@robinlioret
Copy link

What happened?

When creating the CRDs, I have the following messages:

Error from server (Invalid): error when creating "deploy/yaml/install.yaml": CustomResourceDefinition.apiextensions.k8s.io "stacks.pulumi.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
Error from server (Invalid): error when creating "deploy/yaml/install.yaml": CustomResourceDefinition.apiextensions.k8s.io "workspaces.auto.pulumi.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Example

I'll be using a kind cluster

  1. cd
  2. git clone https://github.com/pulumi/pulumi-kubernetes-operator.git && cd pulumi-kubernetes-operator
  3. kind create cluster --name pulumi-operator-test
  4. kubectl config set-context kind-pulumi-operator-test
  5. Apply the CRDs kubectl apply -f deploy/crds

Output:

customresourcedefinition.apiextensions.k8s.io/updates.auto.pulumi.com created
customresourcedefinition.apiextensions.k8s.io/programs.pulumi.com created
Error from server (Invalid): error when creating "deploy/crds/auto.pulumi.com_workspaces.yaml": CustomResourceDefinition.apiextensions.k8s.io "workspaces.auto.pulumi.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
Error from server (Invalid): error when creating "deploy/crds/pulumi.com_stacks.yaml": CustomResourceDefinition.apiextensions.k8s.io "stacks.pulumi.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Output of pulumi about

Not relevant

Additional context

Notes

  • Same issue when applying the helm chart
  • Same issue when applying the deploy/yaml/install.yaml file
  • I tried to go around with Argocd and a custom helm chart containing the install.yaml file. Not working either

Workaround

The better way I found to install the operator was to use kubectl create -f https://raw.githubusercontent.com/pulumi/pulumi-kubernetes-operator/refs/heads/master/deploy/yaml/install.yaml

This is dangerous : if the chart is updated during a job, the job can potentially be deleted as well.

With ArgoCD. The only way I found is to enable the Replace sync option. But this has the same drawback as the create / replace kubectl command.

Solution "ideas"

Separate the problematic CRDs into multiple resources. I don't know there is a clean way to extend the limitation of the metadata (maybe with OPA ?) or if there is a way to skip completely the last-configuration-applied when applying.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@robinlioret robinlioret added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

1 participant