Skip to content

Commit

Permalink
Merge pull request #10 from DrFaust92/r/node_selectors
Browse files Browse the repository at this point in the history
node selectors are configurable
  • Loading branch information
DrFaust92 authored May 16, 2021
2 parents 73e5961 + 38cfcde commit e3aeda1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ No modules.
|------|-------------|------|---------|:--------:|
| <a name="input_annotations"></a> [annotations](#input\_annotations) | Optional annotations to add to EFS CSI driver resources | `map(string)` | `{}` | no |
| <a name="input_csi_controller_tolerations"></a> [csi\_controller\_tolerations](#input\_csi\_controller\_tolerations) | CSI driver controller tolerations | `list(map(string))` | `[]` | no |
| <a name="input_extra_node_selectors"></a> [extra\_node\_selectors](#input\_extra\_node\_selectors) | A map of extra node selectors for all components | `map(string)` | `{}` | no |
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | The log level for the CSI Driver controller | `number` | `5` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace for EFS CSI driver resources | `string` | `"kube-system"` | no |
| <a name="input_node_extra_node_selectors"></a> [node\_extra\_node\_selectors](#input\_node\_extra\_node\_selectors) | A map of extra node selectors for node pods | `map(string)` | `{}` | no |

## Outputs

Expand Down
6 changes: 3 additions & 3 deletions daemonset.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ resource "kubernetes_daemonset" "efs" {
}

spec {
node_selector = {
"beta.kubernetes.io/os" = "linux"
}
node_selector = merge({
"beta.kubernetes.io/os" : "linux",
}, var.extra_node_selectors, var.node_extra_node_selectors)

toleration {
operator = "Exists"
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ variable "log_level" {
description = "The log level for the CSI Driver controller"
default = 5
type = number
}

variable "extra_node_selectors" {
description = "A map of extra node selectors for all components"
default = {}
type = map(string)
}

variable "node_extra_node_selectors" {
description = "A map of extra node selectors for node pods"
default = {}
type = map(string)
}

0 comments on commit e3aeda1

Please sign in to comment.