Configuration reference

HugConf CRD

Selected version

HugConf CRD Configuration reference

The HugConf CRD references the CRD (custom resource definition) types Global and Backend to apply them to the load balancer configuration. HugConf custom resources are also where you configure your logging options for HAProxy Unified Gateway.

Use the HugConf custom resource Jump to heading

Once you’ve defined your Global, and/or Defaults custom resources, apply them to your load balancer configuration by referencing them in the HugConf custom resource with the following steps:

  1. Edit the HugConf custom resource:

    nix
    kubectl edit hugconf -n haproxy-unified-gateway
    nix
    kubectl edit hugconf -n haproxy-unified-gateway
  2. Optional: To reference a Global custom resource, add a section named globalRef under spec that contains the name of the Global custom resource and the namespace in which it resides. In this example, the Global custom resource is named example-global and resides in the haproxy-unified-gateway namespace.

    yaml
    apiVersion: gate.v3.haproxy.org/v3
    kind: HugConf
    metadata:
    name: hugconf
    namespace: haproxy-unified-gateway
    spec:
    globalRef:
    name: example-global
    namespace: haproxy-unified-gateway
    ...
    yaml
    apiVersion: gate.v3.haproxy.org/v3
    kind: HugConf
    metadata:
    name: hugconf
    namespace: haproxy-unified-gateway
    spec:
    globalRef:
    name: example-global
    namespace: haproxy-unified-gateway
    ...

    Info

    If you don’t specify a namespace in the defaultsRef, the namespace for the HugConf custom resource is used.

  3. Optional: To reference a Defaults custom resource, add a section named defaultsRef under spec that contains the name of the Defaults custom resource and the namespace in which it resides. In this example, the Defaults custom resource is named example-defaults and resides in the haproxy-unified-gateway namespace.

    yaml
    apiVersion: gate.v3.haproxy.org/v3
    kind: HugConf
    metadata:
    name: hugconf
    namespace: haproxy-unified-gateway
    spec:
    defaultsRef:
    name: example-defaults
    namespace: haproxy-unified-gateway
    ...
    yaml
    apiVersion: gate.v3.haproxy.org/v3
    kind: HugConf
    metadata:
    name: hugconf
    namespace: haproxy-unified-gateway
    spec:
    defaultsRef:
    name: example-defaults
    namespace: haproxy-unified-gateway
    ...

    Info

    If you don’t specify a namespace in the defaultsRef, the namespace for the HugConf custom resource is used.

    Caution

    You may only use one Defaults custom resource at a time, and its spec.name must be haproxytech.

  4. Save the file and exit the editor. The controller will pick up the changes, apply the configuration, and reload the load balancer automatically.

HugConf config

  • CRD version: 1.0
  • API version: gate.v3.haproxy.org/v3

categoryLevelList

[array]
apiVersion: "gate.v3.haproxy.org/v3"
kind: HugConf
metadata:
  name: hugconf
  namespace: haproxy-unified-gateway
spec:
  logging:
    categoryLevelList: 
- category: String # Allowed values are k8s, gate, status, haproxycfg, app, batch, reloadmgr, certs-storage, maps-storage, hugservice
level: String # Allowed values are Debug, Info, Warn, Error, None

defaultLevel

[string]
apiVersion: "gate.v3.haproxy.org/v3"
kind: HugConf
metadata:
  name: hugconf
  namespace: haproxy-unified-gateway
spec:
  logging:
    defaultLevel: String # Allowed values are Debug, Info, Warn, Error, None

Do you have any suggestions on how we can improve the content of this page?