etcd-io / etcd-io/etcd-operator
StorageSpec accessMode is not required but errors if not provided
- Dominant language
- Go
- Stars
- 164
- Forks
- 72
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 34
Description
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
```yaml
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
```yaml
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
```
Contributor guide
Assessment
This issue has not been assessed yet.