apiVersion: v1
data:
  cinder.conf: |+
    [DEFAULT]
    debug = True
    log_dir = /var/log/kolla/cinder
    use_forwarded_for = true
    use_stderr = False
    enable_v1_api = false
    osapi_volume_workers = 1
    volume_name_template = volume-%s
    glance_api_servers = http://glance-api:9292
    glance_num_retries = 1
    glance_api_version = 2
    os_region_name = RegionOne
    enabled_backends = rbd-1
    backup_driver = cinder.backup.drivers.nfs
    backup_mount_options =
    backup_mount_point_base = /var/lib/cinder/backup
    backup_share =
    backup_file_size = 327680000
    osapi_volume_listen = 0.0.0.0
    osapi_volume_listen_port = 8776
    api_paste_config = /etc/cinder/api-paste.ini
    nova_catalog_info = compute:nova:internalURL
    auth_strategy = keystone
    transport_url = rabbit://openstack:n8ZKhaSiHmBQgZTwJ8QsKJEkV2cbJnsyqUi6waMl@rabbitmq:5672

    [oslo_messaging_notifications]
    driver = noop

    [database]
    connection = mysql+pymysql://cinder:zUTJpfMRveGprLRJsV7SnQxtCtKyn74ipnAUIUvq@mariadb/cinder
    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 = cinder
    password = IgrEnZE9T92JSSaE09LSsB5XC7v1ih8cWPkPf8OY
    memcache_security_strategy = ENCRYPT
    memcache_secret_key = CW0S0iOgZqFMSplvMXn6A2cL6nZIBDGdAyIYjPX0
    memcached_servers = memcached:11211

    [oslo_concurrency]
    lock_path = /var/lib/cinder/tmp

    [rbd-1]
    volume_driver = cinder.volume.drivers.rbd.RBDDriver
    rbd_pool = volumes
    rbd_ceph_conf = /etc/ceph/ceph.conf
    rbd_flatten_volume_from_snapshot = false
    rbd_max_clone_depth = 5
    rbd_store_chunk_size = 4
    rados_connect_timeout = -1
    rbd_user = cinder
    rbd_secret_uuid = 68c29769-07c7-4c33-9c10-7f27fe8715b2
    report_discard_supported = True

    [privsep_entrypoint]
    helper_command = sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf

  config.json: |-
    {
        "config_files": [
            {
                "dest": "/etc/cinder/cinder.conf",
                "source": "/var/lib/kolla/config_files/cinder.conf",
                "perm": "0600",
                "owner": "cinder"
            },
            {
                "dest": "/etc/ceph/ceph.client.cinder.keyring",
                "source": "/var/lib/kolla/config_files/ceph.client.cinder.keyring",
                "optional": false,
                "owner": "cinder",
                "perm": "0700"
            },
            {
                "dest": "/etc/ceph/ceph.conf",
                "source": "/var/lib/kolla/config_files/ceph.conf",
                "optional": false,
                "owner": "cinder",
                "perm": "0700"
            },
            {
                "dest": "/etc/ceph/ceph.conf",
                "source": "/var/lib/kolla/config_files/ceph.conf",
                "optional": false,
                "perm": "0600",
                "owner": "cinder"
            },
            {
                "dest": "/etc/cinder/nfs_shares",
                "source": "/var/lib/kolla/config_files/nfs_shares",
                "optional": true,
                "perm": "0600",
                "owner": "cinder"
            },
            {
                "dest": "/etc/cinder/policy.json",
                "source": "/var/lib/kolla/config_files/policy.json",
                "optional": true,
                "perm": "0600",
                "owner": "cinder"
            }
        ],
        "command": "cinder-volume --config-file /etc/cinder/cinder.conf",
        "permissions": [
            {
                "owner": "cinder:cinder",
                "path": "/var/lib/cinder",
                "recurse": true
            },
            {
                "owner": "cinder:cinder",
                "path": "/var/log/kolla/cinder",
                "recurse": true
            }
        ]
    }
kind: ConfigMap
metadata:
  name: cinder-volume
