# Copyright 2017 The Openstack-Helm Authors.
#
# 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.

# Default values for glance.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value

replicas:
  api: 1
  registry: 1

development:
  enabled: false
  storage_path: /data/openstack-helm/glance/images

labels:
  node_selector_key: openstack-control-plane
  node_selector_value: enabled

images:
  db_init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
  db_sync: quay.io/stackanetes/stackanetes-glance-api:newton
  ks_user: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
  ks_service: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
  ks_endpoints: quay.io/stackanetes/stackanetes-kolla-toolbox:newton
  api: quay.io/stackanetes/stackanetes-glance-api:newton
  registry: quay.io/stackanetes/stackanetes-glance-registry:newton
  dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.1.1
  pull_policy: "IfNotPresent"

upgrades:
  revision_history: 3
  pod_replacement_strategy: RollingUpdate
  rolling_update:
    max_unavailable: 1
    max_surge: 3

keystone:
  admin_user: "admin"
  admin_user_domain: "default"
  admin_password: "password"
  admin_project_name: "admin"
  admin_project_domain: "default"
  admin_region_name: "RegionOne"

  glance_user: "glance"
  glance_user_domain: "default"
  glance_user_role: "admin"
  glance_password: "password"
  glance_project_name: "service"
  glance_project_domain: "default"
  glance_region_name: "RegionOne"

network:
  port:
    api: 9292
    registry: 9191

database:
  address: mariadb
  port: 3306
  root_user: root
  root_password: password
  glance_database_name: glance
  glance_password: password
  glance_user: glance

ceph:
  enabled: true
  monitors: []
  glance_user: "admin"
  glance_pool: "images"
  # a null value for the keyring will
  # attempt to use the key from
  # common/secrets/ceph-client-key
  glance_keyring: null

misc:
  workers: 8
  debug: false

resources:
  enabled: false
  api:
    limits:
      memory: "128Mi"
      cpu: "500m"
    requests:
      memory: "128Mi"
      cpu: "500m"
  registry:
    limits:
      memory: "128Mi"
      cpu: "500m"
    requests:
      memory: "128Mi"
      cpu: "500m"
  jobs:
    db:
      limits:
        memory: "128Mi"
        cpu: "500m"
      requests:
        memory: "128Mi"
        cpu: "500m"
    init:
      limits:
        memory: "128Mi"
        cpu: "500m"
      requests:
        memory: "128Mi"
        cpu: "500m"
    post:
      limits:
        memory: "128Mi"
        cpu: "500m"
      requests:
        memory: "128Mi"
        cpu: "500m"

dependencies:
  db_init:
    jobs:
    - mariadb-seed
    service:
    - mariadb
  db_sync:
    jobs:
    - glance-db-init
    service:
    - mariadb
  ks_user:
    service:
    - keystone-api
  ks_service:
    service:
    - keystone-api
  ks_endpoints:
    jobs:
    - glance-ks-service
    service:
    - keystone-api
  api:
    jobs:
    - glance-db-sync
    - glance-ks-user
    - glance-ks-endpoints
    service:
    - keystone-api
    - mariadb
  registry:
    jobs:
    - glance-db-sync
    - glance-ks-user
    - glance-ks-endpoints
    service:
    - keystone-api
    - mariadb
    - glance-api

# typically overriden by environmental
# values, but should include all endpoints
# required by this chart
endpoints:
  identity:
    name: keystone
    hosts:
      default: keystone-api
    path: /v3
    scheme: 'http'
    port:
      admin: 35357
      api: 5000
  image:
    name: glance
    hosts:
      default: glance-api
    path: null
    scheme: 'http'
    port:
      api: 9292
      registry: 9191