Skip to content

How to specify the storage-class of the data pvc? #290

@TLINDEN

Description

@TLINDEN

What did you do to encounter the bug?
Deployed the operator and the sample CR.

What did you expect?
It shall be possible to specify the storage-class of the data pvc.

What happened instead?
Seems not to be possible, at least I couldn't find any hint in the CRD for this.

Screenshots

NAME                                               STATUS  VOLUME                                    CAPACITY  ACCESS  MODES    STORAGECLASS  AGE
data-volume-rocketchat-footest-mongodb-instance-0  Bound   pvc-958c8ebb-93ca-4491-84a7-c2fd85664d5b  10G       RWO     csi-lvm  97m           
logs-volume-rocketchat-footest-mongodb-instance-0  Bound   pvc-fc9ef63f-1bbb-449c-8221-94e0af5ed1ff  2G        RWO     csi-lvm  97m 

The class csi-lvm is the default on our cluster, but I'd need to use a cloud storage instead.

Operator Information

  • Operator Version: 1.2.0
  • MongoDB Image used: 6.0.13

Kubernetes Cluster Information

  • Distribution: metal-stack
  • Version: 1.28.15
  • Image Registry location (quay, or an internal registry): quay

Additional information

% kgp
NAME                                            READY   STATUS  RESTARTS        AGE 
mongodb-kubernetes-operator-57b5b56c6d-2sj89    1/1     Running 0               136m
rocketchat-footest-mongodb-instance-0           2/2     Running 0               100m

k get mdbc
NAME                                   PHASE     VERSION
rocketchat-footest-mongodb-instance   Running   6.0.13                                                                             
  • yaml definitions of your MongoDB Deployment(s):
---
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
  name: {{ nsname }}-mongodb-instance
  namespace: {{ nsname }}
spec:
  members: 1
  type: ReplicaSet
  version: "6.0.13"
  security:
    authentication:
      modes: ["SCRAM"]
  users:
    - name: {{ rcConfig.mongodb.username }}
      db: {{ rcConfig.mongodb.database }}
      passwordSecretRef:
        name: mongodb-user
      roles:
        - name: clusterAdmin
          db: {{ rcConfig.mongodb.database }}
        - name: userAdminAnyDatabase
          db: {{ rcConfig.mongodb.database }}
      scramCredentialsSecretName: my-scram
  additionalMongodConfig:
    storage.wiredTiger.engineConfig.journalCompressor: zlib

---
apiVersion: v1
kind: Secret
metadata:
  name: mongodb-user
  namespace: {{ nsname }}
type: Opaque
stringData:
  password: {{ rcConfig.mongodb.userpw }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions