Merge "add cilium in the supported network driver list of k8s"

This commit is contained in:
Zuul 2024-02-15 07:42:12 +00:00 committed by Gerrit Code Review
commit de6796bd10
5 changed files with 15 additions and 9 deletions

View File

@ -2265,8 +2265,6 @@ network-driver
+========+=============+ +========+=============+
| Flannel| supported | | Flannel| supported |
+--------+-------------+ +--------+-------------+
| Docker | unsupported |
+--------+-------------+
| Calico | supported | | Calico | supported |
+--------+-------------+ +--------+-------------+

View File

@ -319,7 +319,12 @@ class Validator(object):
class K8sValidator(Validator): class K8sValidator(Validator):
supported_network_drivers = ['flannel', 'calico'] # NOTE(okozachenko): Cilium is added in the supported list because some
# cluster drivers like capi-driver supports this. But the Heat driver
# doesn't support this yet.
# In the future, supported network driver list should be fetched from
# cluster driver implementation instead of this fixed values.
supported_network_drivers = ['flannel', 'calico', 'cilium']
supported_server_types = ['vm', 'bm'] supported_server_types = ['vm', 'bm']
allowed_network_drivers = ( allowed_network_drivers = (
CONF.cluster_template.kubernetes_allowed_network_drivers) CONF.cluster_template.kubernetes_allowed_network_drivers)

View File

@ -19,11 +19,8 @@ cluster_template_group = cfg.OptGroup(name='cluster_template',
cluster_template_opts = [ cluster_template_opts = [
cfg.ListOpt('kubernetes_allowed_network_drivers', cfg.ListOpt('kubernetes_allowed_network_drivers',
default=['all'], default=['flannel', 'calico'],
help=_("Allowed network drivers for kubernetes " help=_("Allowed network drivers for kubernetes."),
"cluster-templates. Use 'all' keyword to allow all "
"drivers supported for kubernetes cluster-templates. "
"Supported network drivers include flannel."),
), ),
cfg.StrOpt('kubernetes_default_network_driver', cfg.StrOpt('kubernetes_default_network_driver',
default='flannel', default='flannel',

View File

@ -159,7 +159,9 @@ class TestValidation(base.BaseTestCase):
def test_enforce_network_driver_types_default_config_create(self): def test_enforce_network_driver_types_default_config_create(self):
cluster_template = self._test_enforce_network_driver_types_create( cluster_template = self._test_enforce_network_driver_types_create(
network_driver_type=None, validator_default_network_driver="type1" network_driver_type=None,
validator_allowed_network_drivers=["type1"],
validator_default_network_driver="type1",
) )
self.assertEqual("type1", cluster_template.network_driver) self.assertEqual("type1", cluster_template.network_driver)

View File

@ -0,0 +1,4 @@
---
features:
- |
Add Cilium as a supported network driver of Kubernetes