airflow-helm / charts

The User-Community Airflow Helm Chart is the standard way to deploy Apache Airflow on Kubernetes with Helm. Originally created in 2017, it has since helped thousands of companies create production-ready deployments of Airflow on Kubernetes.
https://github.com/airflow-helm/charts/tree/main/charts/airflow
Apache License 2.0
659 stars 475 forks source link

allow setting `hostAliases` in Pods #548

Open F43RY opened 2 years ago

F43RY commented 2 years ago

Checks

Motivation

Hi, I'd like to set hostAlias in containers like git-sync in order to fetch dags from on premises scm but at the moment this is not possible with current velues.yaml.

Implementation

As workaround I edited the deployed deployments to include hostAliases in manifest. The best way should be to add hostAlias in values.yaml for each container.

Are you willing & able to help?

thesuperzapper commented 2 years ago

@F43RY can you clarify why you need to set hostAliases to be able to "fetch dags from on premises scm"?

Do your on-premise servers not exist in your cluster's DNS?

F43RY commented 2 years ago

exactly

thesuperzapper commented 2 years ago

@F43RY I would strongly recommend creating a split-horizon DNS for your company and using this as the DNS for your Kubernetes cluster.

That is, forward the DNS queries for internal domains like internal.example.org to your on-prem DNS resolver, and forward public domains like google.com to an internet DNS resolver like 1.1.1.1.


Generally speaking, this chart tries to avoid supporting extremely user-specific features, or features that represent anti-patterns in airflow or Kubernetes.

I personally believe using hostAliases represents both an "extremely user-specific feature" and an "anti-pattern for Kubernetes".

I will leave the issue open so that others can voice their support if they also need this feature.

seniut commented 1 week ago

Hello there. @thesuperzapper or some one who can know: sorry if my question is out of topic. Am I right that Airflow Chelm chart doesn't support hostAliases in kubernetesPodTemplate?