Netcracker / KubeMarine

Management tool for Kubernetes cluster deployment and maintenance
Apache License 2.0
118 stars 13 forks source link

Calico non-overlay mode #561

Closed alexarefev closed 9 months ago

alexarefev commented 9 months ago

Currently, there is no availability to set Calico in non-overlay mode in cluster.yaml

The calico-ippool.yaml.j2 template has the following part:

apiVersion: projectcalico.org/v3
kind: IPPool
...
{% if services.kubeadm.networking.podSubnet|isipv4 %}
  vxlanMode: {% if plugins.calico.mode == 'vxlan' and plugins['calico']['crossSubnet'] %}CrossSubnet{% elif plugins.calico.mode == 'vxlan' %}Always{% else %}Never{% endif %}
  ipipMode: {% if plugins.calico.mode == 'ipip' and plugins['calico']['crossSubnet'] %}CrossSubnet{% elif plugins.calico.mode == 'ipip' %}Always{% else %}Never{% endif %}
{% endif %}

the related part of cluster.yaml is the following:

...
plugins:
  calico:
    mode: ipip
    crossSubnet: true
...

There are two possible options: ipip and vxlan.

We need approach to set vxlanMode and ipipMode to Never in IPPool specification

alexarefev commented 9 months ago

It needs to add third option into the calico.json schema

e.g.:

    "mode": {
      "enum": ["ipip", "vxlan", "none"],
      "default": "ipip",
      "description": "Network protocol to be used in network plugin"
    },