1

I am trying to use the chart stable/mcrouter for memcache sharding, everything works, but this chart uses a memcache chat as dependencie.

I would like to know if I can pass parameters to memcache chart, this is the dependencies file: requirements.yaml

dependencies:
- name: memcached
  version: 1.2.1
  repository: https://kubernetes-charts.storage.googleapis.com/
  condition: mcrouter.memcached.enabled

mcrouter chart url: https://github.com/helm/charts/tree/master/stable/mcrouter

In few words, I can give parameters to mcrouter, but I cannot give parameters to memcache chart.

c4f4t0r
  • 5,149
  • 3
  • 28
  • 41

2 Answers2

2

Review this official article. It provide good example:

helm install stable/mcrouter --name=mycache --set memcached.replicaCount=3

Other examples:

helm install stable/mcrouter --name=mycache --set memcached.replicaCount=3 --set memcached.resources.requests.memory=512Mi

helm install stable/mcrouter --name=mycache --set memcached.replicaCount=15 --set memcached.resources.requests.memory=10Gi --set memcached.resources.requests.cpu=2 --set memcached.memcached.maxItemMemory=8432
Vit
  • 445
  • 2
  • 10
0

I solved the problem in this way, I downloaded stable/mcrouter with:

cd /tmp && helm fetch stable/mcrouter --untar

Now under /tmp/mcrouter/charts/memcached/templates you have the memcached templates and you can check the accepted parameters

I found if you use helm install stable/mcrouter --name=mycache --set memcached.replicaCount=3 works, because memcached.replicationCount is part of the mcrouter chart.

If you want to pass parameters to the subchart, you need to use:

helm install --name=mycache --set memcached.replicaCount=2 --set memcached.memcached.resources.requests.memory=100M --set memcached.memcached.maxItemMemory=100 stable/mcrouter

Or you can edit the values.yaml of the subchart under /tmp/mcrouter/charts/memcached/values.yaml

Now you can install the chart with the news parameters:

cd /tmp/mcrouter && helm install --name=mycache --set memcached.replicaCount=2 .
c4f4t0r
  • 5,149
  • 3
  • 28
  • 41