Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Add hostAliases support for Tenant#2508

Open
eXist-FraGGer wants to merge 1 commit intominio:masterfrom
eXist-FraGGer:master
Open

Add hostAliases support for Tenant#2508
eXist-FraGGer wants to merge 1 commit intominio:masterfrom
eXist-FraGGer:master

Conversation

@eXist-FraGGer
Copy link

@eXist-FraGGer eXist-FraGGer commented Feb 27, 2026

Description

Add support for spec.hostAliases in Tenant (apiVersion: minio.min.io/v2) so custom /etc/hosts entries can be configured for MinIO pods.

Changes included:

  • Added HostAliases []corev1.HostAlias to TenantSpec
  • Propagated hostAliases into MinIO StatefulSet PodSpec
  • Updated CRD schema (resources/base/crds/minio.min.io_tenants.yaml)
  • Updated Helm chart:
    • new tenant.hostAliases in helm/tenant/values.yaml
    • render spec.hostAliases in helm/tenant/templates/tenant.yaml
  • Synced related generated paths used in repo:
    • deepcopy handling
    • applyconfiguration (WithHostAliases)

Related Issue

relates: #1965

Type of Change

  • Bug fix 🐛
  • New feature 🚀
  • Breaking change 🚨
  • Documentation update 📖
  • Refactor 🔨
  • Other (please describe) ⬇️

Screenshots (if applicable e.g before/after)

Checklist

  • I have tested these changes
  • I have updated relevant documentation (if applicable)
  • I have added necessary unit tests (if applicable)

Test Steps

  1. Apply/update CRD from this branch.
  2. Create/update a Tenant with:
    spec:
      hostAliases:
        - ip: "10.10.10.10"
          hostnames:
            - "internal.example.local"
  3. Wait until MinIO StatefulSet is reconciled.
  4. Verify pod spec contains hostAliases
  5. Verify inside pod /etc/hosts contains the configured hostname mapping.

Additional Notes / Context

  • gofmt was applied.
  • go test was applied for
    • ./pkg/apis/minio.min.io/v2
    • ./pkg/client/applyconfiguration/minio.min.io/v2
    • ./pkg/resources/statefulsets
  • helm template confirmed rendering spec.hostAliases

Use case:

Deployed in minikube istio+minio+keycloak and configure hosted local domain zone (e.g. pdnsutil zone).
The issue is to setup oauth2 at minio via keycloak (Own OIDC Provider):

You can not use internal address .svc.cluster.local because redirect url at browser will not resolve internal kubernetes address.
So you are using hosted local zone e.g. keycloak.dev.local, but it will be resolved to 127.0.0.1 - this is wrong and this is why we must have hostAliases to configure hostname keycloak.dev.local to istio ingress gateway cluster IP.

@eXist-FraGGer eXist-FraGGer changed the title Add hostAliases support for Tenant (#1965) Add hostAliases support for Tenant Feb 27, 2026
@eXist-FraGGer
Copy link
Author

@cniackz, @harshavardhana, @pjuarezd, @ramondeklein Hello guys, please let's review this and discuss as it is very critical configuration.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant