This message was deleted.
# terraform-provider-rancher2
a
This message was deleted.
s
(1) cluster_v2 machine pools has a
labels
field that should be for node labels but for some reason the provider logic transforms a map of
labels
into
machineDeploymentLabels
I noticed (1) as well. There is an issue for it on github as well: • https://github.com/rancher/terraform-provider-rancher2/issues/949 And I created a PR to "fix" it. But wasn't quite sure what the intended behaviour should be.
🙌 1
s
@polite-honey-55746 from RGS relayed this solution from the provider dev team:
(2) I'm trying to pass in a map of
kubelet-arg
values into cluster_v2 machine_selector_configs but it's also undocumented in the provider docs.
Instead of passing the values in to
machine_selector_config
, we instead passed it in to
machine_global_config
so the relevant block on the terraform plan looks like this when I try to set a static CPU policy on the cluster
Copy code
machine_global_config = <<-EOF
kubelet-arg:
- cpu-manager-policy=static
- kube-reserved=cpu=500m,memory=1Gi,ephemeral-storage=1Gi
- system-reserved=cpu=300m,memory=500Mi,ephemeral-storage=1Gi
- eviction-hard=memory.available<500Mi,nodefs.available<10%
EOF
Verified kubelet started with the correct args and I was able to create
guaranteed
workloads with this method.