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

[BUG] Patch an addon upgraded from 0.8 does not work #7982

Open
shanshanying opened this issue Aug 15, 2024 · 4 comments · May be fixed by apecloud/kbcli#433
Open

[BUG] Patch an addon upgraded from 0.8 does not work #7982

shanshanying opened this issue Aug 15, 2024 · 4 comments · May be fixed by apecloud/kbcli#433
Assignees
Labels
kind/bug Something isn't working test
Milestone

Comments

@shanshanying
Copy link
Contributor

Describe the bug
Patching an addon, upgraded from KB0.8, will fail.

To Reproduce
Steps to reproduce the behavior:

  1. install KB 0.8
  2. kbcli addon enable milvus
  3. upgrade to KB 0.9
  4. KB is working as expected
  5. patch milvus addon by kbcli addon enable milvus --set images.milvus.repository=test.io
    the intention of this issue is to update milvus' images defined in ClusterDefinition milvus-2.3.2
  6. an addon upgrade job is created, the job will perform helm upgrad -i command
  7. and we foud the upgrade configconstratint is nil

Screenshots
image

Quick fix
to patch the ConfigConstraint's fileFormatConfig api:

k patch cc milvus-config-template-2.3.2 -p '{"spec":{"fileFormatConfig":{"format":"yaml"}}}' --type merge

When upgrading from KB 08 to KB09, KubeBlocks will perform an upgrading job and converting existing CR's into KB09 compatible formats.
But the addon is not aware of this. When there is an update applied to the Addon cr, Addon Controller will do a helm upgrade, using KB 08's Addon Version.

@shanshanying shanshanying added the kind/bug Something isn't working label Aug 15, 2024
@shanshanying
Copy link
Contributor Author

shanshanying commented Aug 15, 2024

we'd better validat if the Addon can be updated (e.g. in kbcli

@sophon-zt
Copy link
Contributor

To update parameters in this way, you need to upgrade the addon version first.

Discussing with @shanshanying , we can add an interception for kbcli to prevent users from updating parameters.

@shanshanying shanshanying added this to the Release 0.9.1 milestone Aug 27, 2024
@shanshanying
Copy link
Contributor Author

@ahjing99 we used Webhook conversion to support multi-version APIs. shoud enable webhook to make sure multi-version ConfigConstraints works (both v1alpha1 and v1beta1 works).

@sophon-zt
Copy link
Contributor

It is best to consider the multi-version of 1.0 and use the same upgrade strategy. In version 1.0, more crds have multiple versions, which is more likely to cause problems.

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 test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants