I am trying to remove "/cluster/apiServer/admissionControl/" from the control plane configuration using patches. As it is a field that is only present in control planes (and not in workers), while using the talosctl command I needed to use the flag --config-patch-control-plane
So,
If I run talosctl gen config talos-k8s-aws-tutorial https://tast:6443/ --with-examples=false --with-docs=false --kubernetes-version 1.23.9 --config-patch-control-plane '[{"op": "remove", "path": "/cluster/apiServer/admissionControl"}]' it works
If I run talosctl gen config talos-k8s-aws-tutorial https://tast:6443/ --with-examples=false --with-docs=false --kubernetes-version 1.23.9 --config-patch '[{"op": "remove", "path": "/cluster/apiServer/admissionControl"}]' I am getting the following error:
failed to generate config bundle: error patching configs: failure applying rfc6902 patches to talos machine config: remove operation does not apply: doc is missing path: "/cluster/apiServer/admissionControl": missing value
So I would like to be available to do the same using the terraform provider, but it looks that I am having a similar error as the previous one:
talos_machine_configuration_controlplane.machineconfig_cp: Creating...
╷
│ Error: failure applying rfc6902 patches to talos machine config: remove operation does not apply: doc is missing path: "/cluster/apiServer/admissionControl": missing value
│
│ with talos_machine_configuration_controlplane.machineconfig_cp,
│ on talos-config.tf line 4, in resource "talos_machine_configuration_controlplane" "machineconfig_cp":
│ 4: resource "talos_machine_configuration_controlplane" "machineconfig_cp" {
Hello,
I am trying to remove
"/cluster/apiServer/admissionControl/"
from the control plane configuration using patches. As it is a field that is only present in control planes (and not in workers), while using thetalosctl
command I needed to use the flag--config-patch-control-plane
So,
talosctl gen config talos-k8s-aws-tutorial https://tast:6443/ --with-examples=false --with-docs=false --kubernetes-version 1.23.9 --config-patch-control-plane '[{"op": "remove", "path": "/cluster/apiServer/admissionControl"}]'
it workstalosctl gen config talos-k8s-aws-tutorial https://tast:6443/ --with-examples=false --with-docs=false --kubernetes-version 1.23.9 --config-patch '[{"op": "remove", "path": "/cluster/apiServer/admissionControl"}]'
I am getting the following error:So I would like to be available to do the same using the terraform provider, but it looks that I am having a similar error as the previous one:
My terraform code:
talos-patches/admissioncontroller.yaml
file content:It is a bug or I am doing something wrong?
More context: https://taloscommunity.slack.com/archives/CG25RPZNE/p1663105063165239