Remove dataDir in glance config

Change-Id: I8a460cad79dbf4c34b6f2c6b04454c075dcdbab7
This commit is contained in:
okozachenko 2020-07-31 17:41:13 +03:00
parent b5e202800c
commit aee4493a17
5 changed files with 4 additions and 50 deletions

View File

@ -3,10 +3,7 @@ secretName: devstack
configMap:
ceilometer:
dbUri: "sqlite:///:memory:"
glance:
dataDir: /opt/stack/data/glance
mysql:
size: 10Gi
glance: {}
horizon:
hostAliases:
- hostnames:

View File

@ -12,9 +12,8 @@ data:
keystone: {}
heat: {}
magnum: {}
glance:
dataDir: /opt/stack/data/glance
chronyd: {}
backup:
secretName: aws-backup
url: s3://backups/
url: s3://backups/
glance: {}

View File

@ -43,9 +43,8 @@ function configure_glance {
iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_API_CONF database connection "mysql+pymysql://$GLANCE_DATABASE_USER:$GLANCE_DATABASE_PASSWORD@glance-mysql/$GLANCE_DATABASE_NAME?charset=utf8"
iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
iniset $GLANCE_API_CONF oslo_concurrency lock_path $GLANCE_LOCK_DIR
iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement
iniset $GLANCE_API_CONF paste_deploy flavor keystone
configure_keystone_authtoken_middleware $GLANCE_API_CONF glance
iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2
iniset_rpc_backend glance $GLANCE_API_CONF
@ -80,27 +79,6 @@ function configure_glance {
iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST"
fi
# No multiple stores for swift yet
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then
iniset $GLANCE_API_CONF glance_store default_store swift
iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True
iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF
iniset $GLANCE_API_CONF glance_store default_swift_reference ref1
iniset $GLANCE_API_CONF glance_store stores "file, http, swift"
if is_service_enabled tls-proxy; then
iniset $GLANCE_API_CONF glance_store swift_store_cacert $SSL_BUNDLE_FILE
fi
iniset $GLANCE_API_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
iniset $GLANCE_SWIFT_STORE_CONF ref1 user $SERVICE_PROJECT_NAME:glance-swift
iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
fi
# We need to tell glance what it's public endpoint is so that the version
# discovery document will be correct
iniset $GLANCE_API_CONF DEFAULT public_endpoint $GLANCE_URL
@ -116,18 +94,6 @@ function configure_glance {
cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
# Set non-default configuration options for the glance-cache
iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_SERVICE_URI
iniset $GLANCE_CACHE_CONF DEFAULT admin_tenant_name $SERVICE_PROJECT_NAME
iniset $GLANCE_CACHE_CONF DEFAULT admin_user glance
iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
# Store specific confs
iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
# Set default configuration options for the glance-image-import
iniset $GLANCE_IMAGE_IMPORT_CONF image_import_opts image_import_plugins []
iniset $GLANCE_IMAGE_IMPORT_CONF inject_metadata_properties ignore_user_roles admin
@ -142,7 +108,6 @@ function configure_glance {
CINDER_SERVICE_PORT=${CINDER_SERVICE_PORT:-8776}
iniset $GLANCE_API_CONF DEFAULT cinder_endpoint_template "https://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/%(project_id)s"
iniset $GLANCE_CACHE_CONF DEFAULT cinder_endpoint_template "https://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/%(project_id)s"
fi
if [[ "$GLANCE_STANDALONE" == False ]]; then

View File

@ -40,7 +40,6 @@ elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
kubectl create secret generic glance-config -n openstack \
--from-file=/etc/glance/glance-api.conf \
--from-file=/etc/glance/glance-api-paste.ini \
--from-file=/etc/glance/glance-cache.conf \
--from-file=/etc/glance/glance-swift-store.conf
# NOTE(Alex): Permissions here are bad but it's temporary so we don't care as much.

View File

@ -81,8 +81,6 @@ spec:
mountPath: /etc/ceph
- name: config
mountPath: /etc/glance
- name: data
mountPath: {{ spec['dataDir'] }}
- name: uwsgi-config
mountPath: /etc/uwsgi
volumes:
@ -92,10 +90,6 @@ spec:
- name: config
secret:
secretName: glance-config
- name: data
hostPath:
path: {{ spec['dataDir'] }}
type: Directory
- name: uwsgi-config
configMap:
defaultMode: 420