terraform-kops / terraform-provider-kops

Brings kOps into terraform in a fully managed way
https://registry.terraform.io/providers/terraform-kops/kops/latest
Apache License 2.0
10 stars 3 forks source link

Blocks of type "kube_proxy" are not expected here. #63

Closed lemaral closed 4 months ago

lemaral commented 4 months ago

(First of all, I must say that I'm very happy that this provider is getting an afterlife thanks! :) I am using cilium cni and would like to replace kube_proxy with cilium's nodeport as documented here: https://kops.sigs.k8s.io/networking/cilium/#enabling-bpf-nodeport However when I try to declare the kube_proxy block, the kops provider does not recognise it:

  kube_proxy {
    enabled = false
  }
│ Error: Unsupported block type
│
│   on main.tf line 121, in resource "kops_cluster" "cluster":
│  121:   kube_proxy {
│
│ Blocks of type "kube_proxy" are not expected here.

When I disable kubeProxy using the kops cli, terraform plan is showing this diff

      - kube_proxy {
          - conntrack_max_per_core = 0 -> null
          - conntrack_min          = 0 -> null
          - enabled                = false -> null
          - feature_gates          = {} -> null
          - ip_vs_exclude_cidrs    = [] -> null
          - log_level              = 0 -> null
            # (14 unchanged attributes hidden)
        }

What's missing?

sl1pm4t commented 4 months ago

It's hard to say what is wrong without seeing the full config, but kube_proxy blocks are certainly supported (we use them also). Maybe there is an unclosed brace somewhere that is putting the kube_proxy block at an unexpected level?

lemaral commented 4 months ago

Thanks for confirming, it was in the networking block indeed.