[values]
host_ip = "{{ ip }}"
deploy_path = "{{ deploy_path }}"
yr_package_path = "{{ yr_package_path }}"
ds_bin = "{{ ds_bin }}"
faas_root = "{{ faas_root }}"
cpu_num = "{{ cpu_millicores }}" # in millicores
memory_num = "{{ memory_num_mb }}" # in MB
shared_memory_num = "{{ memory_num_mb // 3 }}" # in MB
node_id = "{{ node_id }}"
log_level = "INFO"
pid = "{{ pid }}"
ld_library_path = "{{ ld_library_path }}"
python_path = "{{ python_path }}"

[values.meta_store]
enable = false
address = ""
mode = "local"

[values.fs]
schedule_plugins = '''["Label", "ResourceSelector", "Default", "Heterogeneous", "NUMA"]'''

[values.fs.log]
also_log_to_stderr = false
async_log_buf_secs = 30
async_log_max_queue_size = 51200
async_log_thread_count = 1
level = "{{ values.log_level }}"
path = "{{ values.deploy_path }}/logs/function_system"
rolling_max_files = 10
rolling_max_size = 40
rolling_retention_days = 30
compress_enable = false

[values.fs.tls]
enable = false
base_path = ""
ca_file = "ca.crt"
cert_file = "module.crt"
key_file = "module.key"

[values.fs.metrics]
metrics_config = ""
metrics_config_file = "{{ values.yr_package_path }}/functionsystem/config/metrics/metrics_config.json"

[values.ds.curve]
enable = false
base_path = ""
cache_storage_auth_type = "Noauth" # Noauth, ZMQ, AK/SK
cache_storage_auth_enable = false

[values.etcd]
enable_multi_master = false
auth_type = "Noauth"
table_prefix = ""

[values.etcd.auth]
base_path = ""
ca_file = "ca.crt"
cert_file = "server.crt"
key_file = "server.key"
client_cert_file = "client.crt"
client_key_file = "client.key"

[[values.etcd.address]]
ip = "{{ values.host_ip }}"
peer_port = "{{ 32380|check_port() }}"
port = "{{ 32379|check_port() }}"

[values.ds_master]
ip = "{{ values.host_ip }}"
port = "{{ 12123|check_port() }}"

[values.ds_worker]
ip = "{{ values.host_ip }}"
port = "{{ 31501|check_port() }}"

[values.function_master]
ip = "{{ values.host_ip }}"
global_scheduler_port = "{{ 22770|check_port() }}"

[values.function_proxy]
ip = "{{ values.host_ip }}"
port = "{{ 22772|check_port() }}"
grpc_listen_port = "{{ 22773|check_port() }}"
exec_grpc_port = "{{ 22774|check_port() }}"

[values.runtime_launcher]
enable = false
socket = "/var/run/runtime-launcher.sock"
backend = "docker"
docker_host = "unix:///var/run/docker.sock"

[values.runtime]
default_write_mode = "NONE_L2_CACHE"

[values.function_agent]
ip = "{{ values.host_ip }}"
port = "{{ 58866|check_port() }}"

[values.function_scheduler]
lease_port = "{{ 8889|check_port() }}"

[values.dashboard]
ip = "{{ values.host_ip }}"
port = "{{ 9080|check_port() }}"
grpc_port = "{{ 9081|check_port() }}"

[values.dashboard.auth]
enable = false
cert_file = ""
key_file = ""

[values.dashboard.prometheus]
address = ""

[values.dashboard.prometheus.auth]
enable = false
base_path = ""
ca_file = ""
cert_file = ""
key_file = ""

[values.frontend]
ssl_enable = false
client_auth_type = "RequireAndVerifyClientCert"
enable_function_token_auth = false

[values.meta_service]
ssl_enable = false
client_auth_type = "RequireAndVerifyClientCert"

[values.iam_server]
ip = "{{ values.host_ip }}"
port = "{{ 31112|check_port() }}"

[values.auth]
provider = "casdoor"  # casdoor or keycloak

[values.auth.casdoor]
enabled = false
endpoint = "http://127.0.0.1:8000"
public_endpoint = ""  # defaults to endpoint if empty
client_id = ""
client_secret = ""
organization = "yuanrong"
application = "app-yuanrong"
admin_user = ""
admin_password = ""
jwt_public_key = ""

[values.auth.keycloak]
enabled = false
url = ""
internal_url = ""  # defaults to url if empty
issuer_url = ""    # defaults to url if empty
realm = "yuanrong"
client_id = "frontend"
client_secret = ""