-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add Zookeeper/MariaDB e2e test cases
- Loading branch information
1 parent
55e4d58
commit a7cbf2d
Showing
16 changed files
with
281 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
test/e2e/testdata/smoketest/mariadb/00_mariadbcluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
# Source: mariadb/templates/rbac.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kb-mariadb-cluster | ||
namespace: default | ||
labels: | ||
helm.sh/chart: mariadb-0.7.0-alpha.0 | ||
app.kubernetes.io/version: "10.6.15" | ||
app.kubernetes.io/instance: mariadb-cluster | ||
--- | ||
# Source: mariadb/templates/rbac.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kb-mariadb-cluster | ||
labels: | ||
helm.sh/chart: mariadb-0.7.0-alpha.0 | ||
app.kubernetes.io/version: "10.6.15" | ||
app.kubernetes.io/instance: mariadb-cluster | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kubeblocks-volume-protection-pod-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kb-mariadb-cluster | ||
namespace: default | ||
--- | ||
# Source: mariadb/templates/rbac.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: kb-mariadb-cluster | ||
labels: | ||
helm.sh/chart: mariadb-0.7.0-alpha.0 | ||
app.kubernetes.io/version: "10.6.15" | ||
app.kubernetes.io/instance: mariadb-cluster | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kubeblocks-cluster-pod-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kb-mariadb-cluster | ||
namespace: default | ||
--- | ||
# Source: mariadb/templates/cluster.yaml | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: mariadb-cluster | ||
labels: | ||
helm.sh/chart: mariadb-0.7.0-alpha.0 | ||
app.kubernetes.io/version: "10.6.15" | ||
app.kubernetes.io/instance: mariadb-cluster | ||
spec: | ||
clusterVersionRef: mariadb | ||
terminationPolicy: Delete | ||
affinity: | ||
podAntiAffinity: Required | ||
topologyKeys: | ||
- kubernetes.io/hostname | ||
tenancy: SharedNode | ||
clusterDefinitionRef: mariadb # ref clusterdefinition.name | ||
componentSpecs: | ||
- name: mariadb | ||
componentDefRef: mariadb-compdef # ref clusterdefinition componentDefs.name | ||
replicas: 1 | ||
serviceAccountName: kb-mariadb-cluster | ||
resources: | ||
limits: | ||
cpu: "0.5" | ||
memory: "0.5Gi" | ||
requests: | ||
cpu: "0.5" | ||
memory: "0.5Gi" | ||
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: mariadb-cluster-vscale- | ||
spec: | ||
clusterRef: mariadb-cluster | ||
type: VerticalScaling | ||
verticalScaling: | ||
- componentName: mariadb | ||
requests: | ||
cpu: "1" | ||
memory: "1Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: mariadb-cluster-vscale- | ||
spec: | ||
clusterRef: mariadb-cluster | ||
type: VerticalScaling | ||
verticalScaling: | ||
- componentName: mariadb | ||
requests: | ||
cpu: "0.5" | ||
memory: "0.5Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: mariadb-cluster-stop- | ||
spec: | ||
clusterRef: mariadb-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Stop | ||
restart: | ||
- componentName: mariadb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: mariadb-cluster-start- | ||
spec: | ||
clusterRef: mariadb-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Start | ||
restart: | ||
- componentName: mariadb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: mariadb-cluster-restart- | ||
spec: | ||
clusterRef: mariadb-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Restart | ||
restart: | ||
- componentName: mariadb |
50 changes: 50 additions & 0 deletions
50
test/e2e/testdata/smoketest/zookeeper/00_zookeepercluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
# Source: zookeeper-cluster/templates/cluster.yaml | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: Cluster | ||
metadata: | ||
name: zk-cluster | ||
labels: | ||
|
||
helm.sh/chart: zookeeper-cluster-0.7.0-alpha.0 | ||
app.kubernetes.io/version: "3.7.1" | ||
app.kubernetes.io/instance: zk-cluster | ||
spec: | ||
clusterDefinitionRef: zookeeper | ||
clusterVersionRef: zookeeper-3.7.1 | ||
terminationPolicy: Delete | ||
affinity: | ||
podAntiAffinity: Preferred | ||
topologyKeys: | ||
- kubernetes.io/hostname | ||
tenancy: SharedNode | ||
componentSpecs: | ||
- name: zookeeper | ||
componentDefRef: zookeeper | ||
replicas: 3 | ||
serviceAccountName: kb-zk-cluster | ||
monitor: false | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: "2Gi" | ||
requests: | ||
cpu: "1" | ||
memory: "2Gi" | ||
volumeClaimTemplates: | ||
- name: data # ref clusterdefinition components.containers.volumeMounts.name | ||
spec: | ||
storageClassName: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
- name: data-log # ref clusterdefinition components.containers.volumeMounts.name | ||
spec: | ||
storageClassName: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-vscale- | ||
spec: | ||
clusterRef: zk-cluster | ||
type: VerticalScaling | ||
verticalScaling: | ||
- componentName: zookeeper | ||
requests: | ||
cpu: "1.5" | ||
memory: "2.5Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-vscale- | ||
spec: | ||
clusterRef: zk-cluster | ||
type: VerticalScaling | ||
verticalScaling: | ||
- componentName: zookeeper | ||
requests: | ||
cpu: "1" | ||
memory: "2Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-hscale-out- | ||
spec: | ||
clusterRef: zk-cluster | ||
type: HorizontalScaling | ||
horizontalScaling: | ||
- componentName: zookeeper | ||
replicas: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-hscale-in- | ||
spec: | ||
clusterRef: zk-cluster | ||
type: HorizontalScaling | ||
horizontalScaling: | ||
- componentName: zookeeper | ||
replicas: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-vexpand- | ||
spec: | ||
clusterRef: zk-cluster | ||
type: VolumeExpansion | ||
volumeExpansion: | ||
- componentName: zookeeper | ||
volumeClaimTemplates: | ||
- name: data | ||
storage: "20Gi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-stop- | ||
spec: | ||
clusterRef: zk-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Stop | ||
restart: | ||
- componentName: zookeeper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-start- | ||
spec: | ||
clusterRef: zk-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Start | ||
restart: | ||
- componentName: zookeeper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: apps.kubeblocks.io/v1alpha1 | ||
kind: OpsRequest | ||
metadata: | ||
generateName: zk-cluster-restart- | ||
spec: | ||
clusterRef: zk-cluster | ||
ttlSecondsAfterSucceed: 27017 | ||
type: Restart | ||
restart: | ||
- componentName: zookeeper |