Merge "use one mariadb server pod for AIO-DX"
This commit is contained in:
commit
8121910a97
|
@ -4,6 +4,7 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from sysinv.api.controllers.v1 import utils
|
||||||
from sysinv.common import constants
|
from sysinv.common import constants
|
||||||
from sysinv.common import exception
|
from sysinv.common import exception
|
||||||
from sysinv.openstack.common import log as logging
|
from sysinv.openstack.common import log as logging
|
||||||
|
@ -32,11 +33,12 @@ class GarbdHelm(base.BaseHelm):
|
||||||
def get_meta_overrides(self, namespace):
|
def get_meta_overrides(self, namespace):
|
||||||
|
|
||||||
def _meta_overrides():
|
def _meta_overrides():
|
||||||
if self._num_controllers() < 2:
|
if (self._num_controllers() < 2 or
|
||||||
# If there are fewer than 2 controllers we'll use a single
|
utils.is_aio_duplex_system(self.dbapi)):
|
||||||
# mariadb server and so we don't want to run garbd. This
|
# If there are fewer than 2 controllers or we're on AIO-DX
|
||||||
# will remove "openstack-garbd" from the charts in the
|
# we'll use a single mariadb server and so we don't want to
|
||||||
# openstack-mariadb chartgroup.
|
# run garbd. This will remove "openstack-garbd" from the
|
||||||
|
# charts in the openstack-mariadb chartgroup.
|
||||||
return {
|
return {
|
||||||
'schema': 'armada/ChartGroup/v1',
|
'schema': 'armada/ChartGroup/v1',
|
||||||
'metadata': {
|
'metadata': {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from sysinv.api.controllers.v1 import utils
|
||||||
from sysinv.common import constants
|
from sysinv.common import constants
|
||||||
from sysinv.common import exception
|
from sysinv.common import exception
|
||||||
from sysinv.openstack.common import log as logging
|
from sysinv.openstack.common import log as logging
|
||||||
|
@ -21,6 +22,14 @@ class MariadbHelm(openstack.OpenstackBaseHelm):
|
||||||
common.HELM_NS_OPENSTACK
|
common.HELM_NS_OPENSTACK
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def _num_server_replicas(self):
|
||||||
|
# For now we want to run with a single mariadb server pod for the
|
||||||
|
# AIO-DX case.
|
||||||
|
if utils.is_aio_duplex_system(self.dbapi):
|
||||||
|
return 1
|
||||||
|
else:
|
||||||
|
return self._num_controllers()
|
||||||
|
|
||||||
def get_namespaces(self):
|
def get_namespaces(self):
|
||||||
return self.SUPPORTED_NAMESPACES
|
return self.SUPPORTED_NAMESPACES
|
||||||
|
|
||||||
|
@ -29,7 +38,7 @@ class MariadbHelm(openstack.OpenstackBaseHelm):
|
||||||
common.HELM_NS_OPENSTACK: {
|
common.HELM_NS_OPENSTACK: {
|
||||||
'pod': {
|
'pod': {
|
||||||
'replicas': {
|
'replicas': {
|
||||||
'server': self._num_controllers()
|
'server': self._num_server_replicas()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'images': self._get_images_overrides(),
|
'images': self._get_images_overrides(),
|
||||||
|
|
Loading…
Reference in New Issue