Browse Source

Add calico_ipv4pool_ipip label

IPIP Mode to use for the IPv4 POOL created at start up
allowed_values: ["Always", "CrossSubnet", "Never", "Off"]
default: "Off"

Change-Id: Ib834a1f86a6db408047cc8f86fc7744d16d83904
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
changes/13/701713/3
Diogo Guerra 3 years ago committed by Diogo Guerra
parent
commit
355c71924b
  1. 4
      doc/source/user/index.rst
  2. 2
      magnum/drivers/common/templates/kubernetes/fragments/calico-service.sh
  3. 1
      magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh
  4. 1
      magnum/drivers/heat/k8s_coreos_template_def.py
  5. 1
      magnum/drivers/heat/k8s_fedora_template_def.py
  6. 8
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml
  7. 5
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml
  8. 8
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubecluster.yaml
  9. 5
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml
  10. 6
      magnum/tests/unit/drivers/test_template_definition.py
  11. 6
      releasenotes/notes/calico-configuration-label-ae0b43a7c7123f02.yaml

4
doc/source/user/index.rst

@ -2500,6 +2500,10 @@ _`calico_ipv4pool`
IPv4 network in CIDR format which is the IP pool, from which Pod IPs will
be chosen. If not specified, the default is 192.168.0.0/16.
_`calico_ipv4pool_ipip`
IPIP Mode to use for the IPv4 POOL created at start up.
Ussuri default: Off
_`calico_tag`
Tag of the calico containers used to provision the calico node

2
magnum/drivers/common/templates/kubernetes/fragments/calico-service.sh

@ -398,7 +398,7 @@ spec:
- name: CALICO_IPV4POOL_CIDR
value: ${CALICO_IPV4POOL}
- name: CALICO_IPV4POOL_IPIP
value: "off"
value: ${CALICO_IPV4POOL_IPIP}
- name: CALICO_IPV4POOL_NAT_OUTGOING
value: "true"
# Set noderef for node controller.

1
magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh

@ -80,6 +80,7 @@ CA_KEY="$CA_KEY"
CALICO_TAG="$CALICO_TAG"
CALICO_KUBE_CONTROLLERS_TAG="$CALICO_KUBE_CONTROLLERS_TAG"
CALICO_IPV4POOL="$CALICO_IPV4POOL"
CALICO_IPV4POOL_IPIP="$CALICO_IPV4POOL_IPIP"
INGRESS_CONTROLLER="$INGRESS_CONTROLLER"
INGRESS_CONTROLLER_ROLE="$INGRESS_CONTROLLER_ROLE"
OCTAVIA_INGRESS_CONTROLLER_TAG="$OCTAVIA_INGRESS_CONTROLLER_TAG"

1
magnum/drivers/heat/k8s_coreos_template_def.py

@ -62,6 +62,7 @@ class CoreOSK8sTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
'availability_zone',
'calico_tag',
'calico_kube_controllers_tag', 'calico_ipv4pool',
'calico_ipv4pool_ipip',
'etcd_tag', 'flannel_tag']
labels = self._get_relevant_labels(cluster, kwargs)

1
magnum/drivers/heat/k8s_fedora_template_def.py

@ -80,6 +80,7 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
'cgroup_driver',
'calico_tag',
'calico_kube_controllers_tag', 'calico_ipv4pool',
'calico_ipv4pool_ipip',
'etcd_tag', 'flannel_tag', 'flannel_cni_tag',
'cloud_provider_tag',
'prometheus_tag', 'grafana_tag',

8
magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml

@ -568,6 +568,13 @@ parameters:
description: Configure the IP pool from which Pod IPs will be chosen
default: "192.168.0.0/16"
calico_ipv4pool_ipip:
type: string
description: IPIP Mode to use for the IPv4 POOL created at start up
default: "Off"
constraints:
- allowed_values: ["Always", "CrossSubnet", "Never", "Off"]
pods_network_cidr:
type: string
description: Configure the IP pool/range from which pod IPs will be chosen
@ -1090,6 +1097,7 @@ resources:
calico_tag: {get_param: calico_tag}
calico_kube_controllers_tag: {get_param: calico_kube_controllers_tag}
calico_ipv4pool: {get_param: calico_ipv4pool}
calico_ipv4pool_ipip: {get_param: calico_ipv4pool_ipip}
pods_network_cidr: {get_param: pods_network_cidr}
ingress_controller: {get_param: ingress_controller}
ingress_controller_role: {get_param: ingress_controller_role}

5
magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml

