diff --git a/Makefile b/Makefile index 640eb96e2e4..44a736f8d63 100644 --- a/Makefile +++ b/Makefile @@ -680,6 +680,30 @@ else ifeq ($(TEST_TYPE), polardbx) $(HELM) dependency build deploy/polardbx-cluster --skip-refresh $(HELM) upgrade --install polardbx deploy/polardbx $(HELM) template pxc deploy/polardbx-cluster > test/e2e/testdata/smoketest/polardbx/00_polardbxcluster.yaml +else ifeq ($(TEST_TYPE), opensearch) + $(HELM) dependency build deploy/opensearch-cluster --skip-refresh + $(HELM) upgrade --install opensearch deploy/opensearch + $(HELM) template opensearch-cluster deploy/opensearch-cluster > test/e2e/testdata/smoketest/opensearch/00_opensearchcluster.yaml +else ifeq ($(TEST_TYPE), elasticsearch) + $(HELM) dependency build deploy/elasticsearch-cluster --skip-refresh + $(HELM) upgrade --install elasticsearch deploy/elasticsearch + $(HELM) template elasticsearch-cluster deploy/elasticsearch-cluster > test/e2e/testdata/smoketest/elasticsearch/00_elasticsearchcluster.yaml +else ifeq ($(TEST_TYPE), llm) + $(HELM) dependency build deploy/llm-cluster --skip-refresh + $(HELM) upgrade --install llm deploy/llm + $(HELM) template llm-cluster deploy/llm-cluster > test/e2e/testdata/smoketest/llm/00_llmcluster.yaml +else ifeq ($(TEST_TYPE), tdengine) + $(HELM) dependency build deploy/tdengine-cluster --skip-refresh + $(HELM) upgrade --install tdengine deploy/tdengine + $(HELM) template td-cluster deploy/tdengine-cluster > test/e2e/testdata/smoketest/tdengine/00_tdenginecluster.yaml +else ifeq ($(TEST_TYPE), milvus) + $(HELM) dependency build deploy/milvus-cluster --skip-refresh + $(HELM) upgrade --install milvus deploy/milvus + $(HELM) template milvus-cluster deploy/milvus-cluster > test/e2e/testdata/smoketest/milvus/00_milvuscluster.yaml +else ifeq ($(TEST_TYPE), clickhouse) + $(HELM) dependency build deploy/clickhouse-cluster --skip-refresh + $(HELM) upgrade --install clickhouse deploy/clickhouse + $(HELM) template c-cluster deploy/clickhouse-cluster > test/e2e/testdata/smoketest/clickhouse/00_clickhousecluster.yaml else $(error "test type does not exist") endif @@ -731,6 +755,16 @@ else ifeq ($(TEST_TYPE), mysql-57) $(HELM) upgrade --install mysql deploy/mysql else ifeq ($(TEST_TYPE), polardbx) $(HELM) upgrade --install polardbx deploy/polardbx +else ifeq ($(TEST_TYPE), opensearch) + $(HELM) upgrade --install opensearch deploy/opensearch +else ifeq ($(TEST_TYPE), elasticsearch) + $(HELM) upgrade --install elasticsearch deploy/elasticsearch +else ifeq ($(TEST_TYPE), llm) + $(HELM) upgrade --install llm deploy/llm +else ifeq ($(TEST_TYPE), milvus) + $(HELM) upgrade --install milvus deploy/milvus +else ifeq ($(TEST_TYPE), clickhouse) + $(HELM) upgrade --install milvus deploy/clickhouse else $(error "test type does not exist") endif diff --git a/test/e2e/testdata/smoketest/clickhouse/00_clickhousecluster.yaml b/test/e2e/testdata/smoketest/clickhouse/00_clickhousecluster.yaml new file mode 100644 index 00000000000..a5c15d1353a --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/00_clickhousecluster.yaml @@ -0,0 +1,94 @@ +--- +# Source: clickhouse-cluster/templates/rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kb-c-cluster + namespace: default + labels: + helm.sh/chart: clickhouse-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "22.9.4" + app.kubernetes.io/instance: c-cluster +--- +# Source: clickhouse-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kb-c-cluster + labels: + helm.sh/chart: clickhouse-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "22.9.4" + app.kubernetes.io/instance: c-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-volume-protection-pod-role +subjects: + - kind: ServiceAccount + name: kb-c-cluster + namespace: default +--- +# Source: clickhouse-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kb-c-cluster + labels: + helm.sh/chart: clickhouse-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "22.9.4" + app.kubernetes.io/instance: c-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-cluster-pod-role +subjects: + - kind: ServiceAccount + name: kb-c-cluster + namespace: default +--- +# Source: clickhouse-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: c-cluster-clickhouse-cluster + labels: + helm.sh/chart: clickhouse-cluster-0.7.0-alpha.0 + app.kubernetes.io/name: clickhouse-cluster + app.kubernetes.io/instance: c-cluster + app.kubernetes.io/version: "22.9.4" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: clickhouse # ref clusterdefinition.name + clusterVersionRef: clickhouse-22.9.4 # ref clusterversion.name + terminationPolicy: Halt + affinity: + topologyKeys: + - kubernetes.io/hostname + componentSpecs: + - name: shard-0 + componentDefRef: clickhouse + monitor: false + serviceType: ClusterIP + replicas: 2 + serviceAccountName: kb-c-cluster-clickhouse-cluster +--- +# Source: clickhouse-cluster/templates/tests/test-connection.yaml +apiVersion: v1 +kind: Pod +metadata: + name: "c-cluster-clickhouse-cluster-test-connection" + labels: + helm.sh/chart: clickhouse-cluster-0.7.0-alpha.0 + app.kubernetes.io/name: clickhouse-cluster + app.kubernetes.io/instance: c-cluster + app.kubernetes.io/version: "22.9.4" + app.kubernetes.io/managed-by: Helm + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['c-cluster-clickhouse-cluster:'] + restartPolicy: Never diff --git a/test/e2e/testdata/smoketest/clickhouse/00_milvuscluster.yaml b/test/e2e/testdata/smoketest/clickhouse/00_milvuscluster.yaml new file mode 100644 index 00000000000..219cf3ebb97 --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/00_milvuscluster.yaml @@ -0,0 +1,57 @@ +--- +# Source: milvus-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: milvus-cluster + labels: + helm.sh/chart: milvus-cluster-0.7.0-alpha.0 + app.kubernetes.io/name: milvus-cluster + app.kubernetes.io/instance: milvus-cluster + app.kubernetes.io/version: "2.2.4" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: milvus # ref clusterdefinition.name + clusterVersionRef: milvus-2.2.4 # ref clusterversion.name + terminationPolicy: Delete + affinity: + componentSpecs: + - name: milvus # user-defined + componentDefRef: milvus # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + - name: etcd # user-defined + componentDefRef: etcd # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + - name: minio # user-defined + componentDefRef: minio # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/test/e2e/testdata/smoketest/clickhouse/01_vscale.yaml b/test/e2e/testdata/smoketest/clickhouse/01_vscale.yaml new file mode 100644 index 00000000000..5c13b64a5d8 --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-vscale- +spec: + clusterRef: milvus-cluster + type: VerticalScaling + verticalScaling: + - componentName: milvus + requests: + cpu: "500m" + memory: 500Mi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/clickhouse/02_hscale_out.yaml b/test/e2e/testdata/smoketest/clickhouse/02_hscale_out.yaml new file mode 100644 index 00000000000..32020e51fba --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/02_hscale_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-hscale-out- +spec: + clusterRef: milvus-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: milvus + replicas: 2 + - componentName: minio + replicas: 2 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/clickhouse/03_hscale_in.yaml b/test/e2e/testdata/smoketest/clickhouse/03_hscale_in.yaml new file mode 100644 index 00000000000..f70b1dfaca5 --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/03_hscale_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-hscale-in- +spec: + clusterRef: milvus-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: milvus + replicas: 1 + - componentName: minio + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/clickhouse/04_vexpand.yaml b/test/e2e/testdata/smoketest/clickhouse/04_vexpand.yaml new file mode 100644 index 00000000000..f6a02fb6940 --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/04_vexpand.yaml @@ -0,0 +1,20 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-vexpand- +spec: + clusterRef: milvus-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: milvus + volumeClaimTemplates: + - name: data + storage: "15Gi" + - componentName: etcd + volumeClaimTemplates: + - name: data + storage: "15Gi" + - componentName: minio + volumeClaimTemplates: + - name: data + storage: "15Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/clickhouse/05_stop.yaml b/test/e2e/testdata/smoketest/clickhouse/05_stop.yaml new file mode 100644 index 00000000000..08864547266 --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/05_stop.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-stop- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio diff --git a/test/e2e/testdata/smoketest/clickhouse/06_start.yaml b/test/e2e/testdata/smoketest/clickhouse/06_start.yaml new file mode 100644 index 00000000000..06898bff2fa --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/06_start.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-start- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/clickhouse/07_restart.yaml b/test/e2e/testdata/smoketest/clickhouse/07_restart.yaml new file mode 100644 index 00000000000..2e47ee88dac --- /dev/null +++ b/test/e2e/testdata/smoketest/clickhouse/07_restart.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-restart- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/00_elasticsearchcluster.yaml b/test/e2e/testdata/smoketest/elasticsearch/00_elasticsearchcluster.yaml new file mode 100644 index 00000000000..725fe6137f0 --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/00_elasticsearchcluster.yaml @@ -0,0 +1,37 @@ +--- +# Source: elasticsearch-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: elasticsearch-cluster + labels: + helm.sh/chart: elasticsearch-cluster-0.1.0 + app.kubernetes.io/name: elasticsearch-cluster + app.kubernetes.io/instance: elasticsearch-cluster + app.kubernetes.io/version: "8.8.0" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: elasticsearch # ref clusterdefinition.name + clusterVersionRef: elasticsearch-8.8.0 # ref clusterversion.name + terminationPolicy: Delete + affinity: + topologyKeys: + - kubernetes.io/hostname + componentSpecs: + - name: elasticsearch # user-defined + componentDefRef: elasticsearch # ref clusterdefinition componentDefs.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + + - name: metrics # user-defined + componentDefRef: metrics # ref clusterdefinition componentDefs.name + replicas: 1 diff --git a/test/e2e/testdata/smoketest/elasticsearch/01_vscale.yaml b/test/e2e/testdata/smoketest/elasticsearch/01_vscale.yaml new file mode 100644 index 00000000000..6b198d3e36f --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-vscale- +spec: + clusterRef: elasticsearch-cluster + type: VerticalScaling + verticalScaling: + - componentName: elasticsearch + requests: + cpu: "500m" + memory: 500Mi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/02_hscale_out.yaml b/test/e2e/testdata/smoketest/elasticsearch/02_hscale_out.yaml new file mode 100644 index 00000000000..0dd1da0d216 --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/02_hscale_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-hscale-out- +spec: + clusterRef: elasticsearch-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: elasticsearch + replicas: 3 + - componentName: metrics + replicas: 2 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/03_hscale_in.yaml b/test/e2e/testdata/smoketest/elasticsearch/03_hscale_in.yaml new file mode 100644 index 00000000000..e5c197119fa --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/03_hscale_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-hscale-in- +spec: + clusterRef: elasticsearch-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: elasticsearch + replicas: 1 + - componentName: metrics + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/04_vexpand.yaml b/test/e2e/testdata/smoketest/elasticsearch/04_vexpand.yaml new file mode 100644 index 00000000000..d910b5458ef --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/04_vexpand.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-vexpand- +spec: + clusterRef: elasticsearch-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: elasticsearch + volumeClaimTemplates: + - name: data + storage: "10Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/05_stop.yaml b/test/e2e/testdata/smoketest/elasticsearch/05_stop.yaml new file mode 100644 index 00000000000..d6b42eabfc8 --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/05_stop.yaml @@ -0,0 +1,11 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-stop- +spec: + clusterRef: elasticsearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: elasticsearch + - componentName: metrics \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/06_start.yaml b/test/e2e/testdata/smoketest/elasticsearch/06_start.yaml new file mode 100644 index 00000000000..979ebf93e73 --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/06_start.yaml @@ -0,0 +1,11 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-start- +spec: + clusterRef: elasticsearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: elasticsearch + - componentName: metrics \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/elasticsearch/07_restart.yaml b/test/e2e/testdata/smoketest/elasticsearch/07_restart.yaml new file mode 100644 index 00000000000..486a9fc97da --- /dev/null +++ b/test/e2e/testdata/smoketest/elasticsearch/07_restart.yaml @@ -0,0 +1,11 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: elasticsearch-cluster-restart- +spec: + clusterRef: elasticsearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: elasticsearch + - componentName: metrics \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/00_llmcluster.yaml b/test/e2e/testdata/smoketest/llm/00_llmcluster.yaml new file mode 100644 index 00000000000..d983b48ec3d --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/00_llmcluster.yaml @@ -0,0 +1,31 @@ +--- +# Source: llm-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: llm-cluster + labels: + helm.sh/chart: llm-cluster-0.1.0 + app.kubernetes.io/name: llm-cluster + app.kubernetes.io/instance: llm-cluster + app.kubernetes.io/version: "1.16.0" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: llm # ref clusterdefinition.name + clusterVersionRef: llm-vicuna-13b + terminationPolicy: Delete + affinity: + componentSpecs: + - name: llm + componentDefRef: llm + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: efs-sc1 + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/test/e2e/testdata/smoketest/llm/01_vscale.yaml b/test/e2e/testdata/smoketest/llm/01_vscale.yaml new file mode 100644 index 00000000000..df5c5726111 --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-vscale- +spec: + clusterRef: llm-cluster + type: VerticalScaling + verticalScaling: + - componentName: llm + requests: + cpu: "500m" + memory: 500Mi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/02_hscale_out.yaml b/test/e2e/testdata/smoketest/llm/02_hscale_out.yaml new file mode 100644 index 00000000000..c6b54dcc3fc --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/02_hscale_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-hscale-out- +spec: + clusterRef: llm-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: llm + replicas: 3 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/03_hscale_in.yaml b/test/e2e/testdata/smoketest/llm/03_hscale_in.yaml new file mode 100644 index 00000000000..648cf985aec --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/03_hscale_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-hscale-in- +spec: + clusterRef: llm-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: llm + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/04_vexpand.yaml b/test/e2e/testdata/smoketest/llm/04_vexpand.yaml new file mode 100644 index 00000000000..7cb4ed84b45 --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/04_vexpand.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-vexpand- +spec: + clusterRef: llm-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: llm + volumeClaimTemplates: + - name: data + storage: "15Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/05_stop.yaml b/test/e2e/testdata/smoketest/llm/05_stop.yaml new file mode 100644 index 00000000000..844a1ded6c4 --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/05_stop.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-stop- +spec: + clusterRef: llm-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: llm \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/06_start.yaml b/test/e2e/testdata/smoketest/llm/06_start.yaml new file mode 100644 index 00000000000..1b2c52c9f5d --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/06_start.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-start- +spec: + clusterRef: llm-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: llm \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/llm/07_restart.yaml b/test/e2e/testdata/smoketest/llm/07_restart.yaml new file mode 100644 index 00000000000..b770476386f --- /dev/null +++ b/test/e2e/testdata/smoketest/llm/07_restart.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: llm-cluster-restart- +spec: + clusterRef: llm-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: llm \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/00_milvuscluster.yaml b/test/e2e/testdata/smoketest/milvus/00_milvuscluster.yaml new file mode 100644 index 00000000000..219cf3ebb97 --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/00_milvuscluster.yaml @@ -0,0 +1,57 @@ +--- +# Source: milvus-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: milvus-cluster + labels: + helm.sh/chart: milvus-cluster-0.7.0-alpha.0 + app.kubernetes.io/name: milvus-cluster + app.kubernetes.io/instance: milvus-cluster + app.kubernetes.io/version: "2.2.4" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: milvus # ref clusterdefinition.name + clusterVersionRef: milvus-2.2.4 # ref clusterversion.name + terminationPolicy: Delete + affinity: + componentSpecs: + - name: milvus # user-defined + componentDefRef: milvus # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + - name: etcd # user-defined + componentDefRef: etcd # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + - name: minio # user-defined + componentDefRef: minio # ref clusterdefinition components.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi diff --git a/test/e2e/testdata/smoketest/milvus/01_vscale.yaml b/test/e2e/testdata/smoketest/milvus/01_vscale.yaml new file mode 100644 index 00000000000..5c13b64a5d8 --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-vscale- +spec: + clusterRef: milvus-cluster + type: VerticalScaling + verticalScaling: + - componentName: milvus + requests: + cpu: "500m" + memory: 500Mi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/02_hscale_out.yaml b/test/e2e/testdata/smoketest/milvus/02_hscale_out.yaml new file mode 100644 index 00000000000..32020e51fba --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/02_hscale_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-hscale-out- +spec: + clusterRef: milvus-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: milvus + replicas: 2 + - componentName: minio + replicas: 2 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/03_hscale_in.yaml b/test/e2e/testdata/smoketest/milvus/03_hscale_in.yaml new file mode 100644 index 00000000000..f70b1dfaca5 --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/03_hscale_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-hscale-in- +spec: + clusterRef: milvus-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: milvus + replicas: 1 + - componentName: minio + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/04_vexpand.yaml b/test/e2e/testdata/smoketest/milvus/04_vexpand.yaml new file mode 100644 index 00000000000..f6a02fb6940 --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/04_vexpand.yaml @@ -0,0 +1,20 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-vexpand- +spec: + clusterRef: milvus-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: milvus + volumeClaimTemplates: + - name: data + storage: "15Gi" + - componentName: etcd + volumeClaimTemplates: + - name: data + storage: "15Gi" + - componentName: minio + volumeClaimTemplates: + - name: data + storage: "15Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/05_stop.yaml b/test/e2e/testdata/smoketest/milvus/05_stop.yaml new file mode 100644 index 00000000000..08864547266 --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/05_stop.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-stop- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio diff --git a/test/e2e/testdata/smoketest/milvus/06_start.yaml b/test/e2e/testdata/smoketest/milvus/06_start.yaml new file mode 100644 index 00000000000..06898bff2fa --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/06_start.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-start- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/milvus/07_restart.yaml b/test/e2e/testdata/smoketest/milvus/07_restart.yaml new file mode 100644 index 00000000000..2e47ee88dac --- /dev/null +++ b/test/e2e/testdata/smoketest/milvus/07_restart.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: milvus-cluster-restart- +spec: + clusterRef: milvus-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: milvus + - componentName: etcd + - componentName: minio \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/opensearch/00_opensearchcluster.yaml b/test/e2e/testdata/smoketest/opensearch/00_opensearchcluster.yaml new file mode 100644 index 00000000000..a2f035cc2a9 --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/00_opensearchcluster.yaml @@ -0,0 +1,36 @@ +--- +# Source: opensearch-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: opensearch-cluster + labels: + helm.sh/chart: opensearch-cluster-0.1.0 + app.kubernetes.io/name: opensearch-cluster + app.kubernetes.io/instance: opensearch-cluster + app.kubernetes.io/version: "2.7.0" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: opensearch # ref clusterdefinition.name + clusterVersionRef: opensearch-2.7.0 # ref clusterversion.name + terminationPolicy: Delete + affinity: + topologyKeys: + - kubernetes.io/hostname + componentSpecs: + - name: opensearch # user-defined + componentDefRef: opensearch # ref clusterdefinition componentDefs.name + monitor: false + replicas: 1 + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + storageClassName: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + - name: dashboard # user-defined + componentDefRef: dashboard # ref clusterdefinition componentDefs.name + replicas: 1 diff --git a/test/e2e/testdata/smoketest/opensearch/01_vscale.yaml b/test/e2e/testdata/smoketest/opensearch/01_vscale.yaml new file mode 100644 index 00000000000..901e5fc4ccb --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: opensearch-cluster-vscale- +spec: + clusterRef: opensearch-cluster + type: VerticalScaling + verticalScaling: + - componentName: opensearch + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/opensearch/02_vexpand.yaml b/test/e2e/testdata/smoketest/opensearch/02_vexpand.yaml new file mode 100644 index 00000000000..25d34fbd357 --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/02_vexpand.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: opensearch-cluster-vexpand- +spec: + clusterRef: opensearch-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: opensearch + volumeClaimTemplates: + - name: data + storage: "20Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/opensearch/03_stop.yaml b/test/e2e/testdata/smoketest/opensearch/03_stop.yaml new file mode 100644 index 00000000000..5f34df26f03 --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/03_stop.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: opensearch-cluster-stop- +spec: + clusterRef: opensearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: opensearch \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/opensearch/04_start.yaml b/test/e2e/testdata/smoketest/opensearch/04_start.yaml new file mode 100644 index 00000000000..df8ca83fc37 --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/04_start.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: opensearch-cluster-start- +spec: + clusterRef: opensearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: opensearch \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/opensearch/05_restart.yaml b/test/e2e/testdata/smoketest/opensearch/05_restart.yaml new file mode 100644 index 00000000000..f2a883ee02f --- /dev/null +++ b/test/e2e/testdata/smoketest/opensearch/05_restart.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: opensearch-cluster-restart- +spec: + clusterRef: opensearch-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: opensearch \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/00_tdenginecluster.yaml b/test/e2e/testdata/smoketest/tdengine/00_tdenginecluster.yaml new file mode 100644 index 00000000000..ad281dd624b --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/00_tdenginecluster.yaml @@ -0,0 +1,88 @@ +--- +# Source: tdengine-cluster/templates/rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kb-td-cluster + namespace: default + labels: + helm.sh/chart: tdengine-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "3.0.5.0" + app.kubernetes.io/instance: td-cluster +--- +# Source: tdengine-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kb-td-cluster + labels: + helm.sh/chart: tdengine-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "3.0.5.0" + app.kubernetes.io/instance: td-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-volume-protection-pod-role +subjects: + - kind: ServiceAccount + name: kb-td-cluster + namespace: default +--- +# Source: tdengine-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kb-td-cluster + labels: + helm.sh/chart: tdengine-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "3.0.5.0" + app.kubernetes.io/instance: td-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-cluster-pod-role +subjects: + - kind: ServiceAccount + name: kb-td-cluster + namespace: default +--- +# Source: tdengine-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: td-cluster + labels: + helm.sh/chart: tdengine-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "3.0.5.0" + app.kubernetes.io/instance: td-cluster +spec: + clusterVersionRef: tdengine-3.0.5.0 + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + tenancy: SharedNode + clusterDefinitionRef: tdengine # ref clusterdefinition.name + componentSpecs: + - name: tdengine + componentDefRef: tdengine # ref clusterdefinition componentDefs.name + monitor: true + replicas: 3 + serviceAccountName: kb-td-cluster + resources: + limits: + cpu: "0.5" + memory: "1Gi" + requests: + cpu: "0.5" + memory: "1Gi" + volumeClaimTemplates: + - name: data # ref clusterDefinition components.containers.volumeMounts.name + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 10Gi + services: diff --git a/test/e2e/testdata/smoketest/tdengine/01_vexpand.yaml b/test/e2e/testdata/smoketest/tdengine/01_vexpand.yaml new file mode 100644 index 00000000000..451563d0d81 --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/01_vexpand.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-vexpand- +spec: + clusterRef: td-cluster + type: VolumeExpansion + volumeExpansion: + - componentName: tdengine + volumeClaimTemplates: + - name: data + storage: "15Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/02_stop.yaml b/test/e2e/testdata/smoketest/tdengine/02_stop.yaml new file mode 100644 index 00000000000..6f44784ef5b --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/02_stop.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-stop- +spec: + clusterRef: td-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: tdengine \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/03_start.yaml b/test/e2e/testdata/smoketest/tdengine/03_start.yaml new file mode 100644 index 00000000000..9a58cfa21a5 --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/03_start.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-start- +spec: + clusterRef: td-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: tdengine \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/04_vscale.yaml b/test/e2e/testdata/smoketest/tdengine/04_vscale.yaml new file mode 100644 index 00000000000..fbd5903dd1f --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/04_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-vscale- +spec: + clusterRef: td-cluster + type: VerticalScaling + verticalScaling: + - componentName: tdengine + requests: + cpu: "500m" + memory: 500Mi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/05_restart.yaml b/test/e2e/testdata/smoketest/tdengine/05_restart.yaml new file mode 100644 index 00000000000..9dd5089a6ce --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/05_restart.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-restart- +spec: + clusterRef: td-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: tdengine \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/06_hscale_out.yaml b/test/e2e/testdata/smoketest/tdengine/06_hscale_out.yaml new file mode 100644 index 00000000000..ba8d5729f20 --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/06_hscale_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-hscale-out- +spec: + clusterRef: td-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: tdengine + replicas: 4 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/tdengine/07_hscale_in.yaml b/test/e2e/testdata/smoketest/tdengine/07_hscale_in.yaml new file mode 100644 index 00000000000..5e7efe7872b --- /dev/null +++ b/test/e2e/testdata/smoketest/tdengine/07_hscale_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: td-cluster-hscale-in- +spec: + clusterRef: td-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: tdengine + replicas: 1 \ No newline at end of file