How to set node taint for memcached using mcrouter helm chart?

10/30/2018

I'm using the mcrouter helm chart to setup mcrouter on GKE. For my setup I'd like to have a dedicated node pool for the memcached statefulset and a daemonset for mcrouter.

I'm creating the node pool with a taint using the --node-taints flag. To ensure that the memcached statefulset can run on this node pool I need to specify tolerations as described in https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/.

How do I specify the toleration? I'm currently creating my setup using helm as follows:

helm install stable/mcrouter --name=mycache --set memcached.replicaCount=15 --set memcached.resources.requests.memory=10Gi --set memcached.resources.requests.cpu=2 --set resources.requests.memory=512Mi --set resources.requests.cpu=1.5 --set resources.limits.memory=512Mi --set resources.limits.cpu=2 --set memcached.memcached.maxItemMemory=8432

-- sthomps
google-kubernetes-engine
kubernetes
kubernetes-helm

1 Answer

10/30/2018

The Helm Chart doesn't support it.

After you create the DaemonSet you can patch it. For example (change to whatever toleration you want):

$ kubectl patch daemonset mycache-mcrouter -p='{"spec":{"template": {"spec":  {"tolerations": [{"key": "key1", "operator": "Equal", "value": "value1", "effect": "NoSchedule"}]}}}}'

You can also upstream a change to support tolerations. You would have to add variables in the values.yaml(https://github.com/helm/charts/blob/master/stable/mcrouter/values.yaml) file and then optionally use it in the daemonset.yaml template.

-- Rico
Source: StackOverflow