Merge "Change the way of disabling ovs container"
This commit is contained in:
commit
09a92ee613
|
@ -738,12 +738,10 @@ data:
|
||||||
chart_name: openvswitch
|
chart_name: openvswitch
|
||||||
release: openstack-openvswitch
|
release: openstack-openvswitch
|
||||||
namespace: openstack
|
namespace: openstack
|
||||||
# If we deploy ovs-dpdk on the host, ovs pod will not be created.
|
wait:
|
||||||
# commenting out the wait block until a solution can be implemented
|
timeout: 1800
|
||||||
# wait:
|
labels:
|
||||||
# timeout: 1800
|
release_group: osh-openstack-openvswitch
|
||||||
# labels:
|
|
||||||
# release_group: osh-openstack-openvswitch
|
|
||||||
install:
|
install:
|
||||||
no_hooks: false
|
no_hooks: false
|
||||||
upgrade:
|
upgrade:
|
||||||
|
@ -3135,7 +3133,6 @@ data:
|
||||||
sequenced: false
|
sequenced: false
|
||||||
chart_group:
|
chart_group:
|
||||||
- openstack-libvirt
|
- openstack-libvirt
|
||||||
- openstack-openvswitch
|
|
||||||
- openstack-nova
|
- openstack-nova
|
||||||
- openstack-nova-api-proxy
|
- openstack-nova-api-proxy
|
||||||
- openstack-neutron
|
- openstack-neutron
|
||||||
|
|
|
@ -19,20 +19,48 @@ class OpenvswitchHelm(openstack.OpenstackBaseHelm):
|
||||||
|
|
||||||
CHART = constants.HELM_CHART_OPENVSWITCH
|
CHART = constants.HELM_CHART_OPENVSWITCH
|
||||||
|
|
||||||
def get_overrides(self, namespace=None):
|
# There are already two places at where we generate chartgroup overrides.
|
||||||
# helm has an issue with installing release of no pod
|
# If more chartgroup overrides are needed in future, it's better to do it
|
||||||
# https://github.com/helm/helm/issues/4295
|
# at a fixed place. Distributing the overrides in the chart plugins makes
|
||||||
# once this is fixed, we can use 'manifests' instead of 'label' to
|
# it hard to manage chartgroup overrides.
|
||||||
# control ovs enable or not
|
def get_meta_overrides(self, namespace, app_name=None, mode=None):
|
||||||
overrides = {
|
def _meta_overrides():
|
||||||
common.HELM_NS_OPENSTACK: {
|
if utils.get_vswitch_type(self.dbapi) == \
|
||||||
'labels': {
|
constants.VSWITCH_TYPE_NONE:
|
||||||
'ovs': {
|
# add the openvswitch chart into computekit chart group
|
||||||
'node_selector_key': 'openvswitch',
|
return {
|
||||||
'node_selector_value': self._ovs_label_value(),
|
'schema': 'armada/ChartGroup/v1',
|
||||||
|
'metadata': {
|
||||||
|
'schema': 'metadata/Document/v1',
|
||||||
|
'name': 'openstack-compute-kit',
|
||||||
|
},
|
||||||
|
'data': {
|
||||||
|
'chart_group': [
|
||||||
|
'openstack-libvirt',
|
||||||
|
'openstack-openvswitch',
|
||||||
|
'openstack-nova',
|
||||||
|
'openstack-nova-api-proxy',
|
||||||
|
'openstack-neutron',
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
overrides = {
|
||||||
|
common.HELM_NS_OPENSTACK: _meta_overrides()
|
||||||
|
}
|
||||||
|
if namespace in self.SUPPORTED_NAMESPACES:
|
||||||
|
return overrides[namespace]
|
||||||
|
elif namespace:
|
||||||
|
raise exception.InvalidHelmNamespace(chart=self.CHART,
|
||||||
|
namespace=namespace)
|
||||||
|
else:
|
||||||
|
return overrides
|
||||||
|
|
||||||
|
def get_overrides(self, namespace=None):
|
||||||
|
overrides = {
|
||||||
|
common.HELM_NS_OPENSTACK: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if namespace in self.SUPPORTED_NAMESPACES:
|
if namespace in self.SUPPORTED_NAMESPACES:
|
||||||
|
@ -42,9 +70,3 @@ class OpenvswitchHelm(openstack.OpenstackBaseHelm):
|
||||||
namespace=namespace)
|
namespace=namespace)
|
||||||
else:
|
else:
|
||||||
return overrides
|
return overrides
|
||||||
|
|
||||||
def _ovs_label_value(self):
|
|
||||||
if utils.get_vswitch_type(self.dbapi) == constants.VSWITCH_TYPE_NONE:
|
|
||||||
return "enabled"
|
|
||||||
else:
|
|
||||||
return "none"
|
|
||||||
|
|
Loading…
Reference in New Issue