Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata of embedded volumeClaimTemplate not retained in statefulset #351

Closed
diseq opened this issue Jan 16, 2022 · 1 comment · Fixed by #353
Closed

Metadata of embedded volumeClaimTemplate not retained in statefulset #351

diseq opened this issue Jan 16, 2022 · 1 comment · Fixed by #353

Comments

@diseq
Copy link

diseq commented Jan 16, 2022

Expected behaviour

Creating a cluster with the persistent-storage.yaml shall result in a statefulset being created

Actual behaviour

Statefulset is not created as the pvc cannot be created.
Error:

create Pod rfr-redisfailover-persistent-0 in StatefulSet rfr-redisfailover-persistent failed error: failed to create PVC -rfr-redisfailover-persistent-0: PersistentVolumeClaim "-rfr-redisfailover-persistent-0" is invalid: metadata.name: Invalid value: "-rfr-redisfailover-persistent-0": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Cause: volumeclaimtemplate metadata of statefulset is empty

  volumeClaimTemplates:
    - kind: PersistentVolumeClaim
      apiVersion: v1
      metadata:
        creationTimestamp: null
      spec:
        accessModes:

it seems kubernetes has changed the handling of embedded metadata. prometheus operator was struggling with a similar issue

Steps to reproduce the behaviour

Deploy operator
kubectl apply -f persistent-storage.yaml

Environment

How are the pieces configured?

  • Redis Operator version: chart 3.1.3, app version: 1.1.0-rc.1
  • Kubernetes version: k3s v1.22.5+k3s1
  • Kubernetes configuration used: vanilla, rbac active
@ese
Copy link
Member

ese commented Jan 17, 2022

Thanks for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants