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 31c72f1ad3..06ccc9ec7d 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 @@ -803,6 +803,16 @@ data: cron_job_cell_setup: false cron_job_service_cleaner: false statefulset_compute_ironic: false + deployment_placement: false + ingress_placement: false + job_db_init_placement: false + job_ks_placement_endpoints: false + job_ks_placement_service: false + job_ks_placement_user: false + pdb_placement: false + secret_keystone_placement: false + service_ingress_placement: false + service_placement: false labels: agent: compute: @@ -829,9 +839,6 @@ data: osapi: node_selector_key: openstack-control-plane node_selector_value: enabled - placement: - node_selector_key: openstack-control-plane - node_selector_value: enabled scheduler: node_selector_key: openstack-control-plane node_selector_value: enabled @@ -872,7 +879,6 @@ data: type: null replicas: api_metadata: 1 - placement: 1 osapi: 1 conductor: 1 consoleauth: 1 @@ -948,8 +954,6 @@ data: idle_timeout: 60 max_overflow: 64 max_pool_size: 1 - placement: - os_interface: internal neutron: default_floating_pool: public notifications: @@ -998,6 +1002,68 @@ data: - helm-toolkit --- schema: armada/Chart/v1 +metadata: + schema: metadata/Document/v1 + name: openstack-placement +data: + chart_name: placement + release: openstack-placement + namespace: openstack + wait: + timeout: 1800 + labels: + release_group: osh-openstack-placement + test: + enabled: false + install: + no_hooks: false + upgrade: + no_hooks: false + pre: + delete: + - type: job + labels: + release_group: osh-openstack-placement + values: + labels: + placement: + node_selector_key: openstack-control-plane + node_selector_value: enabled + job: + node_selector_key: openstack-control-plane + node_selector_value: enabled + images: + tags: + placement: docker.io/starlingx/stx-placement:master-centos-stable-latest + ks_user: docker.io/starlingx/stx-heat:master-centos-stable-latest + ks_service: docker.io/starlingx/stx-heat:master-centos-stable-latest + ks_endpoints: docker.io/starlingx/stx-heat:master-centos-stable-latest + db_drop: docker.io/starlingx/stx-heat:master-centos-stable-latest + db_init: docker.io/starlingx/stx-heat:master-centos-stable-latest + placement_db_sync: docker.io/starlingx/stx-placement:master-centos-stable-latest + pod: + replicas: + placement: 1 + affinity: + anti: + type: + default: requiredDuringSchedulingIgnoredDuringExecution + user: + placement: + uid: 42424 + conf: + placement: + DEFAULT: + log_config_append: /etc/placement/logging.conf + source: + type: tar + location: http://172.17.0.1/helm_charts/starlingx/placement-0.1.0.tgz + subpath: placement + reference: master + dependencies: + - helm-toolkit +--- +schema: armada/Chart/v1 metadata: schema: metadata/Document/v1 name: openstack-nova-api-proxy @@ -3139,6 +3205,7 @@ data: - openstack-nova - openstack-nova-api-proxy - openstack-neutron + - openstack-placement --- schema: armada/ChartGroup/v1 metadata: diff --git a/sysinv/sysinv/sysinv/setup.cfg b/sysinv/sysinv/sysinv/setup.cfg index f175a2bcc7..b2bcebd57f 100644 --- a/sysinv/sysinv/sysinv/setup.cfg +++ b/sysinv/sysinv/sysinv/setup.cfg @@ -105,6 +105,7 @@ systemconfig.helm_plugins.stx_openstack = 022_keystone-api-proxy = sysinv.helm.keystone_api_proxy:KeystoneApiProxyHelm 023_ceph-rgw = sysinv.helm.swift:SwiftHelm 024_ironic = sysinv.helm.ironic:IronicHelm + 025_placement = sysinv.helm.placement:PlacementHelm sysinv.agent.lldp.drivers = lldpd = sysinv.agent.lldp.drivers.lldpd.driver:SysinvLldpdAgentDriver diff --git a/sysinv/sysinv/sysinv/sysinv/common/constants.py b/sysinv/sysinv/sysinv/sysinv/common/constants.py index 4442b5fb87..f254b4d728 100644 --- a/sysinv/sysinv/sysinv/sysinv/common/constants.py +++ b/sysinv/sysinv/sysinv/sysinv/common/constants.py @@ -1451,6 +1451,7 @@ HELM_CHART_NOVA = 'nova' HELM_CHART_NOVA_API_PROXY = 'nova-api-proxy' HELM_CHART_OPENVSWITCH = 'openvswitch' HELM_CHART_PANKO = 'panko' +HELM_CHART_PLACEMENT = 'placement' HELM_CHART_RABBITMQ = 'rabbitmq' HELM_CHART_RBD_PROVISIONER = 'rbd-provisioner' HELM_CHART_CEPH_POOLS_AUDIT = 'ceph-pools-audit' diff --git a/sysinv/sysinv/sysinv/sysinv/helm/nova.py b/sysinv/sysinv/sysinv/sysinv/helm/nova.py index 2544a96a00..143ea90a94 100644 --- a/sysinv/sysinv/sysinv/sysinv/helm/nova.py +++ b/sysinv/sysinv/sysinv/sysinv/helm/nova.py @@ -57,8 +57,8 @@ class NovaHelm(openstack.OpenstackBaseHelm): CHART = constants.HELM_CHART_NOVA SERVICE_NAME = 'nova' - AUTH_USERS = ['nova', 'placement'] - SERVICE_USERS = ['neutron', 'ironic'] + AUTH_USERS = ['nova', ] + SERVICE_USERS = ['neutron', 'ironic', 'placement'] NOVNCPROXY_SERVICE_NAME = 'novncproxy' def get_overrides(self, namespace=None): diff --git a/sysinv/sysinv/sysinv/sysinv/helm/placement.py b/sysinv/sysinv/sysinv/sysinv/helm/placement.py new file mode 100644 index 0000000000..c9f3cdd22b --- /dev/null +++ b/sysinv/sysinv/sysinv/sysinv/helm/placement.py @@ -0,0 +1,55 @@ +# +# Copyright (c) 2019 StarlingX. +# +# SPDX-License-Identifier: Apache-2.0 +# + +from sysinv.common import constants +from sysinv.common import exception +from sysinv.helm import common +from sysinv.helm import openstack + + +class PlacementHelm(openstack.OpenstackBaseHelm): + """Class to encapsulate helm operations for the placement chart""" + + CHART = constants.HELM_CHART_PLACEMENT + + SERVICE_NAME = 'placement' + AUTH_USERS = ['placement'] + + def get_overrides(self, namespace=None): + + overrides = { + common.HELM_NS_OPENSTACK: { + 'pod': { + 'replicas': { + 'api': self._num_controllers() + } + }, + 'endpoints': self._get_endpoints_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_endpoints_overrides(self): + overrides = { + 'identity': { + 'name': 'keystone', + 'auth': self._get_endpoints_identity_overrides( + self.SERVICE_NAME, self.AUTH_USERS), + }, + 'oslo_db': { + 'auth': self._get_endpoints_oslo_db_overrides( + self.SERVICE_NAME, [self.SERVICE_NAME]) + } + } + + return overrides