Skip to content

StorageSpec accessMode is not required but errors if not provided #107

Description

@SDBrett

If an ectdCluster is configured with a storageSpec and the accessMode field is not configured the statefulSet cannot create pods and provide the below error.

create Claim etcd-data-example-0 for Pod example-0 in StatefulSet example failed error: PersistentVolumeClaim "etcd-data-example-0" is invalid: spec.accessModes: Unsupported value: "": supported values: "ReadOnlyMany", "ReadWriteMany", "ReadWriteOnce", "ReadWriteOncePod"

Example etcdCluster config to get the above error

apiVersion: operator.etcd.io/v1alpha1
kind: EtcdCluster
metadata:
  name: example
  namespace: etcd-test
spec:
  size: 1
  version: v3.5.17
  etcdOptions:
    - "--experimental-peer-skip-client-san-verification"
  storageSpec:
    volumeSizeRequest: 100M

Snippet of statuefulSet created with above config

kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: example
  namespace: etcd-test
spec:
  serviceName: example
      spec:
        accessModes:
          - ''
        resources:
          limits:
            storage: 100M
          requests:
            storage: 100M
        volumeMode: Filesystem
      status:
        phase: Pending

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededkind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions