Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set initial node_labels for default workers and worker pools #550

Merged
merged 1 commit into from
Sep 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions aws/container-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,9 @@ variable "enable_aggregation" {
default = "false"
}

variable "worker_node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}

1 change: 1 addition & 0 deletions aws/container-linux/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ module "workers" {
service_cidr = var.service_cidr
cluster_domain_suffix = var.cluster_domain_suffix
clc_snippets = var.worker_clc_snippets
node_labels = var.worker_node_labels
}

3 changes: 3 additions & 0 deletions aws/container-linux/kubernetes/workers/cl/worker.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,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
Expand Down
5 changes: 5 additions & 0 deletions aws/container-linux/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ variable "cluster_domain_suffix" {
default = "cluster.local"
}

variable "node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}
1 change: 1 addition & 0 deletions aws/container-linux/kubernetes/workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ data "template_file" "worker-config" {
cluster_dns_service_ip = cidrhost(var.service_cidr, 10)
cluster_domain_suffix = var.cluster_domain_suffix
cgroup_driver = local.flavor == "flatcar" && local.channel == "edge" ? "systemd" : "cgroupfs"
node_labels = join(",", var.node_labels)
}
}

5 changes: 5 additions & 0 deletions aws/fedora-coreos/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,8 @@ variable "enable_aggregation" {
default = "false"
}

variable "worker_node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}
1 change: 1 addition & 0 deletions aws/fedora-coreos/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ module "workers" {
service_cidr = var.service_cidr
cluster_domain_suffix = var.cluster_domain_suffix
snippets = var.worker_snippets
node_labels = var.worker_node_labels
}

3 changes: 3 additions & 0 deletions aws/fedora-coreos/kubernetes/workers/fcc/worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,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
Expand Down
5 changes: 5 additions & 0 deletions aws/fedora-coreos/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ variable "cluster_domain_suffix" {
default = "cluster.local"
}

variable "node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}
1 change: 1 addition & 0 deletions aws/fedora-coreos/kubernetes/workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,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)
}
}

6 changes: 6 additions & 0 deletions azure/container-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,9 @@ variable "enable_aggregation" {
default = "false"
}

variable "worker_node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}

1 change: 1 addition & 0 deletions azure/container-linux/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ module "workers" {
service_cidr = var.service_cidr
cluster_domain_suffix = var.cluster_domain_suffix
clc_snippets = var.worker_clc_snippets
node_labels = var.worker_node_labels
}

3 changes: 3 additions & 0 deletions azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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
Expand Down
5 changes: 5 additions & 0 deletions azure/container-linux/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ variable "cluster_domain_suffix" {
default = "cluster.local"
}

variable "node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}
1 change: 1 addition & 0 deletions azure/container-linux/kubernetes/workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,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)
}
}

6 changes: 6 additions & 0 deletions google-cloud/container-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ variable "enable_aggregation" {
default = "false"
}

variable "worker_node_labels" {
description = "List of additional labels to add to worker nodes"
type = list
default = []
}

1 change: 1 addition & 0 deletions google-cloud/container-linux/kubernetes/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ module "workers" {
service_cidr = var.service_cidr
cluster_domain_suffix = var.cluster_domain_suffix
clc_snippets = var.worker_clc_snippets
node_labels = var.worker_node_labels
}

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions google-cloud/container-linux/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions google-cloud/container-linux/kubernetes/workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}