Skip to content

Add hostAliases support to Helm chart #5865

@janlauber

Description

@janlauber

Is your feature request related to a problem? Please describe.

The external-secrets Helm chart currently doesn't support adding custom hostAliases to pods. This is needed in scenarios where:

  1. Air-gapped environments: When DNS resolution is limited or unavailable, custom hostname mappings are required
  2. Custom DNS resolution: When pods need to resolve internal hostnames that aren't available through standard DNS
  3. Development/testing: When testing with custom hostname mappings
  4. Network isolation: When pods need to access services via custom hostname entries

Currently, users have to manually patch deployments or use workarounds like init containers to modify /etc/hosts, which is not ideal.

Describe the solution you'd like

Add support for Kubernetes hostAliases configuration in the Helm chart, allowing users to add custom entries to /etc/hosts for all three deployments:

  • Main controller deployment
  • Webhook deployment
  • Cert-controller deployment

The implementation should follow the existing pattern used for other pod-level configurations (like tolerations, nodeSelector), supporting:

  • Global defaults via global.hostAliases (applied to all deployments)
  • Component-specific overrides via:
    • hostAliases (for main controller)
    • webhook.hostAliases (for webhook)
    • certController.hostAliases (for cert-controller)

Example usage:

# Global hostAliases (applied to all deployments)
global:
  hostAliases:
    - ip: "192.168.1.100"
      hostnames:
        - "example.local"
        - "example"

# Component-specific override
webhook:
  hostAliases:
    - ip: "10.0.0.1"
      hostnames:
        - "webhook.internal"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions