Add FlexVolume for agents
This commit is contained in:
parent
cda6baf3f2
commit
f4dc291429
@ -44,7 +44,7 @@ resource "null_resource" "agents" {
|
|||||||
|
|
||||||
# Generating k3s agent config file
|
# Generating k3s agent config file
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
content = yamlencode({
|
content = yamlencode(merge({
|
||||||
node-name = module.agents[each.key].name
|
node-name = module.agents[each.key].name
|
||||||
server = "https://${module.control_planes[0].private_ipv4_address}:6443"
|
server = "https://${module.control_planes[0].private_ipv4_address}:6443"
|
||||||
token = random_password.k3s_token.result
|
token = random_password.k3s_token.result
|
||||||
@ -52,7 +52,11 @@ resource "null_resource" "agents" {
|
|||||||
flannel-iface = "eth1"
|
flannel-iface = "eth1"
|
||||||
node-ip = module.agents[each.key].private_ipv4_address
|
node-ip = module.agents[each.key].private_ipv4_address
|
||||||
node-label = var.automatically_upgrade_k3s ? ["k3s_upgrade=true"] : []
|
node-label = var.automatically_upgrade_k3s ? ["k3s_upgrade=true"] : []
|
||||||
})
|
},
|
||||||
|
var.cni_plugin == "calico" ? {
|
||||||
|
flannel-backend = "none"
|
||||||
|
kube-controller-manager-arg = "flex-volume-plugin-dir=/var/lib/kubelet/volumeplugins"
|
||||||
|
} : {}))
|
||||||
destination = "/tmp/config.yaml"
|
destination = "/tmp/config.yaml"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user