瀏覽代碼

Add support for storage class (IN-599)

master
Andrey Inishev 6 月之前
父節點
當前提交
56a8910054
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. +2
    -0
      pkg/apis/rabbitmq/v1/rabbitmq_types.go
  2. +1
    -0
      pkg/controller/rabbitmq/rabbitmq_controller.go

+ 2
- 0
pkg/apis/rabbitmq/v1/rabbitmq_types.go 查看文件

@@ -86,6 +86,8 @@ type RabbitmqSpec struct {
// TODO: auth mechanisms
RabbitmqAuth RabbitmqAuth `json:"auth,omitempty"`

RabbitmqStorageClass *string `json:"rabbitmq_storage_class,omitempty"`

// set rabbitmq policies
RabbitmqPolicies []RabbitmqPolicy `json:"policies"`



+ 1
- 0
pkg/controller/rabbitmq/rabbitmq_controller.go 查看文件

@@ -511,6 +511,7 @@ func newStatefulSet(cr *rabbitmqv1.Rabbitmq, secretNames secretResouces) *v1.Sta
},
Spec: corev1.PersistentVolumeClaimSpec{
AccessModes: []corev1.PersistentVolumeAccessMode{corev1.ReadWriteOnce},
StorageClassName: cr.Spec.RabbitmqStorageClass,
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceStorage: cr.Spec.RabbitmqVolumeSize,


Loading…
取消
儲存