Skip to content

Commit

Permalink
add toleration of master node
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmhl committed Mar 17, 2020
1 parent 41f98c3 commit 1542168
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/controller/csi/enhancer/ceph.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ func (e *cephEnhancer) enhanceCephRBD(csiDeploy *csiv1.CSI) error {
HostNetwork: true,
HostPID: true,
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
Tolerations: []corev1.Toleration{
{
Key: "node-role.kubernetes.io/master",
Effect: corev1.TaintEffectNoSchedule,
},
},
Containers: []corev1.Container{
{
Name: "csi-rbd",
Expand Down Expand Up @@ -189,6 +195,12 @@ func (e *cephEnhancer) enhanceCephFS(csiDeploy *csiv1.CSI) error {
Spec: corev1.PodSpec{
HostNetwork: true,
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
Tolerations: []corev1.Toleration{
{
Key: "node-role.kubernetes.io/master",
Effect: corev1.TaintEffectNoSchedule,
},
},
Containers: []corev1.Container{
{
Name: "csi-cephfs",
Expand Down
6 changes: 6 additions & 0 deletions pkg/controller/csi/enhancer/tencentCloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func (e *tencentCloudEnhancer) generateDriverTemplate(
HostPID: true,
HostIPC: true,
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
Tolerations: []corev1.Toleration{
{
Key: "node-role.kubernetes.io/master",
Effect: corev1.TaintEffectNoSchedule,
},
},
Containers: []corev1.Container{
{
Name: "com-tencent-cloud-csi-cbs",
Expand Down

0 comments on commit 1542168

Please sign in to comment.