{{/*
AUTOGENERATED FILE - DO NOT EDIT.
Generated by scripts/generate_env_tpls.py from charts/agentarea/config.yaml
*/}}

{{- define "agentarea.mcpManager.configVars" -}}
LOG_LEVEL: "INFO"
CORE_API_URL: "http://{{ include "agentarea.fullname" . }}-backend:8000"
SERVER_HOST: "0.0.0.0"
SERVER_PORT: "80"
BACKEND_TYPE: "kubernetes"
KUBERNETES_ENABLED: "true"
KUBERNETES_NAMESPACE: "{{ .Release.Namespace }}"
KUBERNETES_DOMAIN: "{{ .Values.mcpManager.domain | default "mcp.local" }}"
KUBERNETES_GATEWAY_NAME: "{{ .Values.mcpManager.gateway.name | default "envoy-gateway" }}"
KUBERNETES_GATEWAY_NAMESPACE: "{{ .Values.mcpManager.gateway.namespace | default "envoy-gateway-system" }}"
KUBERNETES_RUNTIME_CLASS: "{{ .Values.mcpManager.runtimeClass | default "" }}"
KUBERNETES_POD_SERVICE_ACCOUNT_NAME: "{{ include "agentarea.mcpRuntimeServiceAccountName" . }}"
KUBERNETES_SECURITY_RUN_AS_NON_ROOT: "true"
KUBERNETES_SECURITY_READ_ONLY_ROOT_FS: "true"
KUBERNETES_DEFAULT_CPU_REQUEST: "100m"
KUBERNETES_DEFAULT_CPU_LIMIT: "500m"
KUBERNETES_DEFAULT_MEMORY_REQUEST: "128Mi"
KUBERNETES_DEFAULT_MEMORY_LIMIT: "512Mi"
MCP_FEATURES_ENABLED: "{{ join "," .Values.mcpManager.features.enabled }}"
{{- end }}

{{- define "agentarea.mcpManager.envs" }}
- name: LOG_LEVEL
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: LOG_LEVEL
- name: CORE_API_URL
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: CORE_API_URL
- name: SERVER_HOST
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: SERVER_HOST
- name: SERVER_PORT
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: SERVER_PORT
- name: BACKEND_TYPE
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: BACKEND_TYPE
- name: KUBERNETES_ENABLED
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_ENABLED
- name: KUBERNETES_NAMESPACE
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_NAMESPACE
- name: KUBERNETES_DOMAIN
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_DOMAIN
- name: KUBERNETES_GATEWAY_NAME
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_GATEWAY_NAME
- name: KUBERNETES_GATEWAY_NAMESPACE
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_GATEWAY_NAMESPACE
- name: KUBERNETES_RUNTIME_CLASS
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_RUNTIME_CLASS
- name: KUBERNETES_POD_SERVICE_ACCOUNT_NAME
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_POD_SERVICE_ACCOUNT_NAME
- name: KUBERNETES_SECURITY_RUN_AS_NON_ROOT
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_SECURITY_RUN_AS_NON_ROOT
- name: KUBERNETES_SECURITY_READ_ONLY_ROOT_FS
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_SECURITY_READ_ONLY_ROOT_FS
- name: KUBERNETES_DEFAULT_CPU_REQUEST
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_DEFAULT_CPU_REQUEST
- name: KUBERNETES_DEFAULT_CPU_LIMIT
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_DEFAULT_CPU_LIMIT
- name: KUBERNETES_DEFAULT_MEMORY_REQUEST
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_DEFAULT_MEMORY_REQUEST
- name: KUBERNETES_DEFAULT_MEMORY_LIMIT
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: KUBERNETES_DEFAULT_MEMORY_LIMIT
- name: MCP_FEATURES_ENABLED
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-mcpmanager
      key: MCP_FEATURES_ENABLED
{{- end }}
