kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  # the default CNI will not be installed
  disableDefaultCNI: true
  apiServerAddress: {{ ovn_apiServerAddress | default('0.0.0.0') }}
  apiServerPort: 11337
{%- if net_cidr %}
  podSubnet: "{{ net_cidr }}"
{%- endif %}
{%- if svc_cidr %}
  serviceSubnet: "{{ svc_cidr }}"
{%- endif %}
{%- if ovn_ip_family %}
  ipFamily: {{ ovn_ip_family }}
{%- endif %}
featureGates:
  SCTPSupport: true
kubeadmConfigPatches:
- |
  kind: ClusterConfiguration
  metadata:
    name: config
  apiServer:
    extraArgs:
      "v": "{{ cluster_log_level }}"
  controllerManager:
    extraArgs:
      "v": "{{ cluster_log_level }}"
  scheduler:
    extraArgs:
      "v": "{{ cluster_log_level }}"
  ---
  kind: InitConfiguration
  nodeRegistration:
    kubeletExtraArgs:
      "v": "{{ cluster_log_level }}"
  ---
  kind: JoinConfiguration
  nodeRegistration:
    kubeletExtraArgs:
      "v": "{{ cluster_log_level }}"
nodes:
 - role: control-plane
   kubeadmConfigPatches:
   - |
     kind: InitConfiguration
     nodeRegistration:
       kubeletExtraArgs:
         node-labels: "ingress-ready=true"
         authorization-mode: "AlwaysAllow"
{%- if ovn_ha is equalto "true" %}
{%- for _ in range(1, ovn_num_master | int) %}
 - role: worker
{%- endfor %}
{%- endif %}
{%- for _ in range(ovn_num_worker | int) %}
 - role: worker
{%- endfor %}
