diff --git a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml index 2c09485567..3019c60c19 100644 --- a/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml +++ b/kubernetes/applications/stx-openstack/stx-openstack-helm/stx-openstack-helm/manifests/manifest.yaml @@ -738,12 +738,10 @@ data: chart_name: openvswitch release: openstack-openvswitch namespace: openstack - # If we deploy ovs-dpdk on the host, ovs pod will not be created. - # commenting out the wait block until a solution can be implemented - # wait: - # timeout: 1800 - # labels: - # release_group: osh-openstack-openvswitch + wait: + timeout: 1800 + labels: + release_group: osh-openstack-openvswitch install: no_hooks: false upgrade: @@ -3135,7 +3133,6 @@ data: sequenced: false chart_group: - openstack-libvirt - - openstack-openvswitch - openstack-nova - openstack-nova-api-proxy - openstack-neutron diff --git a/sysinv/sysinv/sysinv/sysinv/helm/openvswitch.py b/sysinv/sysinv/sysinv/sysinv/helm/openvswitch.py index c2dbca81e3..f8d0ae662e 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/openvswitch.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/openvswitch.py @@ -19,20 +19,48 @@ class OpenvswitchHelm(openstack.OpenstackBaseHelm): CHART = constants.HELM_CHART_OPENVSWITCH - def get_overrides(self, namespace=None): - # helm has an issue with installing release of no pod - # https://github.com/helm/helm/issues/4295 - # once this is fixed, we can use 'manifests' instead of 'label' to - # control ovs enable or not - overrides = { - common.HELM_NS_OPENSTACK: { - 'labels': { - 'ovs': { - 'node_selector_key': 'openvswitch', - 'node_selector_value': self._ovs_label_value(), + # There are already two places at where we generate chartgroup overrides. + # If more chartgroup overrides are needed in future, it's better to do it + # at a fixed place. Distributing the overrides in the chart plugins makes + # it hard to manage chartgroup overrides. + def get_meta_overrides(self, namespace, app_name=None, mode=None): + def _meta_overrides(): + if utils.get_vswitch_type(self.dbapi) == \ + constants.VSWITCH_TYPE_NONE: + # add the openvswitch chart into computekit chart group + return { + '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: @@ -42,9 +70,3 @@ class OpenvswitchHelm(openstack.OpenstackBaseHelm): namespace=namespace) else: return overrides - - def _ovs_label_value(self): - if utils.get_vswitch_type(self.dbapi) == constants.VSWITCH_TYPE_NONE: - return "enabled" - else: - return "none"