Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons
Submodule addons updated 34 files
+1 −0 .github/workflows/auto-sync-addons-cr.yml
+1 −1 addons/apecloud-mysql/config/mysql8-auditlog-config.tpl
+1 −1 addons/apecloud-mysql/config/mysql8-config.tpl
+1 −1 addons/apecloud-mysql/values.yaml
+64 −62 addons/kafka/opsdefinitions/quota.yaml
+51 −49 addons/kafka/opsdefinitions/topic.yaml
+67 −64 addons/kafka/opsdefinitions/useracl.yaml
+1 −1 addons/mogdb/templates/backuppolicytemplate.yaml
+1 −1 addons/mogdb/templates/swithover.yaml
+2 −0 addons/mysql/dataprotection/restore.sh
+8 −1 addons/mysql/templates/actionset-volumesnapshot.yaml
+7 −1 addons/mysql/templates/actionset-xtrabackup.yaml
+12 −2 addons/mysql/templates/clusterversion.yaml
+7 −1 addons/postgresql/config/pg12-config-constraint.cue
+3 −1 addons/postgresql/config/pg12-config.tpl
+7 −1 addons/postgresql/config/pg14-config-constraint.cue
+3 −1 addons/postgresql/config/pg14-config.tpl
+1 −1 addons/postgresql/config/pgbouncer-ini.tpl
+1 −1 addons/postgresql/templates/actionset-pgbasebackup.yaml
+1 −1 addons/postgresql/templates/actionset-postgresql-pitr.yaml
+5 −5 addons/postgresql/templates/backuppolicytemplate.yaml
+16 −16 addons/postgresql/templates/clusterversion.yaml
+5 −5 addons/postgresql/templates/componentdefinition-12.yaml
+5 −5 addons/postgresql/templates/componentdefinition-14.yaml
+1 −1 addons/postgresql/values.yaml
+2 −0 addons/qdrant-cluster/templates/cluster.yaml
+70 −0 addons/qdrant/scripts/qdrant-member-leave.sh
+2 −2 addons/qdrant/scripts/qdrant-setup.sh
+1 −16 addons/qdrant/templates/clusterdefinition.yaml
+0 −8 addons/qdrant/templates/clusterversion.yaml
+143 −0 addons/qdrant/templates/componentdefinition.yaml
+3 −1 addons/qdrant/templates/scripts.yaml
+3 −4 addons/qdrant/values.yaml
+1 −1 addons/redis/config/redis7-config.tpl
1 change: 1 addition & 0 deletions docs/user_docs/cli/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Run a benchmark.
* [kbcli bench redis-benchmark](kbcli_bench_redis-benchmark.md) - Run redis-benchmark on a cluster
* [kbcli bench sysbench](kbcli_bench_sysbench.md) - run a SysBench benchmark
* [kbcli bench tpcc](kbcli_bench_tpcc.md) - Run tpcc benchmark
* [kbcli bench tpcds](kbcli_bench_tpcds.md) - Run TPC-DS benchmark
* [kbcli bench tpch](kbcli_bench_tpch.md) - Run tpch benchmark
* [kbcli bench ycsb](kbcli_bench_ycsb.md) - Run YCSB benchmark on a cluster

Expand Down
1 change: 1 addition & 0 deletions docs/user_docs/cli/kbcli_bench.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Run a benchmark.
* [kbcli bench redis-benchmark](kbcli_bench_redis-benchmark.md) - Run redis-benchmark on a cluster
* [kbcli bench sysbench](kbcli_bench_sysbench.md) - run a SysBench benchmark
* [kbcli bench tpcc](kbcli_bench_tpcc.md) - Run tpcc benchmark
* [kbcli bench tpcds](kbcli_bench_tpcds.md) - Run TPC-DS benchmark
* [kbcli bench tpch](kbcli_bench_tpch.md) - Run tpch benchmark
* [kbcli bench ycsb](kbcli_bench_ycsb.md) - Run YCSB benchmark on a cluster

Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_bench_pgbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench pgbench [Step] [BenchmarkName] [flags]
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx

# pgbench run on a cluster, but with cpu and memory limits set
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx --cpu 1 --memory 1Gi
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx --limit-cpu 1 --limit-memory 1Gi

# pgbench run on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench pgbench cleanup mytest --cluster pgcluster --database postgres --user xxx --password xxx
Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_bench_redis-benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench redis-benchmark [flags]
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --password xxx

