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

Unable to use server-side apply #2857

Open
mwienk opened this issue May 21, 2024 · 0 comments
Open

Unable to use server-side apply #2857

mwienk opened this issue May 21, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@mwienk
Copy link

mwienk commented May 21, 2024

What happened?
Some kubernetes applications need to use a server-side apply to circumvent API limitations, most notably the annotations field being longer than 262144 bytes, which might happen when you apply CRDs. For example, applying the cloud native postgres operator (cnpg) requires a server-side apply.

Though we have the possibility to add --server-side in the applyArgs, this flag is incompatible with the --force flag, which is used by default, failing the devspace dev command.

I received the following output:

info Using namespace 'my-project'
info Using kube context 'rancher-desktop'
my-project deploy:cnpg Applying manifests with kubectl...
my-project deploy:cnpg error: --force cannot be used with --server-side
my-project create_deployments: error deploying cnpg: error: --force cannot be used with --server-side
my-project  error executing 'kubectl --context rancher-desktop apply --force -f - --server-side': 
my-project Please make sure the command `kubectl apply` does work locally with manifest `https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.1.yaml`

What did you expect to happen instead?
I would like to use a server-side apply when I set --server-side flag.

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

version: v2beta1
name: my-project

pipelines:
  dev:
    run: |-
      create_deployments --all

deployments:
  cnpg:
    kubectl:
      applyArgs:
        - "--server-side"
      manifests:
        - https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.23/releases/cnpg-1.23.1.yaml

Local Environment:

  • DevSpace Version: 6.3.11
  • Operating System: mac
  • ARCH of the OS: ARM64
    Kubernetes Cluster:
  • Provider: Rancher desktop
  • Kubernetes Version:
    Client Version: v1.28.9
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.28.4+k3s2

Anything else we need to know?

@mwienk mwienk added the kind/bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant