apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
  name: ingress-nginx-controller
  namespace: ingress-nginx
data:
  force-ssl-redirect: "true"
  hsts: "false"
  use-forwarded-headers: "true"
  log-format-escape-json: "true"
  log-format-upstream: '{"timestamp": "$time_iso8601",
    "ingress_name": "$ingress_name",
    "service_name": "$service_name",
    "service_port": "$service_port",
    "req_id": "$req_id",
    "proxy_upstream_name": "$proxy_upstream_name",
    "proxy_alternative_upstream_name": "$proxy_alternative_upstream_name",
    "upstream_status": "$upstream_status",
    "upstream_addr": "$upstream_addr",
    "http_req":{
    "http_method": "$request_method",
    "entry_url": "$scheme://$host$request_uri",
    "entry_path": "$request_uri",
    "entry_query": "$query_string",
    "http_status": $status,
    "vhost_proto":"$scheme",
    "vhost_proto_vers": "$server_protocol",
    "http_user_agent": "$http_user_agent",
    "http_referrer": "$http_referer",
    "http_content_type": "$content_type",
    "http_host": "$host",
    "req_size": "$request_length",
    "resp_size": "$upstream_response_length",
    "time_resp": "$upstream_response_time s",
    "client_ip": "$remote_addr",
    "front_src_ip": "$remote_addr",
    "front_src_port": "$remote_port",
    "front_dst_port": "$server_port",
    "front_tls_proto": "$ssl_protocol",
    "front_tls_cipher": "$ssl_cipher"
    }}'
