Skip to content

add RabbitmqCluster.spec.persistence.selector to select PV to bind #939

Answered by Zerpet
wenmingwei asked this question in Q&A
Discussion options

You must be logged in to vote

The cluster operator creates a PVC dynamically using the StatefulSet volume claim template field. We did not consider static provisioned PVs as an option, and it makes more sense to support mainly dynamic PV provisioning.

If you still want to use the PV you created, you can override the PVC claim with the StatefulSet override feature, something like this:

---
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: my-rabbitmqcluster
spec:
  override:
    statefulSet:
      spec:
        volumeClaimTemplates:
          - spec:
              accessModes:
                - ReadWriteOnce
              selector:
                matchLabels:
                  rabbitmq: mylabel

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ChunyiLyu
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Zerpet
Comment options

@vinu1421
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #916 on January 27, 2022 11:14.