Skip to content

Support data persistent: integrate with storageClass #28

Open
@ahrtr

Description

The goal is to ensure the etcd's data will not get lost once the VM or POD is rebooted.

So we need to support setting VolumeClaimTemplate for the statefulset, something like below,

  volumeClaimTemplates:
  - metadata:
      name: etcd-data
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: "csi-sc-standard"
      resources:
        requests:
          storage: 32Gi

Note that it isn't etcd-operator's responsibility to provision / manage the CSI driver in production environment.

But we need to provision / manage a CSI driver for our test environment,

  • one possible solution that I can think of is openebs localpv.

  • or csi-driver-host-path for single node test environment.

  • or use hostPath directly, something like below,

     volumes:
     - name: my-data
       hostPath:
         path: /data/${POD_NAME}
         type: DirectoryOrCreate
    

I am open to other alternatives.

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions