Configuration#

ANIC is configured by modifying the parameters of the ConfigMap and Annotation:

Example ConfigMap#
$ kubectl apply -f - <<EOF
kind: ConfigMap
apiVersion: v1
metadata:
  name: angie-config
  namespace: angie-ingress
data:
  proxy-connect-timeout: "10s"
  proxy-read-timeout: "10s"
  client-max-body-size: "2m"
EOF

Parameters of the Ingress Controller#

external-status-address

Specifies the address that is displayed in the status of the Ingress resource. It takes precedence over the command line argument -external-service.

General Parameters#

Note

For all parameters of type boolean, the valid pairs of values are true/false, t/f, on/off, and 1/0. Case does not matter.

Parameter

Description

Default

proxy-connect-timeout

Sets the value of proxy_connect_timeout and grpc_connect_timeout.

60s

proxy-read-timeout

Sets the value of proxy_read_timeout and grpc_read_timeout

60s

proxy-send-timeout

Sets the value of proxy_send_timeout and grpc_send_timeout

60s

client-max-body-size

Sets the value of client_max_body_size

1m

proxy-buffering

Enables or disables buffering of the response from the proxied server

True

proxy-buffers

Sets the value of proxy_buffers

Depends on the platform

proxy-buffer-size

Sets the value of proxy_buffer_size and grpc_buffer_size

Depends on the platform

proxy-max-temp-file-size

Sets the value of proxy_max_temp_file_size

1024m

set-real-ip-from

Sets the value of set_real_ip_from

None

real-ip-header

Sets the value of real_ip_header

X-Real-IP

real-ip-recursive

Enables or disables real_ip_recursive

False

default-server-return

Configures the response from the default server that intercepts client requests if no resource Ingress or VirtualServer has been defined for the request. A fixed response or request redirection can be set.

HTTP 404 error page

server-tokens

Enables or disables server_tokens

True

worker-processes

Sets the value of worker_processes

auto

worker-rlimit-nofile

Sets the value of worker_rlimit_nofile

None

worker-connections

Sets the value of worker_connections

1024

worker-cpu-affinity

Sets the value of worker_cpu_affinity

None

worker-shutdown-timeout

Sets the value of worker_shutdown_timeout

None

server-names-hash-bucket-size

Sets the value of server_names_hash_bucket_size

256

server-names-hash-max-size

Sets the value of server_names_hash_max_size

1024

map-hash-bucket-size

Sets the value of map_hash_bucket_size

256

map-hash-max-size

Sets the value of map_hash_max_size

2048

resolver-addresses

Sets the DNS resolver value

None

resolver-ipv6

Enables or disables the resolution of IPv6 addresses

True

resolver-valid

Allows overriding the DNS record caching duration

None

resolver-timeout

Sets the value of resolver_timeout

30s

keepalive-timeout

Sets the value of keepalive_timeout

65s

keepalive-requests

Sets the value of keepalive_requests

100

variables-hash-bucket-size

Sets the value of variables_hash_bucket_size

256

variables-hash-max-size

Sets the value of variables_hash_max_size

1024

Logging Parameters#

Parameter

Description

Default

error-log-level

Defines the global value for the error_log level and can take one of the following values: debug, info, notice, warn, error, crit, alert, or emerg

notice

access-log-off

Disables access_log

False

default-server-access-log-off

Disables access_log for the default service

False

log-format

Sets the common log format. For convenience, multiple lines can be used, separated by \n. In this case, each newline will be replaced with a space. All ' characters must be escaped

None

log-format-escaping

Allows specifying character escaping as json or default in variables; defaults to default. The value none disables escaping

default

stream-log-format

Sets the stream log format for TCP, UDP, and TLS traffic. For convenience, multiple lines can be used, separated by \n. In this case, each newline will be replaced with a space. All ' characters must be escaped

None

stream-log-format-escaping

Allows specifying character escaping as json or default in variables; defaults to default. The value none disables escaping

default

Managing URIs and Headers in Requests#

proxy-hide-headers

The value of one proxy_hide_header or multiple

proxy-pass-headers

The value of one proxy_pass_header or multiple

Authorization and SSL/TLS#

Parameter

Description

Default

redirect-to-https

Sets a 301 redirect rule based on the http_x_forwarded_proto header

False

ssl-redirect

Sets a 301 redirect rule for all incoming HTTP traffic to redirect requests to HTTPS

True

ssl-protocols

Sets the value of ssl_protocols

TLSv1 TLSv1.1 TLSv1.2

ssl-prefer-server-ciphers

Enables or disables ssl_prefer_server_ciphers

False

ssl-ciphers

Sets the value of ssl_ciphers

HIGH:!aNULL:!MD5

ssl-dhparam-file

Specifies the file with parameters for DHE ciphers

None

Protocols#

Parameter

Description

Default

http2

Enables support for the protocol HTTP/2

False

proxy-protocol

Indicates that all connections accepted on this listening socket should use the protocol PROXY

False

Upstreams#

Parameter

Description

Default

max-fails

Sets the value of max_fails for the server

1

upstream-zone-size

Sets the name and size of the shared memory zone

None

fail-timeout

Sets the value of fail_timeout for the server

10s

keepalive

Enables connection caching for the upstream server group

None

Custom Templates#

main-snippets

Inserts a custom configuration snippet into the main context

http-snippets

Inserts a custom configuration snippet into the http context

location-snippets

Inserts a custom configuration snippet into the location context

server-snippets

Inserts a custom configuration snippet into the server context

stream-snippets

Inserts a custom configuration snippet into the stream context

main-template

Defines the main template for the primary settings of Angie. By default, the template is read from a file in the container

ingress-template

Defines the settings template for the Ingress resource. By default, the template is read from a file in the container

virtualserver-template

Defines the settings template for the VirtualServer. By default, the template is read from a file in the container