Skip to content

Commit 3ea11d2

Browse files
authored
Merge pull request #1744 from orlovmyk/patch-1
Do not schedule CSI pods on control-plane by default
2 parents 2055ab6 + c42f04b commit 3ea11d2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

locals.tf

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,17 @@ persistence:
574574
csi_driver_smb_values = var.csi_driver_smb_values != "" ? var.csi_driver_smb_values : <<EOT
575575
EOT
576576

577-
hetzner_csi_values = var.hetzner_csi_values != "" ? var.hetzner_csi_values : <<EOT
578-
EOT
577+
hetzner_csi_values = var.hetzner_csi_values != "" ? var.hetzner_csi_values : (!local.allow_scheduling_on_control_plane ? <<-EOT
578+
node:
579+
affinity:
580+
nodeAffinity:
581+
requiredDuringSchedulingIgnoredDuringExecution:
582+
nodeSelectorTerms:
583+
- matchExpressions:
584+
- key: "node-role.kubernetes.io/control-plane"
585+
operator: DoesNotExist
586+
EOT
587+
: "")
579588

580589
nginx_values = var.nginx_values != "" ? var.nginx_values : <<EOT
581590
controller:

0 commit comments

Comments
 (0)