Reputation: 101
I'm using Terraform for deploying cert-manager and ambassador.
Trying to understand how to use nodeSelector in terraform deployment and assign the helm chart I'm using for both services to a specific group node I have (using a label with key and value to assign)
resource "helm_release" "cert_manager" {
namespace = var.cert_manager_namespace
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = var.cert_manager_release_version
create_namespace = true
count = var.enable
set {
name = "controller."
}
set {
name = "controller.nodeselector"
value = ""
}
set {
name = "installCRDs" # Should only happen on the first attempt
value = "true"
}
set {
name = "securityContext.enabled"
value = "true"
}
Thie example above is me trying to assign it. Any ideas?
Thanks!!
Upvotes: 5
Views: 2777
Reputation: 41
If Your nodeSelector location in values.yaml looks like this:
controller:
nodeSelector: {}
You should be setting it up this way:
set {
name = "controller.nodeSelector.dedicated"
value = "workloads"
}
Where dedicated is key and workloads is value.
Upvotes: 2