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

docs: add 0.9.1 upgrade guides and update related commands in 0.9.0 #8262

Merged
merged 10 commits into from
Oct 18, 2024

Conversation

michelle-0808
Copy link
Contributor

No description provided.

@michelle-0808 michelle-0808 self-assigned this Oct 11, 2024
@github-actions github-actions bot added the size/L Denotes a PR that changes 100-499 lines. label Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.85%. Comparing base (00ad81b) to head (0a474c2).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8262      +/-   ##
==========================================
+ Coverage   61.32%   62.85%   +1.53%     
==========================================
  Files         348      353       +5     
  Lines       40357    42568    +2211     
==========================================
+ Hits        24749    26757    +2008     
- Misses      13371    13504     +133     
- Partials     2237     2307      +70     
Flag Coverage Δ
unittests 62.85% <ø> (+1.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


## Upgrade from KubeBlocks v0.9.0

1. Set keepAddons.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Preserve Addon resources during upgrade"?

Copy link
Contributor Author

@michelle-0808 michelle-0808 Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Preserve Addon resources during upgrade"?

Great suggestion! I've added this sentence as the purpose of step 1 in the section "Upgrade from KubeBlocks v0.8" and adjusted related contents in the upgrade guide for v0.9.0.
For the section "Upgrade from v0.9.0", the description is a little different since keepAddon is set as true by default in Helm. Users just need to check its value. But crd.enabled should be set as false to avoid automatic CRD installation.

Copy link
Collaborator

@ldming ldming Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crd.enabled can be set when upgrade kubeblocks. For preserve addon resource, recommend to run follow command:

kubectl annotate addons.extensions.kubeblocks.io -l app.kubernetes.io/name=kubeblocks helm.sh/resource-policy=keep

If you want to add the annotation for a specified Addon, replace `{addonName}` with the actual Addon name and run the command below.

```bash
kubectl annotate http://addons.extensions.kubeblocks.io {addonName} helm.sh/resource-policy=keep
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http?

Fixed.

kubectl annotate http://addons.extensions.kubeblocks.io {addonName} helm.sh/resource-policy=keep
```

If you want to check whether the annotation for an Addon was added succeddfully, replace `{addonName}` with the actual Addon name and run the command below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"succeddfully"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"succeddfully"

Fixed.

kubectl get addon -o json | jq '.items[] | {name: .metadata.name, annotations: .metadata.annotations}'
```

### Manually add an annotation for an Addon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "for Addons"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "for Addons"

Fixed.

```shell
kubectl replace -f https://github.com/apecloud/kubeblocks/releases/download/v0.9.0/kubeblocks_crds.yaml
```bash
kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/v0.9.0/dataprotection.kubeblocks.io_storageproviders.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why install this CRD only?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why install this CRD only?

The upgrade process only requires installing this CRD and the process will handle the others.

kbcli addon index update kubeblocks

kbcli addon upgrade xxx --force
#Search available Addon versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"# Search"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"# Search"

Fixed.

@apecloud-bot apecloud-bot added the approved PR Approved Test label Oct 18, 2024
@github-actions github-actions bot removed the size/L Denotes a PR that changes 100-499 lines. label Oct 18, 2024
@apecloud-bot apecloud-bot removed the approved PR Approved Test label Oct 18, 2024
@github-actions github-actions bot added the size/XL Denotes a PR that changes 500-999 lines. label Oct 18, 2024
@apecloud-bot apecloud-bot added the approved PR Approved Test label Oct 18, 2024
@michelle-0808 michelle-0808 merged commit 99c14f5 into main Oct 18, 2024
35 checks passed
@michelle-0808 michelle-0808 deleted the support/add-0.9.0-upgrade-guide branch October 18, 2024 03:55
@github-actions github-actions bot added this to the Release 0.9.2 milestone Oct 18, 2024
michelle-0808 added a commit that referenced this pull request Oct 18, 2024
```bash
kubectl get addon -o json | jq '.items[] | {name: .metadata.name, annotations: .metadata.annotations}'
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend to use the following command for a more concise output

kubectl get addon -o json | jq '.items[] | {name: .metadata.name, resource_policy: .metadata.annotations["helm.sh/resource-policy"]}'

If you want to check whether the annotation for an Addon was added successfully, replace `{addonName}` with the actual Addon name and run the command below.

```bash
kubectl get addon {addonName} -o json | jq '{name: .metadata.name, annotations: .metadata.annotations}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kubectl get addon {addonName} -o json | jq '{name: .metadata.name, resource_policy: .metadata.annotations["helm.sh/resource-policy"]}'


# Update helm repo
helm repo update

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to add command to search the addon available versions:

helm search repo kubeblocks-addons/{addon-name} --versions --devel 

follow update command will specify the chart version x.y.z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR Approved Test size/XL Denotes a PR that changes 500-999 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants