Add memcached to magnum

Change-Id: I42f5fa0ab378cc8c65ee7ecab1e6234c7319370a
This commit is contained in:
okozachenko 2020-07-24 20:52:58 +03:00
parent 5f0ad47923
commit 3372083721
3 changed files with 34 additions and 1 deletions
devstack/lib
openstack_operator

@ -172,7 +172,7 @@ function create_magnum_conf {
iniset $MAGNUM_CONF keystone_authtoken www_authenticate_uri $KEYSTONE_SERVICE_URI_V3
iniset $MAGNUM_CONF keystone_authtoken auth_url $KEYSTONE_AUTH_URI_V3
iniset $MAGNUM_CONF keystone_authtoken auth_version v3
iniset $MAGNUM_CONF keystone_authtoken memcached_servers "mcrouter-memcached-magnum:11211"
if is_fedora || is_suse; then
# magnum defaults to /usr/local/bin, but fedora and suse pip like to
# install things in /usr/bin

@ -39,6 +39,7 @@ def create_or_resume(name, spec, **_):
utils.create_or_update('magnum/service.yml.j2',
name=name)
utils.create_or_update('magnum/memcached.yml.j2', spec=spec)
# deploy rabbitmq
if not utils.ensure_secret("openstack", "magnum-rabbitmq"):
utils.create_or_update('magnum/secret-rabbitmq.yml.j2',

@ -0,0 +1,32 @@
---
# Copyright 2020 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: infrastructure.vexxhost.cloud/v1alpha1
kind: Memcached
metadata:
name: magnum
namespace: openstack
labels:
{{ labels("magnum") | indent(4) }}
spec:
megabytes: 128
{% if 'nodeSelector' in spec %}
nodeSelector:
{{ spec.nodeSelector | to_yaml | indent(4) }}
{% endif %}
{% if 'tolerations' in spec %}
tolerations:
{{ spec.tolerations | to_yaml | indent(4) }}
{% endif %}