apiVersion: v1
kind: ConfigMap
metadata:
  name: kinto
  namespace: kinto
  labels:
    app.kubernetes.io/name: kinto
    app.kubernetes.io/component: datastore
data:
  kinto.ini: |
    [server:main]
    use = egg:waitress#main
    host = 0.0.0.0
    port = %(http_port)s

    [app:main]
    use = egg:kinto

    kinto.includes = kinto.plugins.default_bucket
                     kinto.plugins.admin
                     kinto.plugins.accounts

    kinto.storage_backend = kinto.core.storage.postgresql

    kinto.permission_backend = kinto.core.permission.postgresql

    kinto.experimental_collection_schema_validation = True

    # kinto.userid_hmac_secret = {secret}
    multiauth.policies = account

    multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy
    # multiauth.policy.account.use = kinto.plugins.accounts.AccountsPolicy

    # Allow anyone to create accounts.
    kinto.account_create_principals = system.Everyone
    # Set user 'account:admin' as the administrator.
    kinto.account_write_principals = account:admin
    # Allow administrators to create buckets
    kinto.bucket_create_principals = account:admin


    [loggers]
    keys = root, kinto

    [handlers]
    keys = console

    [formatters]
    keys = color

    [logger_root]
    level = INFO
    handlers = console

    [logger_kinto]
    level = DEBUG
    handlers = console
    qualname = kinto

    [handler_console]
    class = StreamHandler
    args = (sys.stderr,)
    level = NOTSET
    formatter = color

    [formatter_color]
    class = logging_color_formatter.ColorFormatter
