pravega / zookeeper-operator

Kubernetes Operator for Zookeeper
Apache License 2.0
364 stars 203 forks source link

storageClassName doesn't work #602

Open alter opened 5 months ago

alter commented 5 months ago

Description

I want to set a custom storageClassName, but it doesn't apply, looks like the cluster operator knows nothing about it

Importance

blocker

Location

apiVersion: "zookeeper.pravega.io/v1beta1"
kind: "ZookeeperCluster"
metadata:
  name: "zookeeper"
  namespace: "stands-template"
spec:
  replicas: 3
  storageType: persistence
  persistence:
    storageClassName: "efs-sc"

Suggestions for an improvement

add support of custom storageClassName

Additional info

template: https://github.com/pravega/zookeeper-operator/blob/a9b059daf03434b7be070ad60ad569ec5581dbd2/charts/zookeeper/templates/zookeeper.yaml#L162

values.yaml: https://github.com/pravega/zookeeper-operator/blob/a9b059daf03434b7be070ad60ad569ec5581dbd2/charts/zookeeper/values.yaml#L83

but when I look at PVC:

data-zookeeper-0                                        Bound    pvc-f31f3ca7-4edc-4ba6-af79-33a683576c8b   20Gi       RWO            gp2            5m3s
data-zookeeper-1                                        Bound    pvc-558694b2-b29b-4207-8413-9ae37796d958   20Gi       RWO            gp2            4m31s
data-zookeeper-2                                        Bound    pvc-404f60a1-e29b-43a6-bceb-06c5b985c15a   20Gi       RWO            gp2            3m58s

it set gp2, because it's default storage class in my cluster:

 k get sc
NAME                 PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
efs-sc               efs.csi.aws.com         Delete          Immediate              false                  109d
gp2 (default)        kubernetes.io/aws-ebs   Delete          WaitForFirstConsumer   true                   181d
alter commented 5 months ago

I got that zookeeper-operator/charts/zookeeper/values.yaml wrong example, because it's not operator(but you put it into operator folder - wtf?) there is another folder with CRD and there is no option to apply custom storageClassName, except defined in CRD, I don't get logic here...