add StorageClass in Broker CRD
diff --git a/create-operator.sh b/create-operator.sh
index 70277db..cf1fa3d 100755
--- a/create-operator.sh
+++ b/create-operator.sh
@@ -23,8 +23,8 @@
 export GO111MODULE=on
 
 # uncomment the following 2 lines if you have updated the [kind]_type.go file or don't have zz_generated.deepcopy.go and zz_generated.openapi.go files
-#operator-sdk generate k8s
-#operator-sdk generate openapi
+operator-sdk generate k8s
+operator-sdk generate openapi
 
 go mod vendor
 
diff --git a/deploy/crds/cache_v1alpha1_broker_cr.yaml b/deploy/crds/cache_v1alpha1_broker_cr.yaml
index 1c8e9db..ac8c60a 100644
--- a/deploy/crds/cache_v1alpha1_broker_cr.yaml
+++ b/deploy/crds/cache_v1alpha1_broker_cr.yaml
@@ -29,4 +29,15 @@
   # brokerImage is the customized docker image repo of the RocketMQ broker
   brokerImage: 2019liurui/rocketmq-broker:4.5.0-alpine
   # imagePullPolicy is the image pull policy
-  imagePullPolicy: Always
\ No newline at end of file
+  imagePullPolicy: Always
+  # volumeClaimTemplates defines the storageClass
+  volumeClaimTemplates:
+    - metadata:
+        name: broker-storage
+        annotations:
+          volume.beta.kubernetes.io/storage-class: rocketmq-storage
+      spec:
+        accessModes: [ "ReadWriteOnce" ]
+        resources:
+          requests:
+            storage: 8Gi
\ No newline at end of file
diff --git a/deploy/crds/cache_v1alpha1_broker_crd.yaml b/deploy/crds/cache_v1alpha1_broker_crd.yaml
index 45ca5ab..69c78ae 100644
--- a/deploy/crds/cache_v1alpha1_broker_crd.yaml
+++ b/deploy/crds/cache_v1alpha1_broker_crd.yaml
@@ -28,8 +28,7 @@
         spec:
           properties:
             brokerImage:
-              description: BaseImage is the broker container image to use for the
-                Pods.
+              description: BaseImage is the broker image to use for the Pods.
               type: string
             imagePullPolicy:
               description: ImagePullPolicy defines how the image is pulled.
@@ -44,15 +43,20 @@
               format: int32
               type: integer
             slavePerGroup:
-              description: SlavePerGroup is the number of slave brokers in each broker
-                group
+              description: SlavePerGroup each broker cluster's slave number
               format: int64
               type: integer
+            volumeClaimTemplates:
+              description: VolumeClaimTemplates defines the StorageClass
+              items:
+                type: object
+              type: array
           required:
           - size
           - slavePerGroup
           - brokerImage
           - imagePullPolicy
+          - volumeClaimTemplates
           type: object
         status:
           properties:
diff --git a/pkg/apis/cache/v1alpha1/broker_types.go b/pkg/apis/cache/v1alpha1/broker_types.go
index da09c0f..d3767ce 100644
--- a/pkg/apis/cache/v1alpha1/broker_types.go
+++ b/pkg/apis/cache/v1alpha1/broker_types.go
@@ -33,12 +33,14 @@
 	NameServers string `json:"nameServers,omitempty"`
 	// ReplicationMode is SYNC or ASYNC
 	ReplicationMode string `json:"replicationMode,omitempty"`
-	// SlavePerGroup is the number of slave brokers in each broker group
+	// SlavePerGroup each broker cluster's slave number
 	SlavePerGroup int `json:"slavePerGroup"`
-	// BaseImage is the broker container image to use for the Pods.
+	// BaseImage is the broker image to use for the Pods.
 	BrokerImage string `json:"brokerImage"`
 	// ImagePullPolicy defines how the image is pulled.
 	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy"`
+	// VolumeClaimTemplates defines the StorageClass
+	VolumeClaimTemplates []corev1.PersistentVolumeClaim `json:"volumeClaimTemplates"`
 }
 
 // BrokerStatus defines the observed state of Broker
diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go
index ddb7378..50e840d 100644
--- a/pkg/constants/constants.go
+++ b/pkg/constants/constants.go
@@ -26,4 +26,7 @@
 const EnvNamesrvAddr = "NAMESRV_ADDR"
 const EnvReplicationMode = "REPLICATION_MODE"
 const EnvBrokerId = "BROKER_ID"
-const EnvBrokerClusterName = "BROKER_CLUSTER_NAME"
\ No newline at end of file
+const EnvBrokerClusterName = "BROKER_CLUSTER_NAME"
+const LogMountPath = "/home/rocketmq/logs"
+const StoreMountPath = "/home/rocketmq/store"
+const PvcAnnotationsKey = "volume.beta.kubernetes.io/storage-class"
\ No newline at end of file
diff --git a/pkg/controller/broker/broker_controller.go b/pkg/controller/broker/broker_controller.go
index 91780d4..65d3758 100644
--- a/pkg/controller/broker/broker_controller.go
+++ b/pkg/controller/broker/broker_controller.go
@@ -267,9 +267,17 @@
 							ContainerPort: 10912,
 							Name:          "10912port",
 						}},
+						VolumeMounts: []corev1.VolumeMount{{
+							MountPath: cons.LogMountPath,
+							Name: m.Name + "-" + strconv.Itoa(brokerClusterIndex) + "-master-logs",
+						},{
+							MountPath: cons.StoreMountPath,
+							Name: m.Name + "-" + strconv.Itoa(brokerClusterIndex) + "-master-store",
+						}},
 					}},
 				},
 			},
+			VolumeClaimTemplates: m.Spec.VolumeClaimTemplates,
 		},
 	}
 	// Set Broker instance as the owner and controller
@@ -327,9 +335,17 @@
 							ContainerPort: 10912,
 							Name:          "10912port",
 						}},
+						VolumeMounts: []corev1.VolumeMount{{
+							MountPath: cons.LogMountPath,
+							Name: m.Name + "-" + strconv.Itoa(brokerClusterIndex) + "-slave-" + strconv.Itoa(slaveIndex) + "-logs",
+						},{
+							MountPath: cons.StoreMountPath,
+							Name: m.Name + "-" + strconv.Itoa(brokerClusterIndex) + "-slave-" + strconv.Itoa(slaveIndex) + "-store",
+						}},
 					}},
 				},
 			},
+			VolumeClaimTemplates: m.Spec.VolumeClaimTemplates,
 		},
 	}
 	// Set Broker instance as the owner and controller