Skip to content

Instantly share code, notes, and snippets.

@egeneralov
Last active February 6, 2023 10:11
Show Gist options
  • Save egeneralov/14897b9822e753534371ca655b070a2d to your computer and use it in GitHub Desktop.
Save egeneralov/14897b9822e753534371ca655b070a2d to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ConfigMap
metadata:
name: custom-headers
namespace: ingress-nginx
data:
X-geoip-area-code: $geoip_area_code
X-geoip-city-continent-code: $geoip_city_continent_code
X-geoip-city-country-code: $geoip_city_country_code
X-geoip-city-country-code3: $geoip_city_country_code3
X-geoip-city-country-name: $geoip_city_country_name
X-geoip-dma-code: $geoip_dma_code
X-geoip-latitude: $geoip_latitude
X-geoip-longitude: $geoip_longitude
X-geoip-region: $geoip_region
X-geoip-region-name: $geoip_region_name
X-geoip-city: $geoip_city
X-geoip-postal-code: $geoip_postal_code
controller:
image:
tag: "0.32.0"
config:
proxy-set-headers: ingress-nginx/custom-headers
use-geoip: "true"
use-geoip2: "true"
log-format-escape-json: "true"
log-format-upstream: '{"time": "$time_iso8601", "remote_addr": "$proxy_protocol_addr", "x-forward-for": "$proxy_add_x_forwarded_for", "request_id": "$req_id", "remote_user": "$remote_user", "bytes_sent": $bytes_sent, "request_time": $request_time, "status":$status, "vhost": "$host", "request_proto": "$server_protocol", "path": "$uri", "request_query": "$args", "request_length": $request_length, "duration": $request_time,"method": "$request_method", "http_referrer": "$http_referer", "http_user_agent": "$http_user_agent", "geoip_country_code": "$geoip_country_code", "geoip_country_code3": "$geoip_country_code3", "geoip_country_name": "$geoip_country_name", "geoip_area_code": "$geoip_area_code", "geoip_city_continent_code": "$geoip_city_continent_code", "geoip_city_country_code": "$geoip_city_country_code", "geoip_city_country_code3": "$geoip_city_country_code3", "geoip_city_country_name": "$geoip_city_country_name", "geoip_dma_code": "$geoip_dma_code", "geoip_latitude": "$geoip_latitude", "geoip_longitude": "$geoip_longitude", "geoip_region": "$geoip_region", "geoip_region_name": "$geoip_region_name", "geoip_city": "$geoip_city", "geoip_postal_code": "$geoip_postal_code" }'
proxy-connect-timeout: "5"
proxy-read-timeout: "300"
proxy-send-timeout: "300"
maxmindLicenseKey: ""
hostNetwork: true
daemonset:
useHostPort: true
kind: DaemonSet
podAnnotations:
prometheus.io/port: 10254
prometheus.io/scrape: "true"
service:
type: NodePort
nodePorts:
http: 32080
https: 32443
metrics:
port: 10254
enabled: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment