apiVersion: v1
data:
  config.json: |-
    {
        "config_files": [
            {
                "dest": "/etc/glance/glance-api.conf",
                "source": "/var/lib/kolla/config_files/glance-api.conf",
                "perm": "0600",
                "owner": "glance"
            },
            {
                "dest": "/etc/glance/policy.json",
                "source": "/var/lib/kolla/config_files/policy.json",
                "optional": true,
                "perm": "0600",
                "owner": "glance"
            },
            {
                "dest": "/etc/ceph/ceph.client.glance.keyring",
                "source": "/var/lib/kolla/config_files/ceph.client.glance.keyring",
                "owner": "glance",
                "perm": "0700"
            },
            {
                "dest": "/etc/ceph/ceph.conf",
                "source": "/var/lib/kolla/config_files/ceph.conf",
                "owner": "glance",
                "perm": "0700"
            }
        ],
        "command": "glance-api",
        "permissions": [
            {
                "owner": "glance:glance",
                "path": "/var/lib/glance",
                "recurse": true
            },
            {
                "owner": "glance:glance",
                "path": "/var/log/kolla/glance",
                "recurse": true
            }
        ]
    }
  glance-api.conf: |+
    [DEFAULT]
    debug = True
    log_file = /var/log/kolla/glance/api.log
    use_forwarded_for = true
    bind_host = 0.0.0.0
    bind_port = 9292
    workers = 1
    registry_host = glance-registry
    show_image_direct_url = True
    show_multiple_locations = True
    cinder_catalog_info = volume:cinder:internalURL
    transport_url = rabbit://openstack:n8ZKhaSiHmBQgZTwJ8QsKJEkV2cbJnsyqUi6waMl@rabbitmq:5672

    [database]
    connection = mysql+pymysql://glance:sgkRfkjn1oh110NcLxwUYthPOBuHDHr6KkGN0QRP@mariadb/glance
    max_retries = -1

    [keystone_authtoken]
    auth_uri = http://keystone-public:5000/v3
    auth_url = http://keystone-admin:35357/v3
    auth_type = password
    project_domain_id = default
    user_domain_id = default
    project_name = service
    username = glance
    password = 3TL2Tfj1nZBuvV39I709mREyehixmHMYNJr0MVLN
    memcache_security_strategy = ENCRYPT
    memcache_secret_key = CW0S0iOgZqFMSplvMXn6A2cL6nZIBDGdAyIYjPX0
    memcache_servers = memcached

    [paste_deploy]
    flavor = keystone

    [glance_store]
    default_store = rbd
    stores = rbd,http
    rbd_store_user = glance
    rbd_store_pool = images
    rbd_store_chunk_size = 8

    [oslo_messaging_notifications]
    driver = noop

kind: ConfigMap
metadata:
  name: glance-api
