Skip to content

How can I have both the data and logs in the same PesistentVolumes? #1336

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

Closed
spacecat opened this issue Jul 20, 2023 · 6 comments
Closed

How can I have both the data and logs in the same PesistentVolumes? #1336

spacecat opened this issue Jul 20, 2023 · 6 comments

Comments

@spacecat
Copy link

spacecat commented Jul 20, 2023

I have the following resource:

apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
  name: mongodb
  namespace: mongodb
spec:
  members: 3

... etc
... etc
... etc

This creates 6 PersistentVolumes:

❯ k get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                           STORAGECLASS   REASON   AGE
pvc-65ea9673-724c-4050-b997-a817ecedee06   10Gi       RWO            Delete           Bound    mongodb/data-volume-mongodb-2   default                 28h
pvc-6bf91177-5a84-458d-b995-8788d3c8257a   2Gi        RWO            Delete           Bound    mongodb/logs-volume-mongodb-1   default                 28h
pvc-7badd364-8cf9-4d18-8ee1-5aa8eb1e3bff   10Gi       RWO            Delete           Bound    mongodb/data-volume-mongodb-1   default                 28h
pvc-8254442f-85d8-4c6e-85b6-7af1c7308014   2Gi        RWO            Delete           Bound    mongodb/logs-volume-mongodb-2   default                 28h
pvc-8bd60b4e-0964-4399-b631-fddd8a327ae5   2Gi        RWO            Delete           Bound    mongodb/logs-volume-mongodb-0   default                 28h
pvc-b2d81fa0-ec2f-49e6-b2cb-1f0ee7f7d363   10Gi       RWO            Delete           Bound    mongodb/data-volume-mongodb-0   default                 28h

Is there a way to configure the community operator so that I only end up with 3 PersistentVolumes in total? If so, how?

@calnighters
Copy link

I would also appreciate this being implemented, given the logs go to stdout anyways, I don’t see why this is still needed?

@drivebyer
Copy link
Contributor

maybe implement by #1321

@rdxmb
Copy link

rdxmb commented Aug 15, 2023

Logs in kubernetes should go to stdout/stderr and not into a mounted filesystem. See #1261

@irajdeep
Copy link
Contributor

There are no plans atm to log to the filesystem instead of stdout.

@spacecat
Copy link
Author

Sorry but why did you close this issue, @irajdeep ?
My question has not been answered :)

@spacecat
Copy link
Author

spacecat commented Nov 6, 2023

Hi, any updates on this one? :)

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

No branches or pull requests

5 participants