Skip to content

Commit

Permalink
Merge branch 'longhorn-nfs-client' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticaltech committed May 23, 2022
2 parents 47037a5 + 968a92a commit b008bcf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agents.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "agents" {
location = each.value.location
server_type = each.value.server_type
ipv4_subnet_id = hcloud_network_subnet.agent[[for i, v in var.agent_nodepools : i if v.name == each.value.nodepool_name][0]].id
packages_to_install = concat(var.enable_longhorn ? ["open-iscsi"] : [], [])
packages_to_install = local.packages_to_install

private_ipv4 = cidrhost(hcloud_network_subnet.agent[[for i, v in var.agent_nodepools : i if v.name == each.value.nodepool_name][0]].ip_range, each.value.index + 101)

Expand Down
2 changes: 1 addition & 1 deletion control_planes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module "control_planes" {
location = each.value.location
server_type = each.value.server_type
ipv4_subnet_id = hcloud_network_subnet.control_plane[[for i, v in var.control_plane_nodepools : i if v.name == each.value.nodepool_name][0]].id
packages_to_install = concat(var.enable_longhorn ? ["open-iscsi"] : [], [])
packages_to_install = local.packages_to_install

# We leave some room so 100 eventual Hetzner LBs that can be created perfectly safely
# It leaves the subnet with 254 x 254 - 100 = 64416 IPs to use, so probably enough.
Expand Down
2 changes: 2 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ locals {
# Default k3s node taints
default_control_plane_taints = concat([], local.allow_scheduling_on_control_plane ? [] : ["node-role.kubernetes.io/master:NoSchedule"])

packages_to_install = concat(var.enable_longhorn ? ["open-iscsi", "nfs-client"] : [], [])

# The following IPs are important to be whitelisted because they communicate with Hetzner services and enable the CCM and CSI to work properly.
# Source https://github.com/hetznercloud/csi-driver/issues/204#issuecomment-848625566
hetzner_metadata_service_ipv4 = "169.254.169.254/32"
Expand Down

0 comments on commit b008bcf

Please sign in to comment.