Force loadbalancer pods to master nodes

Loadbalancer pods which run haproxy should run on
Kubernetes master nodes as per the design. This commit
adds appropriate node selectors and tolerations.

Change-Id: Ic35a0130d8767e3cda7bbf4370f5dd07de1f6b8e
This commit is contained in:
Reddy, Hemachandra (hr858f) 2021-07-12 16:15:56 -05:00
parent e65bd9e134
commit fe0dac4a55

View File

@ -122,6 +122,15 @@ func (lb loadBalancer) generateDeploymentAndSecret(instance string, labels map[s
},
},
},
NodeSelector: map[string]string{
"node-role.kubernetes.io/master": "",
},
Tolerations: []corev1.Toleration{
{
Key: "node-role.kubernetes.io/master",
Effect: "NoSchedule",
},
},
Volumes: []corev1.Volume{
{
Name: ConfigSecretName,