Skip to content

feat(ingress): add native ingressEndpoint hostname and ip support#1695

Merged
traefiker merged 1 commit intotraefik:masterfrom
DrFaust92:feat/ingress-endpoint-hostname
Mar 11, 2026
Merged

feat(ingress): add native ingressEndpoint hostname and ip support#1695
traefiker merged 1 commit intotraefik:masterfrom
DrFaust92:feat/ingress-endpoint-hostname

Conversation

@DrFaust92
Copy link
Contributor

What

Adds first-class values.yaml support for providers.kubernetesIngress.ingressEndpoint.hostname and providers.kubernetesIngress.ingressEndpoint.ip.

Why

Currently, setting the Kubernetes Ingress endpoint hostname or IP requires raw CLI flags via additionalArguments:

additionalArguments:
  - "--providers.kubernetesingress.ingressendpoint.hostname=example.com"

This is inconsistent with how publishedService is already exposed as a native value. The ingressEndpoint.hostname and ingressEndpoint.ip options are part of Traefik's static configuration but have no corresponding Helm values.

Changes

  • values.yaml: Added providers.kubernetesIngress.ingressEndpoint.hostname and providers.kubernetesIngress.ingressEndpoint.ip (both default to empty string / disabled)
  • _podtemplate.tpl: Conditionally renders --providers.kubernetesingress.ingressendpoint.hostname and --providers.kubernetesingress.ingressendpoint.ip when set
  • tests: Added 4 test cases covering default (not set) and explicit values for both hostname and ip

Usage

providers:
  kubernetesIngress:
    publishedService:
      enabled: false
    ingressEndpoint:
      hostname: "ingress.example.com"

This is useful when using an internal load balancer that assigns an IP rather than a hostname, and you need to explicitly set the hostname that appears in Ingress resource status.

@DrFaust92 DrFaust92 force-pushed the feat/ingress-endpoint-hostname branch 3 times, most recently from 123540c to 67b0014 Compare March 4, 2026 01:55
Copy link
Contributor

@darkweaver87 darkweaver87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mloiseleur mloiseleur added the kind/enhancement New feature or request label Mar 11, 2026
@mloiseleur mloiseleur changed the title feat: add native ingressEndpoint hostname and ip for kubernetesIngress provider feat(ingress): add native ingressEndpoint hostname and ip support Mar 11, 2026
…esIngress provider

Currently, setting the Kubernetes Ingress endpoint hostname or IP requires
using additionalArguments with raw CLI flags:

  additionalArguments:
    - "--providers.kubernetesingress.ingressendpoint.hostname=example.com"

This adds first-class values support for these options under
providers.kubernetesIngress.ingressEndpoint, consistent with how
publishedService is already exposed:

  providers:
    kubernetesIngress:
      ingressEndpoint:
        hostname: example.com
        ip: 1.2.3.4

These map to the Traefik static configuration options
--providers.kubernetesingress.ingressendpoint.hostname and
--providers.kubernetesingress.ingressendpoint.ip respectively.
@traefiker traefiker force-pushed the feat/ingress-endpoint-hostname branch from 67b0014 to 671df2d Compare March 11, 2026 15:24
@traefiker traefiker merged commit 88005b0 into traefik:master Mar 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants