HAProxy Kubernetes Ingress Controller Documentation 1.7

Global

The Global custom resource extends the Kubernetes API to let you tune process-level options for the ingress controller.

Install the Global custom resource

Before you can use the Global custom resource, you must install its definition into your Kubernetes cluster.

  1. Install the custom resource definition with kubectl apply:

    Community ingress controller

    $ kubectl apply -f https://cdn.haproxy.com/documentation/kubernetes/1.7/enterprise/crd/global.yaml
  2. Verify that the installation worked by listing custom resources defined in your cluster:

    $ kubectl get crd
    
    NAME                        CREATED AT
    globals.core.haproxy.org    2022-06-01T16:56:57Z

Use the Global custom resource

With the Global custom resource, you can tune process-level options for the ingress controller. To use it:

  1. Create a YAML file that declares a Global resource and add properties to its spec.config section.

    In the example below, the maxconn property limits how many concurrent TCP connections the ingress controller will accept.

    example-global.yaml

    apiVersion: "core.haproxy.org/v1alpha1"
    kind: Global
    metadata:
      name: example-global
      namespace: default
    spec:
      config:
        maxconn: 60000
  2. Deploy it to your cluster using kubectl apply.

    $ kubectl apply -f example-global.yaml
  3. Create a new ConfigMap with the name haproxy-kubernetes-ingress to override the one that ships with the ingress controller. Add the cr-global key to the data section to implement the global properties.

    example-configmap.yaml

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: haproxy-kubernetes-ingress
      namespace: haproxy-controller
    data:
      cr-global: default/example-global
  4. Update the ConfigMap in your cluster by using kubectl apply.

    $ kubectl apply -f  example-configmap.yaml

Global custom resource reference

Version: core.haproxy.org/v1alpha2

busy_polling

Type Values
boolean

ca_base

Type Values
string

chroot

Type Values
string

cpu_maps

Type Values
array

crt_base

Type Values
string

daemon

Type Values
string enabled, disabled

external_check

Type Values
boolean

gid

Type Values
integer

group

Type Values
string

h1_case_adjust

Type Values
array

h1_case_adjust_file

Type Values
string

hard_stop_after

Type Values
integer

localpeer

Type Values
string

log_send_hostname

Type Values
object

Child properties

Property Type Values
enabled string enabled, disabled
param string

lua_loads

Type Values
array

lua_prepend_path

Type Values
array

master-worker

Type Values
boolean

max_spread_checks

Type Values
integer

maxcompcpuusage

Type Values
integer

maxcomprate

Type Values
integer

maxconn

Type Values
integer

maxconnrate

Type Values
integer

maxpipes

Type Values
integer

maxsessrate

Type Values
integer

maxsslconn

Type Values
integer

maxsslrate

Type Values
integer

maxzlibmem

Type Values
integer

nbproc

Type Values
integer

nbthread

Type Values
integer

noepoll

Type Values
boolean

noevports

Type Values
boolean

nogetaddrinfo

Type Values
boolean

nokqueue

Type Values
boolean

nopoll

Type Values
boolean

noreuseport

Type Values
boolean

nosplice

Type Values
boolean

pidfile

Type Values
string

profiling_tasks

Type Values
string auto, true, false

runtime_apis

Type Values
array

server_state_base

Type Values
string

server_state_file

Type Values
string

spread_checks

Type Values
integer

ssl_default_bind_ciphers

Type Values
string

ssl_default_bind_ciphersuites

Type Values
string

ssl_default_bind_options

Type Values
string

ssl_default_server_ciphers

Type Values
string

ssl_default_server_ciphersuites

Type Values
string

ssl_default_server_options

Type Values
string

ssl_mode_async

Type Values
string enabled, disabled

stats_timeout

Type Values
integer

tune_options

Type Values
object

Child properties

Property Type Values
buffers_limit integer
buffers_reserve integer
bufsize integer
comp_maxlevel integer
fail_alloc boolean
h2_header_table_size integer
h2_initial_window_size integer
h2_max_concurrent_streams integer
h2_max_frame_size integer
http_cookielen integer
http_logurilen integer
http_maxhdr integer
idle_pool_shared string enabled, disabled
idletimer integer
listener_multi_queue string enabled, disabled
lua_forced_yield integer
lua_maxmem boolean
lua_service_timeout integer
lua_session_timeout integer
lua_task_timeout integer
maxaccept integer
maxpollevents integer
maxrewrite integer
pattern_cache_size integer
pipesize integer
pool_high_fd_ratio integer
pool_low_fd_ratio integer
rcvbuf_client integer
rcvbuf_server integer
recv_enough integer
runqueue_depth integer
sched_low_latency string enabled, disabled
sndbuf_client integer
sndbuf_server integer
ssl_cachesize integer
ssl_capture_buffer_size integer
ssl_ctx_cache_size integer
ssl_default_dh_param integer
ssl_force_private_cache boolean
ssl_keylog string enabled, disabled
ssl_lifetime integer
ssl_maxrecord integer
vars_global_max_size integer
vars_proc_max_size integer
vars_reqres_max_size integer
vars_sess_max_size integer
vars_txn_max_size integer
zlib_memlevel integer
zlib_windowsize integer

tune_ssl_default_dh_param

Type Values
integer

uid

Type Values
integer

user

Type Values
string

Next up

Security guide