Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #170 from mpolednik/packet_pass_tags
Browse files Browse the repository at this point in the history
packet: pass tags to packet_device
  • Loading branch information
invidian authored Feb 17, 2020
2 parents c6e07bb + 804a9a3 commit 6b3ffd9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/flatcar-linux/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ Lokomotive implements support for some [DNS providers](../dns/), if your provide
| reservation_ids_default | Default hardware reservation ID for nodes not listed in the `reservation_ids` map. | "" | "next-available"|
| certs_validity_period_hours | Validity of all the certificates in hours | 8760 | 17520 |
| controller_clc_snippets [[1]](#clc-snippets-limitation) | Controller Container Linux Config snippets | [] | [example](../advanced/customization.md#usage) |
| tags | Tags for Packet instances. The tags are not directly exposed to Kubernetes but can be fetched via Packet API | [] | ["foo", "bar"] |


#### Worker module
Expand All @@ -339,6 +340,7 @@ Lokomotive implements support for some [DNS providers](../dns/), if your provide
| reservation_ids | Map Packet hardware reservation IDs to instances. | {} | { worker-0 = "55555f20-a1fb-55bd-1e11-11af11d11111" } |
| reservation_ids_default | Default hardware reservation ID for nodes not listed in the `reservation_ids` map. | "" | "next-available"|
| clc_snippets [[1]](#clc-snippets-limitation) | Worker Container Linux Config snippets | [] | [example](../advanced/customization.md#usage) |
| tags | Tags for Packet instances. The tags are not directly exposed to Kubernetes but can be fetched via Packet API | [] | ["foo", "bar"] |

Documentation about Packet hardware reservation id can be found here: https://support.packet.com/kb/articles/reserved-hardware.

Expand Down
1 change: 1 addition & 0 deletions packet/flatcar-linux/kubernetes/controllers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ resource "packet_device" "controllers" {

ipxe_script_url = var.ipxe_script_url
always_pxe = false
tags = var.tags
}

data "ct_config" "controller-install-ignitions" {
Expand Down
6 changes: 6 additions & 0 deletions packet/flatcar-linux/kubernetes/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,9 @@ variable "certs_validity_period_hours" {
type = number
default = 8760
}

variable "tags" {
description = "List of tags that will be propagated to master nodes"
type = list(string)
default = []
}
6 changes: 6 additions & 0 deletions packet/flatcar-linux/kubernetes/workers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,9 @@ variable "disable_bgp" {
type = bool
default = false
}

variable "tags" {
description = "List of tags that will be propagated to nodes in this pool"
type = list(string)
default = []
}
2 changes: 2 additions & 0 deletions packet/flatcar-linux/kubernetes/workers/workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ resource "packet_device" "nodes" {
format("worker-%v", count.index),
var.reservation_ids_default,
)

tags = var.tags
}

data "ct_config" "install-ignitions" {
Expand Down

0 comments on commit 6b3ffd9

Please sign in to comment.