kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  # the default CNI will not be installed
  disableDefaultCNI: true
  apiServerAddress: {{ ovn_apiServerAddress | default('11.12.13.1') }}
  apiServerPort: 11337
{%- if ovn_ip_family %}
  ipFamily: {{ ovn_ip_family }}
{%- endif %}
kubeadmConfigPatches:
- |
  kind: ClusterConfiguration
  metadata:
    name: config
  apiServer:
    extraArgs:
      "feature-gates": "SCTPSupport=true"
nodes:
 - role: control-plane
   extraMounts:
     - hostPath: /tmp/kind
       containerPath: /var/run/secrets/kubernetes.io/serviceaccount/
   kubeadmConfigPatches:
   - |
     kind: InitConfiguration
     nodeRegistration:
       kubeletExtraArgs:
         node-labels: "ingress-ready=true"
         authorization-mode: "AlwaysAllow"
{%- if ovn_ha is equalto "true" %}
 - role: control-plane
   extraMounts:
     - hostPath: /tmp/kind
       containerPath: /var/run/secrets/kubernetes.io/serviceaccount/
 - role: control-plane
   extraMounts:
     - hostPath: /tmp/kind
       containerPath: /var/run/secrets/kubernetes.io/serviceaccount/
{%- else %}
 - role: worker
   extraMounts:
     - hostPath: /tmp/kind
       containerPath: /var/run/secrets/kubernetes.io/serviceaccount/
 - role: worker
   extraMounts:
     - hostPath: /tmp/kind
       containerPath: /var/run/secrets/kubernetes.io/serviceaccount/
{%- endif %}

