mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-16 10:41:34 +02:00
Add node_labels variable in workers modules to set initial node labels (#550)
* Also add `worker_node_labels` variable in `kubernetes` modules to set initial node labels for the default workers
This commit is contained in:
committed by
Dalton Hubble
parent
8703f2c3c5
commit
99ab81f79c
@ -60,6 +60,9 @@ systemd:
|
||||
--lock-file=/var/run/lock/kubelet.lock \
|
||||
--network-plugin=cni \
|
||||
--node-labels=node.kubernetes.io/node \
|
||||
%{ for label in split(",", node_labels) }
|
||||
--node-labels=${label} \
|
||||
%{ endfor ~}
|
||||
--pod-manifest-path=/etc/kubernetes/manifests \
|
||||
--read-only-port=0 \
|
||||
--volume-plugin-dir=/var/lib/kubelet/volumeplugins
|
||||
|
@ -81,6 +81,12 @@ variable "cluster_domain_suffix" {
|
||||
default = "cluster.local"
|
||||
}
|
||||
|
||||
variable "node_labels" {
|
||||
description = "List of additional labels to add to worker nodes"
|
||||
type = list
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "clc_snippets" {
|
||||
type = list(string)
|
||||
description = "Container Linux Config snippets"
|
||||
|
@ -82,6 +82,7 @@ data "template_file" "worker-config" {
|
||||
ssh_authorized_key = var.ssh_authorized_key
|
||||
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
|
||||
cluster_domain_suffix = var.cluster_domain_suffix
|
||||
node_labels = join(",", var.node_labels)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user