Skip to content

Commit

Permalink
chore: remove addon snapshot-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
wusai80 committed Feb 7, 2025
1 parent e43456f commit dbd3d4c
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 182 deletions.
1 change: 0 additions & 1 deletion deploy/helm/scripts/change_kb_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ addons=(
"postgresql"
"qdrant"
"redis"
"snapshot-controller"
)

for addon in "${addons[@]}"; do
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/templates/addons/apecloud-mysql-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name" "apecloud-mysql"
"version" "1.0.0-alpha.0"
"model" "RDBMS"
"provider" "apecloud"
"provider" "community"
"description" "ApeCloud MySQL is a database that is compatible with MySQL syntax and achieves high availability through the utilization of the RAFT consensus protocol."
"autoInstall" true ) .) -}}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/templates/addons/etcd-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name" "etcd"
"version" "1.0.0-alpha.0"
"model" "key-value"
"provider" "apecloud"
"provider" "community"
"description" "etcd is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system or cluster of machines."
"autoInstall" true ) .) -}}
{{- end }}
2 changes: 1 addition & 1 deletion deploy/helm/templates/addons/mongodb-addon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name" "mongodb"
"version" "1.0.0-alpha.0"
"model" "document"
"provider" "apecloud"
"provider" "community"
"description" "MongoDB is a document database designed for ease of application development and scaling."
"autoInstall" true) . ) -}}
{{- end }}
95 changes: 0 additions & 95 deletions deploy/helm/templates/applications/snapshot-controller-addon.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions deploy/helm/templates/applications/snapshot-controller-values.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,48 +496,6 @@ autoInstalledAddons:
- "qdrant"
- "redis"
- "rabbitmq"
- "snapshot-controller"

### snapshot-controller settings
### ref: https://artifacthub.io/packages/helm/piraeus-charts/snapshot-controller#configuration
###
snapshot-controller:
## @param snapshot-controller.enabled -- Enable snapshot-controller chart.
##
enabled: true
## @param snapshot-controller.replicaCount -- Number of replicas to deploy.
##
replicaCount: 1
## snapshot-controller image setting, easy access for CN users.
## @param snapshot-controller.image.repository -- Repository to pull the image from.
##
image:
# If the value of snapshot-controller.image.repository is not specified using --set,
# it will be set to the value of '${image.registry}/apecloud/snapshot-controller'.
repository: ""
tag: v6.2.1

tolerations:
- key: kb-controller
operator: Equal
value: "true"
effect: NoSchedule

volumeSnapshotClasses:
- name: default-vsc
driver: hostpath.csi.k8s.io
deletionPolicy: Delete

affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: kb-controller
operator: In
values:
- "true"