# redis-benchmark run on a cluster, but with cpu and memory limits set
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --cpu 1 --memory 1Gi --password xxx
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --limit-cpu 1 --limit-memory 1Gi --password xxx

# redis-benchmark run on a cluster, just test set/get
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --tests set,get --password xxx
Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_bench_sysbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench sysbench [Step] [BenchmarkName] [flags]
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb

# sysbench on a cluster, but with cpu and memory limits set
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# sysbench run on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench sysbench cleanup mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_bench_tpcc.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench tpcc [Step] [BenchmarkName] [flags]
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb

# tpcc on a cluster, but with cpu and memory limits set
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# tpcc on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench tpcc cleanup mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand Down
72 changes: 72 additions & 0 deletions docs/user_docs/cli/kbcli_bench_tpcds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: kbcli bench tpcds
---

Run TPC-DS benchmark

```
kbcli bench tpcds [Step] [Benchmark] [flags]
```

### Examples

```
# tpcds on a cluster, that will exec for all steps, cleanup, prepare and run
kbcli bench tpcds mytest --cluster mycluster --user xxx --password xxx --database mydb

# tpcds on a cluster, but with cpu and memory limits set
kbcli bench tpcds mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# tpcds on a cluster with 10GB data
kbcli bench tpcds mytest --cluster mycluster --user xxx --password xxx --database mydb --size 10
```

### Options

```
--cluster string the cluster of database
--database string database name
--driver string the driver of database
--extra-args strings extra arguments for benchmark
-h, --help help for tpcds
--host string the host of database
--limit-cpu string the limit cpu of benchmark
--limit-memory string the limit memory of benchmark
--password string the password of database
--port int the port of database
--request-cpu string the request cpu of benchmark
--request-memory string the request memory of benchmark
--size int specify the scale factor of the benchmark, 1 means 1GB data (default 1)
--tolerations strings Tolerations for benchmark, such as '"dev=true:NoSchedule,large=true:NoSchedule"'
--use-key specify whether to create pk and fk, it will take extra time to create the keys
--user string the user of database
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
```

### SEE ALSO

* [kbcli bench](kbcli_bench.md) - Run a benchmark.

#### Go Back to [CLI Overview](cli.md) Homepage.

3 changes: 2 additions & 1 deletion docs/user_docs/cli/kbcli_bench_tpch.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench tpch [Step] [BenchmarkName] [flags]
kbcli bench tpch mytest --cluster mycluster --user xxx --password xxx --database mydb

# tpch on a cluster, but with cpu and memory limits set
kbcli bench tpch mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench tpch mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# tpch on a cluster with run, just run by running the test
kbcli bench tpch run mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand All @@ -36,6 +36,7 @@ kbcli bench tpch [Step] [BenchmarkName] [flags]
--port int the port of database
--request-cpu string the request cpu of benchmark
--request-memory string the request memory of benchmark
--size int specify the overall database size scaling parameter, 1 means 1GB (default 1)
--tolerations strings Tolerations for benchmark, such as '"dev=true:NoSchedule,large=true:NoSchedule"'
--user string the user of database
```
Expand Down
2 changes: 1 addition & 1 deletion docs/user_docs/cli/kbcli_bench_ycsb.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ kbcli bench ycsb [Step] [BenchmarkName] [flags]
kbcli bench ycsb mytest --cluster mycluster --user xxx --password xxx --database mydb

# ycsb on a cluster, but with cpu and memory limits set
kbcli bench ycsb mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench ycsb mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# ycsb on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench ycsb cleanup mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand Down
66 changes: 66 additions & 0 deletions docs/user_docs/cli/kbcli_cluster_rebuild-instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: kbcli cluster rebuild-instance
---

Rebuild the specified instances in the cluster.

```
kbcli cluster rebuild-instance NAME [flags]
```

### Examples

```
# rebuild instance without backup
kbcli cluster rebuild-instance mycluster --instances pod1,pod2

