#
# Copyright (C) 2019 Vdaas.org Vald team ( kpango, kmrmt, rinx )
#
# 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: agent-ngt-config
data:
  config.yaml: |
    ---
    version: v0.0.0
    server_config:
      servers:
      - name: agent-rest
        host: 0.0.0.0
        port: 8080
        mode: REST
        probe_wait_time: 3s
        http:
          shutdown_duration: 5s
          handler_timeout: 5s
          idle_timeout: 2s
          read_header_timeout: 1s
          read_timeout: 1s
          write_timeout: 1s
      - name: agent-grpc
        host: 0.0.0.0
        port: 8082
        mode: GRPC
        probe_wait_time: "3s"
        grpc:
          max_receive_message_size: 0
          max_send_message_size: 0
          initial_window_size: 0
          initial_conn_window_size: 0
          keepalive:
            max_idle_conn_idle: O
            max_conn_age: ""
            max_conn_age_grace: ""
            time: ""
            timeout: ""
          write_buffer_size: 0
          read_buffer_size: 0
          connection_timeout: ""
          max_header_list_size: 0
          header_table_size: 0
          interceptors: []
        restart: true
      health_check_servers:
      - name: liveness
        host: 0.0.0.0
        port: 3000
        mode: ""
        probe_wait_time: "3s"
        http:
          shutdown_duration: "5s"
          handler_timeout: ""
          idle_timeout: ""
          read_header_timeout: ""
          read_timeout: ""
          write_timeout: ""
      - name: readiness
        host: 0.0.0.0
        port: 3001
        mode: ""
        probe_wait_time: "3s"
        http:
          shutdown_duration: "5s"
          handler_timeout: ""
          idle_timeout: ""
          read_header_timeout: ""
          read_timeout: ""
          write_timeout: ""
      metrics_servers:
      - name: pprof
        host: 0.0.0.0
        port: 6060
        mode: REST
        probe_wait_time: 3s
        http:
          shutdown_duration: 5s
          handler_timeout: 5s
          idle_timeout: 2s
          read_header_timeout: 1s
          read_timeout: 1s
          write_timeout: 1s
      startup_strategy:
      - livenesss
      - pprof
      - agent-grpc
      - agent-rest
      - readiness
      shutdown_strategy:
      - readiness
      - agent-rest
      - agent-grpc
      - pprof
      - livenesss
      full_shutdown_duration: 600s
      tls:
        enabled: false
        cert: /path/to/cert
        key: /path/to/key
        ca: /path/to/ca
    ngt:
      # index_path: /path/to/index
      auto_index_limit: 10m
      auto_index_check_duration: 1m
      auto_index_length: 100
      dimension: 4096
      bulk_insert_chunk_size: 10
      distance_type: l2
      object_type: float
      creation_edge_size: 20
      search_edge_size: 10
      enable_in_memory_mode: true
