Hi All,
I am new to MongoDB and the kubernetes community operator.
Deployed it on Proxmox server/k3s.
My question:
Is it possible to pass container resources attributes to override the default ones?
This is my replicaSet deployment:
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: mongodb-cluster
spec:
members: 2
type: ReplicaSet
version: "5.0.6"
statefulSet:
spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongod
resources:
limits:
cpu: 0.3
memory: 300Mi
requests:
cpu: 0.2
memory: 200Mi
- name: mongodb-agent
readinessProbe:
failureThreshold: 100
initialDelaySeconds: 10
resources:
limits:
cpu: 0.3
memory: 300Mi
requests:
cpu: 0.2
memory: 200Mi
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
storageClassName: managed-nfs-storage
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
- metadata:
name: logs-volume
spec:
storageClassName: managed-nfs-storage
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 5Gi
security:
authentication:
modes: ["SCRAM"]
users:
- name: cluster-user
db: admin
passwordSecretRef: # a reference to the secret that will be used to generate the user's password
name: cluster-user-password
roles:
- name: clusterAdmin
db: admin
- name: userAdminAnyDatabase
db: admin
scramCredentialsSecretName: my-scram
additionalMongodConfig:
storage.wiredTiger.engineConfig.journalCompressor: zlib
The only part that works with the custom attributes is volumeClaimTemplates. All other attributes, like container resources and Readiness Probe values, will not change default values.