# rebuild instance from backup
kbcli cluster rebuild-instance mycluster --instances pod1,pod2 --backupName <backup>
```

### Options

```
--auto-approve Skip interactive approval before rebuilding the instances.gi
--backup string instances will be rebuild by the specified backup.
--dry-run string[="unchanged"] Must be "client", or "server". If with client strategy, only print the object that would be sent, and no data is actually sent. If with server strategy, submit the server-side request, but no data is persistent. (default "none")
--env stringArray provide the necessary env for the 'Restore' operation from the backup. format: key1=value, key2=value
--force skip the pre-checks of the opsRequest to run the opsRequest forcibly
-h, --help help for rebuild-instance
--instance strings instance which need to rebuild.
--name string OpsRequest name. if not specified, it will be randomly generated
--node strings specified the target node which rebuilds the instance on the node otherwise will rebuild on a randon node. format: insName1=nodeName,insName2=nodeName
-o, --output format Prints the output in the specified format. Allowed values: JSON and YAML (default yaml)
--ttlSecondsAfterSucceed int Time to live after the OpsRequest succeed
```

### Options inherited from parent commands

```
--as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
--as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
--as-uid string UID to impersonate for the operation.
--cache-dir string Default cache directory (default "$HOME/.kube/cache")
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--disable-compression If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
```

### SEE ALSO

* [kbcli cluster](kbcli_cluster.md) - Cluster command.

#### Go Back to [CLI Overview](cli.md) Homepage.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
cuelang.org/go v0.8.0
github.com/99designs/keyring v1.2.2
github.com/Masterminds/semver/v3 v3.2.1
github.com/apecloud/kubebench v0.0.0-20240313105909-ba8654f654fc
github.com/apecloud/kubebench v0.0.0-20240327101848-6a031d3f4ebe
github.com/apecloud/kubeblocks v0.9.0-beta.1
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/benbjohnson/clock v1.3.5
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM=
github.com/apecloud/kubebench v0.0.0-20240313105909-ba8654f654fc h1:BkFyEBEmDMdDhkWNAs9yg6zAj7xZjWON2u8b265T2a8=
github.com/apecloud/kubebench v0.0.0-20240313105909-ba8654f654fc/go.mod h1:5IZiDkFdgiZRGLsL+FOlvPsiF9LbyU55DVj4/5vT7+4=
github.com/apecloud/kubebench v0.0.0-20240327101848-6a031d3f4ebe h1:OFkCAToRcNt0VqgCndw0mw1Ke3P2XgRJLrXsNOyc3sQ=
github.com/apecloud/kubebench v0.0.0-20240327101848-6a031d3f4ebe/go.mod h1:5IZiDkFdgiZRGLsL+FOlvPsiF9LbyU55DVj4/5vT7+4=
github.com/apecloud/kubeblocks v0.9.0-beta.1 h1:spCqfGH53vXVQhrvemZeSGJpx+D60TJ36PGVJvCXENQ=
github.com/apecloud/kubeblocks v0.9.0-beta.1/go.mod h1:l2pwRoBU560naATQrKe6/jaWU4JGg3TWGwQ2GcrpC5c=
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/bench/bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func NewBenchCmd(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.C
NewPgBenchCmd(f, streams),
NewYcsbCmd(f, streams),
NewTpccCmd(f, streams),
NewTpcdsCmd(f, streams),
NewTpchCmd(f, streams),
NewRedisBenchmarkCmd(f, streams),
newListCmd(f, streams),
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/bench/pgbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var pgbenchExample = templates.Examples(`
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx

# pgbench run on a cluster, but with cpu and memory limits set
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx --cpu 1 --memory 1Gi
kbcli bench pgbench mytest --cluster pgcluster --database postgres --user xxx --password xxx --limit-cpu 1 --limit-memory 1Gi

# pgbench run on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench pgbench cleanup mytest --cluster pgcluster --database postgres --user xxx --password xxx
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/bench/redis-benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var redisBenchExample = templates.Examples(`
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --password xxx

# redis-benchmark run on a cluster, but with cpu and memory limits set
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --cpu 1 --memory 1Gi --password xxx
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --limit-cpu 1 --limit-memory 1Gi --password xxx

# redis-benchmark run on a cluster, just test set/get
kbcli bench redis-benchmark mytest --cluster rediscluster --clients 50 --requests 10000 --tests set,get --password xxx
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/bench/sysbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var sysbenchExample = templates.Examples(`
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb

# sysbench on a cluster, but with cpu and memory limits set
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench sysbench mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# sysbench run on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench sysbench cleanup mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/bench/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var tpccExample = templates.Examples(`
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb

# tpcc on a cluster, but with cpu and memory limits set
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb --cpu 1 --memory 1Gi
kbcli bench tpcc mytest --cluster mycluster --user xxx --password xxx --database mydb --limit-cpu 1 --limit-memory 1Gi

# tpcc on a cluster with cleanup, only cleanup by deleting the testdata
kbcli bench tpcc cleanup mytest --cluster mycluster --user xxx --password xxx --database mydb
Expand Down
Loading