@ -375,6 +375,10 @@ parameters:
type: string
description: Configure the IP pool from which Pod IPs will be chosen
calico_ipv4pool_ipip:
type: string
description: IPIP Mode to use for the IPv4 POOL created at start up
pods_network_cidr:
type: string
description: Configure the IP pool/range from which pod IPs will be chosen
@ -703,6 +707,7 @@ resources:
"$CALICO_TAG": {get_param: calico_tag}
"$CALICO_KUBE_CONTROLLERS_TAG": {get_param: calico_kube_controllers_tag}
"$CALICO_IPV4POOL": {get_param: calico_ipv4pool}
"$CALICO_IPV4POOL_IPIP": {get_param: calico_ipv4pool_ipip}
"$INGRESS_CONTROLLER": {get_param: ingress_controller}
"$INGRESS_CONTROLLER_ROLE": {get_param: ingress_controller_role}
"$OCTAVIA_INGRESS_CONTROLLER_TAG": {get_param: octavia_ingress_controller_tag}

8
magnum/drivers/k8s_fedora_coreos_v1/templates/kubecluster.yaml

@ -568,6 +568,13 @@ parameters:
description: Configure the IP pool from which Pod IPs will be chosen
default: "192.168.0.0/16"
calico_ipv4pool_ipip:
type: string
description: IPIP Mode to use for the IPv4 POOL created at start up
default: "Off"
constraints:
- allowed_values: ["Always", "CrossSubnet", "Never", "Off"]
pods_network_cidr:
type: string
description: Configure the IP pool/range from which pod IPs will be chosen
@ -1093,6 +1100,7 @@ resources:
calico_tag: {get_param: calico_tag}
calico_kube_controllers_tag: {get_param: calico_kube_controllers_tag}
calico_ipv4pool: {get_param: calico_ipv4pool}
calico_ipv4pool_ipip: {get_param: calico_ipv4pool_ipip}
pods_network_cidr: {get_param: pods_network_cidr}
ingress_controller: {get_param: ingress_controller}
ingress_controller_role: {get_param: ingress_controller_role}

5
magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml

@ -379,6 +379,10 @@ parameters:
type: string
description: Configure the IP pool from which Pod IPs will be chosen
calico_ipv4pool_ipip:
type: string
description: IPIP Mode to use for the IPv4 POOL created at start up
pods_network_cidr:
type: string
description: Configure the IP pool/range from which pod IPs will be chosen
@ -709,6 +713,7 @@ resources:
"$CALICO_TAG": {get_param: calico_tag}
"$CALICO_KUBE_CONTROLLERS_TAG": {get_param: calico_kube_controllers_tag}
"$CALICO_IPV4POOL": {get_param: calico_ipv4pool}
"$CALICO_IPV4POOL_IPIP": {get_param: calico_ipv4pool_ipip}
"$INGRESS_CONTROLLER": {get_param: ingress_controller}
"$INGRESS_CONTROLLER_ROLE": {get_param: ingress_controller_role}
"$OCTAVIA_INGRESS_CONTROLLER_TAG": {get_param: octavia_ingress_controller_tag}

6
magnum/tests/unit/drivers/test_template_definition.py

@ -506,6 +506,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'calico_kube_controllers_tag')
calico_ipv4pool = mock_cluster.labels.get(
'calico_ipv4pool')
calico_ipv4pool_ipip = mock_cluster.labels.get(
'calico_ipv4pool_ipip')
if mock_cluster_template.network_driver == 'flannel':
pods_network_cidr = flannel_cidr
elif mock_cluster_template.network_driver == 'calico':
@ -635,6 +637,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'calico_tag': calico_tag,
'calico_kube_controllers_tag': calico_kube_controllers_tag,
'calico_ipv4pool': calico_ipv4pool,
'calico_ipv4pool_ipip': calico_ipv4pool_ipip,
'cgroup_driver': cgroup_driver,
'pods_network_cidr': pods_network_cidr,
'ingress_controller': ingress_controller,
@ -970,6 +973,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'calico_kube_controllers_tag')
calico_ipv4pool = mock_cluster.labels.get(
'calico_ipv4pool')
calico_ipv4pool_ipip = mock_cluster.labels.get(
'calico_ipv4pool_ipip')
if mock_cluster_template.network_driver == 'flannel':
pods_network_cidr = flannel_cidr
elif mock_cluster_template.network_driver == 'calico':
@ -1101,6 +1106,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'calico_tag': calico_tag,
'calico_kube_controllers_tag': calico_kube_controllers_tag,
'calico_ipv4pool': calico_ipv4pool,
'calico_ipv4pool_ipip': calico_ipv4pool_ipip,
'cgroup_driver': cgroup_driver,
'pods_network_cidr': pods_network_cidr,
'ingress_controller': ingress_controller,

6
releasenotes/notes/calico-configuration-label-ae0b43a7c7123f02.yaml

@ -0,0 +1,6 @@
---
features:
- |
Added calico_ipv4pool_ipip label for configuring calico network_driver
IPIP Mode to use for the IPv4 POOL created at start up.
Allowed_values: Always, CrossSubnet, Never, Off.
Loading…
Cancel
Save