## k8s cluster feature gates, ref: https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/
enabledAlphaFeatureGates:
Expand Down
81 changes: 67 additions & 14 deletions docs/user_docs/installation/install-kubeblocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ To try out KubeBlocks on your local host, you can use the [Playground](./../try-

- Note that you install and uninstall KubeBlocks with the same tool. For example, if you install KubeBlocks with Helm, to uninstall it, you have to use Helm too.
- Make sure you have [kubectl](https://kubernetes.io/docs/tasks/tools/), [Helm](https://helm.sh/docs/intro/install/), or [kbcli](./install-kbcli.md) installed.
- Make sure you have Snapshot Controller installed before installing KubeBlocks. If you haven't installed it, follow the steps in section [Install Snapshot Controller](#install-snapshot-controller) to install it.

:::

Expand Down Expand Up @@ -53,6 +54,67 @@ To try out KubeBlocks on your local host, you can use the [Playground](./../try-
</tr>
</table>

## Install Snapshot Controller

The SnapshotController is a Kubernetes component that manages CSI Volume Snapshots, enabling users to create, restore, and delete snapshots of Persistent Volumes (PVs). KubeBlocks Dataprotection Controller uses the Snapshot Controller to create and manage snapshots for databases.

If your Kubernetes cluster does NOT have the following CRDs, you likely also do not have a snapshot controller deployed and you need to install one.

```bash
kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io
kubectl get crd volumesnapshots.snapshot.storage.k8s.io
kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io
```

:::note

If you are sure you don't need the snapshot backup feature, you can install only the SnapshotController CRD and skip steps 1 and 2.

```bash
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/v8.2.0/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
```

:::

### Step 1. Deploy Snapshot Controller

You can install the Snapshot Controller using Helm or kubectl. Here are the steps to install the Snapshot Controller using Helm.

```bash
helm repo add piraeus-charts https://piraeus.io/helm-charts/
helm repo update
# Update the namespace to an appropriate value for your environment (e.g. kb-system)
helm install snapshot-controller piraeus-charts/snapshot-controller -n kb-system --create-namespace
```

For more information, please refer to [Snapshot Controller Configuration](https://artifacthub.io/packages/helm/piraeus-charts/snapshot-controller#configuration).

### Step 2. Verify Snapshot Controller installation

Check if the snapshot-controller Pod is running:

```bash
kubectl get pods -n kb-system | grep snapshot-controller
```

<details>

<summary>Output</summary>

```bash
snapshot-controller-xxxx-yyyy 1/1 Running 0 30s
```

</details>

If the pod is in a CrashLoopBackOff state, check logs:

```bash
kubectl logs -n kb-system deployment/snapshot-controller
```

## Installation steps

<Tabs>
Expand All @@ -64,11 +126,11 @@ Follow these steps to install KubeBlocks using Helm.
1. Get the KubeBlocks version:

* Option A - Get the latest stable version (e.g., v0.9.2):

```bash
curl -s "https://api.github.com/repos/apecloud/kubeblocks/releases?per_page=100&page=1" | jq -r '.[] | select(.prerelease == false) | .tag_name' | sort -V -r | head -n 1
```

* Option B - View all available versions (including alpha and beta releases):
* Visit the [KubeBlocks Releases](https://github.com/apecloud/kubeblocks/releases).
* Or use the command:
Expand All @@ -81,7 +143,7 @@ Follow these steps to install KubeBlocks using Helm.
```bash
# Replace <VERSION> with your selected version
kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/<VERSION>/kubeblocks_crds.yaml
# Example: If the version is v0.9.2
kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/v0.9.2/kubeblocks_crds.yaml
```
Expand Down Expand Up @@ -148,7 +210,7 @@ Like any other resource in Kubernetes, KubeBlocks can be installed through a YAM
```bash
# Replace <VERSION> with your selected version
kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/<VERSION>/kubeblocks_crds.yaml
# Example: If the version is v0.9.2
kubectl create -f https://github.com/apecloud/kubeblocks/releases/download/v0.9.2/kubeblocks_crds.yaml
```
Expand Down Expand Up @@ -205,7 +267,7 @@ If you want to install KubeBlocks with a specified version, follow the steps bel
By default, when installing KubeBlocks, kbcli installs the corresponding version of KubeBlocks. It's important to ensure the major versions of kbcli and KubeBlocks are the same, if you specify a different version explicitly here.
For example, you can install kbcli v0.9.2 with KubeBlocks v0.9.1, but using mismatched major versions, such as kbcli v0.9.2 with KubeBlocks v1.0.0, may lead to errors.
:::
</TabItem>
Expand All @@ -230,16 +292,8 @@ If the KubeBlocks Workloads are all ready, KubeBlocks has been installed success
```bash
NAME READY STATUS RESTARTS AGE
alertmanager-webhook-adaptor-8dfc4878d-svzrc 2/2 Running 0 3m56s
grafana-77dfd6959-4gnhp 1/1 Running 0 3m56s
kb-addon-snapshot-controller-546f84b78d-8rjs4 1/1 Running 0 3m56s
kubeblocks-7cf7745685-ddlwk 1/1 Running 0 4m39s
kubeblocks-dataprotection-95fbc79cc-b544l 1/1 Running 0 4m39s
prometheus-alertmanager-5c9fc88996-qltrk 2/2 Running 0 3m56s
prometheus-kube-state-metrics-5dbbf757f5-db9v6 1/1 Running 0 3m56s
prometheus-node-exporter-r6kvl 1/1 Running 0 3m56s
prometheus-pushgateway-8555888c7d-xkgfc 1/1 Running 0 3m56s
prometheus-server-5759b94fc8-686xp 2/2 Running 0 3m56s
```
</TabItem>
Expand All @@ -259,7 +313,6 @@ KubeBlocks is deployed in namespace: kb-system, version: <VERSION>
>
KubeBlocks Workloads:
NAMESPACE KIND NAME READY PODS CPU(CORES) MEMORY(BYTES) CREATED-AT
kb-system Deployment kb-addon-snapshot-controller 1/1 N/A N/A Oct 13,2023 14:27 UTC+0800
kb-system Deployment kubeblocks 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800
kb-system Deployment kubeblocks-dataprotection 1/1 N/A N/A Oct 13,2023 14:26 UTC+0800
```
Expand Down
Loading

0 comments on commit dbd3d4c

Please sign in to comment.