---
#
# Copyright (C) 2019-2020 Vdaas.org Vald team ( kpango, rinx, kmrmt )
#
# 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
#
#    https://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.
#
apiVersion: v1
kind: ConfigMap
metadata:
  name: vald-manager-backup-config
data:
  config.yaml: |
    ---
    version: v0.0.0
    time_zone: UTC
    logging:
      format: raw
      level: debug
      logger: glg
    server_config:
      servers:
        - name: grpc
          host: 0.0.0.0
          port: 8081
          grpc:
            bidirectional_stream_concurrency: 20
            connection_timeout: ""
            header_table_size: 0
            initial_conn_window_size: 0
            initial_window_size: 0
            interceptors: []
            keepalive:
              max_conn_age: ""
              max_conn_age_grace: ""
              max_conn_idle: ""
              time: ""
              timeout: ""
            max_header_list_size: 0
            max_receive_message_size: 0
            max_send_message_size: 0
            read_buffer_size: 0
            write_buffer_size: 0
          mode: GRPC
          probe_wait_time: 3s
          restart: true
      health_check_servers:
        - name: liveness
          host: 0.0.0.0
          port: 3000
          http:
            handler_timeout: ""
            idle_timeout: ""
            read_header_timeout: ""
            read_timeout: ""
            shutdown_duration: 5s
            write_timeout: ""
          mode: ""
          probe_wait_time: 3s
        - name: readiness
          host: 0.0.0.0
          port: 3001
          http:
            handler_timeout: ""
            idle_timeout: ""
            read_header_timeout: ""
            read_timeout: ""
            shutdown_duration: 5s
            write_timeout: ""
          mode: ""
          probe_wait_time: 3s
      metrics_servers:
        - name: pprof
          host: 0.0.0.0
          port: 6060
          http:
            handler_timeout: 5s
            idle_timeout: 2s
            read_header_timeout: 1s
            read_timeout: 1s
            shutdown_duration: 5s
            write_timeout: 1s
          mode: REST
          probe_wait_time: 3s
      startup_strategy:
        - liveness
        - pprof
        - grpc
        - readiness
      full_shutdown_duration: 600s
      tls:
        enabled: false
        cert: "/path/to/cert"
        key: "/path/to/key"
        ca: "/path/to/ca"
    observability:
      enabled: false
      collector:
        duration: 5s
        metrics:
          enable_cgo: true
          enable_goroutine: true
          enable_memory: true
          enable_version_info: true
      trace:
        enabled: false
        sampling_rate: 1
      prometheus:
        enabled: false
      jaeger:
          enabled: false
          collector_endpoint: ""
          agent_endpoint: "jaeger-agent.default.svc.cluster.local:6831"
          username: ""
          password: ""
          service_name: "vald-manager-backup"
          buffer_max_count: 10
    mysql_config:
      conn_max_life_time: 30s
      db: mysql
      host: mysql.default.svc.cluster.local
      max_idle_conns: 100
      max_open_conns: 100
      name: vald
      pass: _MYSQL_PASSWORD_
      port: 3306
      tcp:
        dialer:
          dual_stack_enabled: false
          keep_alive: 5m
          timeout: 5s
        dns:
          cache_enabled: true
          cache_expiration: 24h
          refresh_duration: 1h
        tls:
          ca: /path/to/ca
          cert: /path/to/cert
          enabled: false
          key: /path/to/key
      tls:
        ca: /path/to/ca
        cert: /path/to/cert
        enabled: false
        key: /path/to/key
      user: root
