<p>I'm using the <a href="https://github.com/helm/charts/tree/master/stable/mcrouter" rel="nofollow noreferrer">mcrouter helm chart</a> 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.</p>

<p>I'm <a href="https://cloud.google.com/sdk/gcloud/reference/container/node-pools/create" rel="nofollow noreferrer">creating the node pool</a> with a taint using the <code>--node-taints</code> flag. To ensure that the memcached statefulset can run on this node pool I need to specify <code>tolerations</code> as described in <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/</a>.</p>

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

<blockquote>
  <p>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</p>
</blockquote>

<p>The <a href="https://github.com/helm/charts/tree/master/stable/mcrouter" rel="nofollow noreferrer">Helm Chart</a> doesn't support it.</p>

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

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

<p>You can also upstream a change to support tolerations. You would have to add variables in the <code>values.yaml</code>(<a href="https://github.com/helm/charts/blob/master/stable/mcrouter/values.yaml" rel="nofollow noreferrer">https://github.com/helm/charts/blob/master/stable/mcrouter/values.yaml</a>) file and then optionally use it in the <a href="https://github.com/helm/charts/blob/master/stable/mcrouter/templates/daemonset.yaml" rel="nofollow noreferrer"><code>daemonset.yaml</code></a> template.</p>
