fne edited a comment on issue #2430: Running CouchDB in container and then the 
couchdb pod doesn't release RAM consumed
URL: https://github.com/apache/couchdb/issues/2430#issuecomment-586569507
 
 
   Our configuration 
   ```
   ## clusterSize is the initial size of the CouchDB cluster.
   clusterSize: 3
   
   ## If allowAdminParty is enabled the cluster will start up without any 
database
   ## administrator account; i.e., all users will be granted administrative
   ## access. Otherwise, the system will look for a Secret called
   ## <ReleaseName>-couchdb containing `adminUsername`, `adminPassword` and
   ## `cookieAuthSecret` keys. See the `createAdminSecret` flag.
   ## ref: https://kubernetes.io/docs/concepts/configuration/secret/
   allowAdminParty: false
   
   ## If createAdminSecret is enabled a Secret called <ReleaseName>-couchdb will
   ## be created containing auto-generated credentials. Users who prefer to set
   ## these values themselves have a couple of options:
   ##
   ## 1) The `adminUsername`, `adminPassword`, and `cookieAuthSecret` can be
   ##    defined directly in the chart's values. Note that all of a chart's 
values
   ##    are currently stored in plaintext in a ConfigMap in the tiller 
namespace.
   ##
   ## 2) This flag can be disabled and a Secret with the required keys can be
   ##    created ahead of time.
   createAdminSecret: true
   
   adminUsername:
   adminPassword: 
   # cookieAuthSecret: neither_is_this
   
   ## The storage volume used by each Pod in the StatefulSet. If a
   ## persistentVolume is not enabled, the Pods will use `emptyDir` ephemeral
   ## local storage. Setting the storageClass attribute to "-" disables dynamic
   ## provisioning of Persistent Volumes; leaving it unset will invoke the 
default
   ## provisioner.
   persistentVolume:
     enabled: true
     accessModes:
       - ReadWriteOnce
     size: 500Gi
     storageClass: managed-premium
   
   ## The CouchDB image
   image:
     repository: couchdb
     tag: 2.3.0
     pullPolicy: IfNotPresent
   
   ## Sidecar that connects the individual Pods into a cluster
   helperImage:
     repository: kocolosk/couchdb-statefulset-assembler
     tag: 1.1.0
     pullPolicy: IfNotPresent
   
   ## CouchDB is happy to spin up cluster nodes in parallel, but if you 
encounter
   ## problems you can try setting podManagementPolicy to the StatefulSet 
default
   ## `OrderedReady`
   podManagementPolicy: Parallel
   
   ## To better tolerate Node failures, we can prevent Kubernetes scheduler from
   ## assigning more than one Pod of CouchDB StatefulSet per Node using 
podAntiAffinity.
   affinity:
     # podAntiAffinity:
     #   requiredDuringSchedulingIgnoredDuringExecution:
     #     - labelSelector:
     #         matchExpressions:
     #           - key: "app"
     #             operator: In
     #             values:
     #             - couchdb
     #       topologyKey: "kubernetes.io/hostname"
   
   ## A StatefulSet requires a headless Service to establish the stable network
   ## identities of the Pods, and that Service is created automatically by this
   ## chart without any additional configuration. The Service block below refers
   ## to a second Service that governs how clients connect to the CouchDB 
cluster.
   service:
     enabled: true
     type: ClusterIP
     externalPort: 5984
   
   ## An Ingress resource can provide name-based virtual hosting and TLS
   ## termination among other things for CouchDB deployments which are accessed
   ## from outside the Kubernetes cluster.
   ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
   ingress:
     enabled: false
     hosts:
       - chart-example.local
     annotations:
       # kubernetes.io/ingress.class: nginx
       # kubernetes.io/tls-acme: "true"
     tls:
       # Secrets must be manually created in the namespace.
       # - secretName: chart-example-tls
       #   hosts:
       #     - chart-example.local
   
   ## Optional resource requests and limits for the CouchDB container
   ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
   resources:
     # requests:
     #  cpu: 100m
     #  memory: 128Mi
    limits:
     cpu: 2000m
     memory: 4096Mi
   
   ## erlangFlags is a map that is passed to the Erlang VM as flags using the
   ## ERL_FLAGS env. `name` and `setcookie` flags are minimally required to
   ## establish connectivity between cluster nodes.
   ## ref: http://erlang.org/doc/man/erl.html#init_flags
   erlangFlags:
     name: couchdb
     setcookie: monster
   
   ## couchdbConfig will override default CouchDB configuration settings.
   ## The contents of this map are reformatted into a .ini file laid down
   ## by a ConfigMap object.
   ## ref: http://docs.couchdb.org/en/latest/config/index.html
   couchdbConfig:
     # cluster:
     #   q: 8 # Create 8 shards for each database
     chttpd:
       bind_address: any
       # chttpd.require_valid_user disables all the anonymous requests to the 
port
       # 5984 when is set to true.
       require_valid_user: true
     httpd:
       WWW-Authenticate: Basic realm="administrator"
     #compacte db 
     compactions:
       _default: [{db_fragmentation, "50%"}, {view_fragmentation, "50%"}]
       licensees: [{db_fragmentation, "50%"}, {view_fragmentation, "50%"}]
       licensees_qualities: [{db_fragmentation, "50%"}, {view_fragmentation, 
"50%"}]
       licensees_diplomas: [{db_fragmentation, "50%"}, {view_fragmentation, 
"50%"}]
       structures: [{db_fragmentation, "50%"}, {view_fragmentation, "50%"}]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to