From 71434775058e9ef7c26a76140eda21eeda2832cd Mon Sep 17 00:00:00 2001 From: linghan-hub <56351212+linghan-hub@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:16:10 +0800 Subject: [PATCH] chore: add mysql-5.7 mysql-8.0 and PolarDB-X e2e test cases (#5370) --- Makefile | 17 ++++ .../polardbx-cluster/templates/cluster.yaml | 16 ++-- .../smoketest/mongodb/01_vexpand.yaml | 2 +- .../mongodb/10_backup_snapshot_restore.yaml | 2 +- .../smoketest/mysql-57/00_mysqlcluster.yaml | 80 +++++++++++++++++++ .../smoketest/mysql-57/01_vscale.yaml | 12 +++ .../smoketest/mysql-57/02_hscale_out.yaml | 10 +++ .../smoketest/mysql-57/03_hscale_in.yaml | 10 +++ .../testdata/smoketest/mysql-57/04_stop.yaml | 10 +++ .../testdata/smoketest/mysql-57/05_start.yaml | 10 +++ .../smoketest/mysql-57/06_restart.yaml | 10 +++ .../smoketest/mysql-80/00_mysqlcluster.yaml | 80 +++++++++++++++++++ .../smoketest/mysql-80/01_vscale.yaml | 12 +++ .../smoketest/mysql-80/02_hscale_out.yaml | 10 +++ .../smoketest/mysql-80/03_hscale_in.yaml | 10 +++ .../testdata/smoketest/mysql-80/04_stop.yaml | 10 +++ .../testdata/smoketest/mysql-80/05_start.yaml | 10 +++ .../smoketest/mysql-80/06_restart.yaml | 10 +++ .../smoketest/oceanbase/01_vscale.yaml | 6 +- .../official-postgresql/01_vscale.yaml | 6 +- .../smoketest/openldap/01_vscale.yaml | 6 +- .../testdata/smoketest/oracle/03_vscale.yaml | 6 +- .../smoketest/orioledb/01_vscale.yaml | 6 +- .../polardbx/00_polardbxcluster.yaml | 74 +++++++++++++++++ .../smoketest/polardbx/01_vscale_gms_out.yaml | 12 +++ .../smoketest/polardbx/02_vscale_gms_in.yaml | 12 +++ .../smoketest/polardbx/03_vscale_dn_out.yaml | 12 +++ .../smoketest/polardbx/04_vscale_dn_in.yaml | 12 +++ .../smoketest/polardbx/05_vscale_cn_out.yaml | 12 +++ .../smoketest/polardbx/06_vscale_cn_in.yaml | 12 +++ .../smoketest/polardbx/07_vscale_cdc_out.yaml | 12 +++ .../smoketest/polardbx/08_vscale_cdc_in.yaml | 12 +++ .../smoketest/polardbx/09_hscale_gms_out.yaml | 10 +++ .../smoketest/polardbx/10_hscale_gms_in.yaml | 10 +++ .../smoketest/polardbx/11_hscale_dn_out.yaml | 10 +++ .../smoketest/polardbx/12_hscale_dn_in.yaml | 10 +++ .../smoketest/polardbx/13_hscale_cdc_out.yaml | 10 +++ .../smoketest/polardbx/14_hscale_cdc_in.yaml | 10 +++ .../testdata/smoketest/polardbx/15_stop.yaml | 13 +++ .../testdata/smoketest/polardbx/16_start.yaml | 13 +++ .../smoketest/polardbx/17_restart.yaml | 13 +++ .../smoketest/polardbx/18_vexpand.yaml | 16 ++++ .../smoketest/risingwave/03_vscale.yaml | 24 +++--- 43 files changed, 623 insertions(+), 37 deletions(-) create mode 100644 test/e2e/testdata/smoketest/mysql-57/00_mysqlcluster.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/01_vscale.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/02_hscale_out.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/03_hscale_in.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/04_stop.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/05_start.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-57/06_restart.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/00_mysqlcluster.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/01_vscale.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/02_hscale_out.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/03_hscale_in.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/04_stop.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/05_start.yaml create mode 100644 test/e2e/testdata/smoketest/mysql-80/06_restart.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/00_polardbxcluster.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/01_vscale_gms_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/02_vscale_gms_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/03_vscale_dn_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/04_vscale_dn_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/05_vscale_cn_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/06_vscale_cn_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/07_vscale_cdc_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/08_vscale_cdc_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/09_hscale_gms_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/10_hscale_gms_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/11_hscale_dn_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/12_hscale_dn_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/13_hscale_cdc_out.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/14_hscale_cdc_in.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/15_stop.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/16_start.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/17_restart.yaml create mode 100644 test/e2e/testdata/smoketest/polardbx/18_vexpand.yaml diff --git a/Makefile b/Makefile index 30d3d819f96..5250e5f928a 100644 --- a/Makefile +++ b/Makefile @@ -669,6 +669,17 @@ else ifeq ($(TEST_TYPE), weaviate) $(HELM) dependency build deploy/weaviate-cluster --skip-refresh $(HELM) upgrade --install weaviate deploy/weaviate $(HELM) template weaviate-cluster deploy/weaviate-cluster > test/e2e/testdata/smoketest/weaviate/00_weaviatecluster.yaml +else ifeq ($(TEST_TYPE), mysql-80) + $(HELM) dependency build deploy/mysql-cluster --skip-refresh + $(HELM) upgrade --install mysql deploy/mysql + $(HELM) template mysqlcluster deploy/mysql-cluster > test/e2e/testdata/smoketest/mysql-80/00_mysqlcluster.yaml +else ifeq ($(TEST_TYPE), mysql-57) + $(HELM) dependency build deploy/mysql-cluster --skip-refresh + $(HELM) upgrade --install mysql deploy/mysql +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 $(error "test type does not exist") endif @@ -714,6 +725,12 @@ else ifeq ($(TEST_TYPE), openldap) $(HELM) upgrade --install openldap deploy/openldap else ifeq ($(TEST_TYPE), weaviate) $(HELM) upgrade --install weaviate deploy/weaviate +else ifeq ($(TEST_TYPE), mysql-80) + $(HELM) upgrade --install mysql deploy/mysql +else ifeq ($(TEST_TYPE), mysql-57) + $(HELM) upgrade --install mysql deploy/mysql +else ifeq ($(TEST_TYPE), polardbx) + $(HELM) upgrade --install polardbx deploy/polardbx else $(error "test type does not exist") endif diff --git a/deploy/polardbx-cluster/templates/cluster.yaml b/deploy/polardbx-cluster/templates/cluster.yaml index f841eef16f8..999415cbcbf 100644 --- a/deploy/polardbx-cluster/templates/cluster.yaml +++ b/deploy/polardbx-cluster/templates/cluster.yaml @@ -9,8 +9,8 @@ spec: clusterVersionRef: polardbx-{{ default .Chart.AppVersion .Values.clusterVersionOverride }} terminationPolicy: {{ .Values.polardbx.terminationPolicy }} componentSpecs: - - componentDefRef: gms - name: gms + - name: gms + componentDefRef: gms replicas: {{ .Values.gms.replicas }} {{- with .Values.gms.resources }} resources: @@ -37,8 +37,8 @@ spec: {{- end }} {{- $i := 0 }} {{- range .Values.dn }} - - componentDefRef: dn - name: dn-{{ $i }} + - name: dn-{{ $i }} + componentDefRef: dn replicas: {{ .replicas }} {{- with .resources }} resources: @@ -65,8 +65,8 @@ spec: {{- end }} {{- end }} {{- $i = add1 $i }} - - componentDefRef: cn - name: cn + - name: cn + componentDefRef: cn replicas: {{ .Values.cn.replicas }} {{- with .Values.cn.resources }} resources: @@ -81,8 +81,8 @@ spec: memory: {{ .memory | quote }} {{- end }} {{- end }} - - componentDefRef: cdc - name: cdc + - name: cdc + componentDefRef: cdc replicas: {{ .Values.cdc.replicas }} {{- with .Values.cn.resources }} resources: diff --git a/test/e2e/testdata/smoketest/mongodb/01_vexpand.yaml b/test/e2e/testdata/smoketest/mongodb/01_vexpand.yaml index adc7a2dafa4..1ec08b3ca4b 100644 --- a/test/e2e/testdata/smoketest/mongodb/01_vexpand.yaml +++ b/test/e2e/testdata/smoketest/mongodb/01_vexpand.yaml @@ -9,4 +9,4 @@ spec: - componentName: mongodb volumeClaimTemplates: - name: data - storage: "20Gi" \ No newline at end of file + storage: "21Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mongodb/10_backup_snapshot_restore.yaml b/test/e2e/testdata/smoketest/mongodb/10_backup_snapshot_restore.yaml index c8211497425..af52d8260bd 100644 --- a/test/e2e/testdata/smoketest/mongodb/10_backup_snapshot_restore.yaml +++ b/test/e2e/testdata/smoketest/mongodb/10_backup_snapshot_restore.yaml @@ -27,4 +27,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 20Gi \ No newline at end of file + storage: 21Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/00_mysqlcluster.yaml b/test/e2e/testdata/smoketest/mysql-57/00_mysqlcluster.yaml new file mode 100644 index 00000000000..e0a0d74c5ad --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/00_mysqlcluster.yaml @@ -0,0 +1,80 @@ +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kb-mysql-57-cluster + namespace: default + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "5.7.42" + app.kubernetes.io/instance: mysql-57-cluster +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kb-mysql-57-cluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "5.7.42" + app.kubernetes.io/instance: mysql-57-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-volume-protection-pod-role +subjects: + - kind: ServiceAccount + name: kb-mysqlcluster + namespace: default +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kb-mysql-57-cluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "5.7.42" + app.kubernetes.io/instance: mysql-57-cluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-cluster-pod-role +subjects: + - kind: ServiceAccount + name: kb-mysqlcluster + namespace: default +--- +# Source: mysql-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: mysql-57-cluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "5.7.42" + app.kubernetes.io/instance: mysql-57-cluster +spec: + clusterVersionRef: mysql-5.7.42 + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + tenancy: SharedNode + clusterDefinitionRef: mysql # ref clusterdefinition.name + componentSpecs: + - name: mysql + componentDefRef: mysql # ref clusterdefinition componentDefs.name + monitor: false + replicas: 1 + serviceAccountName: kb-mysql-57-cluster + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" + services: diff --git a/test/e2e/testdata/smoketest/mysql-57/01_vscale.yaml b/test/e2e/testdata/smoketest/mysql-57/01_vscale.yaml new file mode 100644 index 00000000000..012a9df5cf6 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-vscale- +spec: + clusterRef: mysql-57-cluster + type: VerticalScaling + verticalScaling: + - componentName: mysql + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/02_hscale_out.yaml b/test/e2e/testdata/smoketest/mysql-57/02_hscale_out.yaml new file mode 100644 index 00000000000..c662c060149 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/02_hscale_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-hscale-out- +spec: + clusterRef: mysql-57-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: mysql + replicas: 3 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/03_hscale_in.yaml b/test/e2e/testdata/smoketest/mysql-57/03_hscale_in.yaml new file mode 100644 index 00000000000..16a11a894fa --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/03_hscale_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-hscale-in- +spec: + clusterRef: mysql-57-cluster + type: HorizontalScaling + horizontalScaling: + - componentName: mysql + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/04_stop.yaml b/test/e2e/testdata/smoketest/mysql-57/04_stop.yaml new file mode 100644 index 00000000000..a0abe893688 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/04_stop.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-stop- +spec: + clusterRef: mysql-57-cluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/05_start.yaml b/test/e2e/testdata/smoketest/mysql-57/05_start.yaml new file mode 100644 index 00000000000..e752c164b97 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/05_start.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-start- +spec: + clusterRef: mysql-57-cluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-57/06_restart.yaml b/test/e2e/testdata/smoketest/mysql-57/06_restart.yaml new file mode 100644 index 00000000000..ba9b733ee9b --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-57/06_restart.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysql-57-cluster-restart- +spec: + clusterRef: mysql-57-cluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/00_mysqlcluster.yaml b/test/e2e/testdata/smoketest/mysql-80/00_mysqlcluster.yaml new file mode 100644 index 00000000000..1af25f7a29e --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/00_mysqlcluster.yaml @@ -0,0 +1,80 @@ +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: kb-mysqlcluster + namespace: default + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "8.0.33" + app.kubernetes.io/instance: mysqlcluster +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kb-mysqlcluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "8.0.33" + app.kubernetes.io/instance: mysqlcluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-volume-protection-pod-role +subjects: + - kind: ServiceAccount + name: kb-mysqlcluster + namespace: default +--- +# Source: mysql-cluster/templates/rbac.yaml +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: kb-mysqlcluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "8.0.33" + app.kubernetes.io/instance: mysqlcluster +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kubeblocks-cluster-pod-role +subjects: + - kind: ServiceAccount + name: kb-mysqlcluster + namespace: default +--- +# Source: mysql-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: mysqlcluster + labels: + helm.sh/chart: mysql-cluster-0.7.0-alpha.0 + app.kubernetes.io/version: "8.0.33" + app.kubernetes.io/instance: mysqlcluster +spec: + clusterVersionRef: mysql-8.0.33 + terminationPolicy: Delete + affinity: + podAntiAffinity: Preferred + topologyKeys: + - kubernetes.io/hostname + tenancy: SharedNode + clusterDefinitionRef: mysql # ref clusterdefinition.name + componentSpecs: + - name: mysql + componentDefRef: mysql # ref clusterdefinition componentDefs.name + monitor: false + replicas: 1 + serviceAccountName: kb-mysqlcluster + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" + services: diff --git a/test/e2e/testdata/smoketest/mysql-80/01_vscale.yaml b/test/e2e/testdata/smoketest/mysql-80/01_vscale.yaml new file mode 100644 index 00000000000..d91d51e6aec --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/01_vscale.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: mysqlcluster-vscale- +spec: + clusterRef: mysqlcluster + type: VerticalScaling + verticalScaling: + - componentName: mysql + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/02_hscale_out.yaml b/test/e2e/testdata/smoketest/mysql-80/02_hscale_out.yaml new file mode 100644 index 00000000000..acb66eb1fc0 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/02_hscale_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cluster-hscale-out- +spec: + clusterRef: mysqlcluster + type: HorizontalScaling + horizontalScaling: + - componentName: mysql + replicas: 3 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/03_hscale_in.yaml b/test/e2e/testdata/smoketest/mysql-80/03_hscale_in.yaml new file mode 100644 index 00000000000..f6cf0b8dd9e --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/03_hscale_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cluster-hscale-in- +spec: + clusterRef: mysqlcluster + type: HorizontalScaling + horizontalScaling: + - componentName: mysql + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/04_stop.yaml b/test/e2e/testdata/smoketest/mysql-80/04_stop.yaml new file mode 100644 index 00000000000..396d8bcb521 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/04_stop.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cluster-stop- +spec: + clusterRef: mysqlcluster + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/05_start.yaml b/test/e2e/testdata/smoketest/mysql-80/05_start.yaml new file mode 100644 index 00000000000..141be726535 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/05_start.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cluster-start- +spec: + clusterRef: mysqlcluster + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/mysql-80/06_restart.yaml b/test/e2e/testdata/smoketest/mysql-80/06_restart.yaml new file mode 100644 index 00000000000..b9afebbb971 --- /dev/null +++ b/test/e2e/testdata/smoketest/mysql-80/06_restart.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cluster-restart- +spec: + clusterRef: mysqlcluster + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: mysql \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/oceanbase/01_vscale.yaml b/test/e2e/testdata/smoketest/oceanbase/01_vscale.yaml index a7ed2425d20..82951790233 100644 --- a/test/e2e/testdata/smoketest/oceanbase/01_vscale.yaml +++ b/test/e2e/testdata/smoketest/oceanbase/01_vscale.yaml @@ -7,6 +7,6 @@ spec: type: VerticalScaling verticalScaling: - componentName: ob-bundle - requests: - cpu: "1.5" - memory: 1Gi \ No newline at end of file + requests: + cpu: "1.5" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/official-postgresql/01_vscale.yaml b/test/e2e/testdata/smoketest/official-postgresql/01_vscale.yaml index dcc21936420..5253abd05a7 100644 --- a/test/e2e/testdata/smoketest/official-postgresql/01_vscale.yaml +++ b/test/e2e/testdata/smoketest/official-postgresql/01_vscale.yaml @@ -7,6 +7,6 @@ spec: type: VerticalScaling verticalScaling: - componentName: postgresql - requests: - cpu: "1" - memory: 1Gi \ No newline at end of file + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/openldap/01_vscale.yaml b/test/e2e/testdata/smoketest/openldap/01_vscale.yaml index 38917694ad7..d79ee6b53a0 100644 --- a/test/e2e/testdata/smoketest/openldap/01_vscale.yaml +++ b/test/e2e/testdata/smoketest/openldap/01_vscale.yaml @@ -7,6 +7,6 @@ spec: type: VerticalScaling verticalScaling: - componentName: openldap - requests: - cpu: "1" - memory: 1Gi \ No newline at end of file + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/oracle/03_vscale.yaml b/test/e2e/testdata/smoketest/oracle/03_vscale.yaml index ade010caf84..3f32db47ed6 100644 --- a/test/e2e/testdata/smoketest/oracle/03_vscale.yaml +++ b/test/e2e/testdata/smoketest/oracle/03_vscale.yaml @@ -7,6 +7,6 @@ spec: type: VerticalScaling verticalScaling: - componentName: mysql-comp - requests: - cpu: "1.5" - memory: 1Gi \ No newline at end of file + requests: + cpu: "1.5" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/orioledb/01_vscale.yaml b/test/e2e/testdata/smoketest/orioledb/01_vscale.yaml index 1acc234a06e..b2a5492100f 100644 --- a/test/e2e/testdata/smoketest/orioledb/01_vscale.yaml +++ b/test/e2e/testdata/smoketest/orioledb/01_vscale.yaml @@ -7,6 +7,6 @@ spec: type: VerticalScaling verticalScaling: - componentName: orioledb - requests: - cpu: "1" - memory: 1Gi \ No newline at end of file + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/00_polardbxcluster.yaml b/test/e2e/testdata/smoketest/polardbx/00_polardbxcluster.yaml new file mode 100644 index 00000000000..bb07b9cd466 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/00_polardbxcluster.yaml @@ -0,0 +1,74 @@ +--- +# Source: polardbx-cluster/templates/cluster.yaml +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: Cluster +metadata: + name: pxc + labels: + + helm.sh/chart: polardbx-cluster-0.1.0 + app.kubernetes.io/name: pxc + app.kubernetes.io/instance: pxc + app.kubernetes.io/version: "v1.4.1" + app.kubernetes.io/managed-by: Helm +spec: + clusterDefinitionRef: polardbx + clusterVersionRef: polardbx-v1.4.1 + terminationPolicy: WipeOut + componentSpecs: + - name: gms + componentDefRef: gms + replicas: 3 + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + - name: dn-0 + componentDefRef: dn + replicas: 3 + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" + volumeClaimTemplates: + - name: data # ref clusterdefinition components.containers.volumeMounts.name + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 20Gi + - name: cn + componentDefRef: cn + replicas: 2 + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" + - name: cdc + componentDefRef: cdc + replicas: 2 + resources: + limits: + cpu: "1" + memory: "1Gi" + requests: + cpu: "1" + memory: "1Gi" diff --git a/test/e2e/testdata/smoketest/polardbx/01_vscale_gms_out.yaml b/test/e2e/testdata/smoketest/polardbx/01_vscale_gms_out.yaml new file mode 100644 index 00000000000..eb319e3f4ad --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/01_vscale_gms_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: gms-vscale-out- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: gms + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/02_vscale_gms_in.yaml b/test/e2e/testdata/smoketest/polardbx/02_vscale_gms_in.yaml new file mode 100644 index 00000000000..69616821b3e --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/02_vscale_gms_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: gms-vscale-in- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: gms + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/03_vscale_dn_out.yaml b/test/e2e/testdata/smoketest/polardbx/03_vscale_dn_out.yaml new file mode 100644 index 00000000000..944efe4a57c --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/03_vscale_dn_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: dn-vscale-out- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: dn-0 + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/04_vscale_dn_in.yaml b/test/e2e/testdata/smoketest/polardbx/04_vscale_dn_in.yaml new file mode 100644 index 00000000000..bb97c9b8a35 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/04_vscale_dn_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: dn-vscale-in- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: dn-0 + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/05_vscale_cn_out.yaml b/test/e2e/testdata/smoketest/polardbx/05_vscale_cn_out.yaml new file mode 100644 index 00000000000..f08f1e38e9b --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/05_vscale_cn_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cn-vscale-out- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: cn + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/06_vscale_cn_in.yaml b/test/e2e/testdata/smoketest/polardbx/06_vscale_cn_in.yaml new file mode 100644 index 00000000000..6e3dfb7bdad --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/06_vscale_cn_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cn-vscale-in- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: cn + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/07_vscale_cdc_out.yaml b/test/e2e/testdata/smoketest/polardbx/07_vscale_cdc_out.yaml new file mode 100644 index 00000000000..138cf06ffb1 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/07_vscale_cdc_out.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cdc-vscale-out- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: cdc + requests: + cpu: "1.5" + memory: 1.5Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/08_vscale_cdc_in.yaml b/test/e2e/testdata/smoketest/polardbx/08_vscale_cdc_in.yaml new file mode 100644 index 00000000000..d6dc09b10ad --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/08_vscale_cdc_in.yaml @@ -0,0 +1,12 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cdc-vscale-in- +spec: + clusterRef: pxc + type: VerticalScaling + verticalScaling: + - componentName: cdc + requests: + cpu: "1" + memory: 1Gi \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/09_hscale_gms_out.yaml b/test/e2e/testdata/smoketest/polardbx/09_hscale_gms_out.yaml new file mode 100644 index 00000000000..15ecc5bb890 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/09_hscale_gms_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: gms-hscale-out- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: gms + replicas: 4 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/10_hscale_gms_in.yaml b/test/e2e/testdata/smoketest/polardbx/10_hscale_gms_in.yaml new file mode 100644 index 00000000000..dd7ad492143 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/10_hscale_gms_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: gms-hscale-in- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: gms + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/11_hscale_dn_out.yaml b/test/e2e/testdata/smoketest/polardbx/11_hscale_dn_out.yaml new file mode 100644 index 00000000000..ae96911d046 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/11_hscale_dn_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: dn-hscale-out- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: dn-0 + replicas: 4 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/12_hscale_dn_in.yaml b/test/e2e/testdata/smoketest/polardbx/12_hscale_dn_in.yaml new file mode 100644 index 00000000000..fa0e7b7b72b --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/12_hscale_dn_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: dn-hscale-in- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: dn-0 + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/13_hscale_cdc_out.yaml b/test/e2e/testdata/smoketest/polardbx/13_hscale_cdc_out.yaml new file mode 100644 index 00000000000..cef695cc586 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/13_hscale_cdc_out.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cdc-hscale-out- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: cdc + replicas: 3 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/14_hscale_cdc_in.yaml b/test/e2e/testdata/smoketest/polardbx/14_hscale_cdc_in.yaml new file mode 100644 index 00000000000..1c707bfd77c --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/14_hscale_cdc_in.yaml @@ -0,0 +1,10 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: cdc-hscale-in- +spec: + clusterRef: pxc + type: HorizontalScaling + horizontalScaling: + - componentName: cdc + replicas: 1 \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/15_stop.yaml b/test/e2e/testdata/smoketest/polardbx/15_stop.yaml new file mode 100644 index 00000000000..5988c6b726f --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/15_stop.yaml @@ -0,0 +1,13 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: pxc-cluster-stop- +spec: + clusterRef: pxc + ttlSecondsAfterSucceed: 27017 + type: Stop + restart: + - componentName: gms + - componentName: dn-0 + - componentName: cn + - componentName: cdc \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/16_start.yaml b/test/e2e/testdata/smoketest/polardbx/16_start.yaml new file mode 100644 index 00000000000..3bde74f0ac4 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/16_start.yaml @@ -0,0 +1,13 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: pxc-cluster-start- +spec: + clusterRef: pxc + ttlSecondsAfterSucceed: 27017 + type: Start + restart: + - componentName: gms + - componentName: dn-0 + - componentName: cn + - componentName: cdc \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/17_restart.yaml b/test/e2e/testdata/smoketest/polardbx/17_restart.yaml new file mode 100644 index 00000000000..75296494bf7 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/17_restart.yaml @@ -0,0 +1,13 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: pxc-cluster-restart- +spec: + clusterRef: pxc + ttlSecondsAfterSucceed: 27017 + type: Restart + restart: + - componentName: gms + - componentName: dn-0 + - componentName: cn + - componentName: cdc \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/polardbx/18_vexpand.yaml b/test/e2e/testdata/smoketest/polardbx/18_vexpand.yaml new file mode 100644 index 00000000000..12fc2b44225 --- /dev/null +++ b/test/e2e/testdata/smoketest/polardbx/18_vexpand.yaml @@ -0,0 +1,16 @@ +apiVersion: apps.kubeblocks.io/v1alpha1 +kind: OpsRequest +metadata: + generateName: pxc-cluster-vexpand- +spec: + clusterRef: pxc + type: VolumeExpansion + volumeExpansion: + - componentName: gms + volumeClaimTemplates: + - name: data + storage: "21Gi" + - componentName: dn-0 + volumeClaimTemplates: + - name: data + storage: "21Gi" \ No newline at end of file diff --git a/test/e2e/testdata/smoketest/risingwave/03_vscale.yaml b/test/e2e/testdata/smoketest/risingwave/03_vscale.yaml index 99df7440af5..8473efef3c2 100644 --- a/test/e2e/testdata/smoketest/risingwave/03_vscale.yaml +++ b/test/e2e/testdata/smoketest/risingwave/03_vscale.yaml @@ -11,18 +11,18 @@ spec: cpu: "600m" memory: 600Mi - componentName: meta - requests: - cpu: "600m" - memory: 600Mi + requests: + cpu: "600m" + memory: 600Mi - componentName: compute - requests: - cpu: "600m" - memory: 600Mi + requests: + cpu: "600m" + memory: 600Mi - componentName: compactor - requests: - cpu: "600m" - memory: 600Mi + requests: + cpu: "600m" + memory: 600Mi - componentName: connector - requests: - cpu: "600m" - memory: 600Mi \ No newline at end of file + requests: + cpu: "600m" + memory: 600Mi \ No newline at end of file