image:
  repository: paasup/kong-oidc-keycloak-authz
  tag: 3.4.0-0.1.0

deployment:
  kong:
    enabled: true
  daemonset: false 

  # proxy 컨테이너의 timezone 설정
  userDefinedVolumeMounts:
    - name: tz-config
      mountPath: /etc/localtime
  userDefinedVolumes:
    - name: tz-config
      hostPath:
        path: /usr/share/zoneinfo/Asia/Seoul

# Kong proxy 서비스 설정
proxy:
  enabled: true
  type: LoadBalancer
  ingress:
    enable: false

## Host Port 배포 예시 추가
# proxy:
#   enabled: true
#   type: ClusterIP
#   ingress:
#     enable: false
#   http:
#     hostPort: 80
#   tls:
#     hostPort: 443


# Kong admin API 서비스 설정
admin:
  annotations:
    konghq.com/protocol: https
  enabled: true
  type: ClusterIP
  ingress:
    enabled: true
    annotations:
      konghq.com/https-redirect-status-code: "301"
      konghq.com/protocols: https
      konghq.com/strip-path: "true"
    hostname: kong.example.org
    ingressClassName: kong
    path: /api
    # certificate를 사용하여 추가시 해당 이름으로 생성됨
    # (helm release는 kong으로 배포해야함)
    tls: kong-kong-admin-cert 
  
manager:
  enabled: true
  type: ClusterIP
  annotations:
    konghq.com/protocol: https
  http:
    enabled: false
  ingress:
    enabled: true
    annotations:
      konghq.com/https-redirect-status-code: "301"
      konghq.com/protocols: https
    hostname: kong.example.org
    ingressClassName: kong
    path: /
    tls: kong-kong-admin-cert

# cluster:
#   enabled: false
#   type: ClusterIP
#   tls:
#     enabled: true
#   labels:
#     konghq.com/service: cluster

# Enterprise 영역 비활성화
enterprise:
  enabled: false
portal:
  enabled: false
portalapi:
  enabled: false
clustertelemetry:
  enabled: false

# cert-manager를 통한 인증서 생성 설정
certificates:
  enabled: true
  clusterIssuer: selfsigned-issuer
  admin:
    enabled: true
    commonName: kong.example.org
  portal:
    enabled: false
  proxy:
    enabled: false
  cluster:
    enabled: false

# Kong의 Conriguration 설정
env:
  admin_access_log: /dev/stdout
  admin_error_log: /dev/stdout
  admin_gui_access_log: /dev/stdout
  admin_gui_error_log: /dev/stdout
  cluster_data_plane_purge_delay: 60
  cluster_listen: 0.0.0.0:8005
  cluster_telemetry_listen: 0.0.0.0:8006
  log_level: info
  lua_package_path: /opt/?.lua;;
  nginx_worker_processes: "2"
  database: postgres
  pg_database: kong
  pg_host: kong-postgresql.kong.svc.cluster.local
  pg_ssl: "off"
  pg_ssl_verify: "off"
  pg_user: kong
  pg_password: password
  plugins: bundled, oidc, keycloak-authz
  prefix: /kong_prefix/
  proxy_access_log: /dev/stdout
  proxy_error_log: /dev/stdout
  proxy_stream_access_log: /dev/stdout
  proxy_stream_error_log: /dev/stdout
  status_listen: 0.0.0.0:8100
  trusted_ips: 0.0.0.0/0,::/0
  nginx_proxy_proxy_buffer_size: "128k"
  nginx_proxy_proxy_buffers: "8 256k"

# Ingress Controller 설정
ingressController:
  enabled: true
  image:
    repository: kong/kubernetes-ingress-controller
    tag: "3.3"
  env:
    kong_admin_filter_tag: ingress_controller_kong
    kong_admin_tls_skip_verify: true
    kong_admin_url: https://localhost:8444
    publish_service: kong/kong-kong-proxy
  admissionWebhook:
    enabled: false

  # ingress-controller 컨테이너의 timezone 설정
  customEnv:
    TZ: "Asia/Seoul"

migrations:
  enabled: true
  postUpgrade: true
  preUpgrade: true


# sub-chart postgres
postgresql:
  enabled: true
  auth:
    database: kong
    username: kong
    password: password
