Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow templating webserver ingress hostnames #33142

Conversation

kimminw00
Copy link
Contributor

@kimminw00 kimminw00 commented Aug 5, 2023

I would like to propose allowing template values to webserver ingress hostnames.

Why is it needed?
Let's assume that we're providing airflow service to multiple teams.
By creating webserver ingress hostnames using {{ .Release.Namespace }} or {{ .Release.Name }},
there is no need to create multiple values ​​files to store different hostnames ​​for each team.

Usage

    hosts:
    #   # The hostname for the web Ingress (can be templated)
    - name: '{{ .Release.Namespace }}.airflow.service.com'

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Aug 5, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 5, 2023

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@potiuk
Copy link
Member

potiuk commented Aug 6, 2023

Sounds good - can you please add test for it?

@kimminw00
Copy link
Contributor Author

Sounds good - can you please add test for it?

Ok, I'll add test with pytest in https://github.com/apache/airflow/blob/main/helm_tests/webserver/test_ingress_web.py

@kimminw00 kimminw00 force-pushed the feature/allow-templating-webserver-ingress-hostnames branch from 4ff3ee7 to f909443 Compare August 13, 2023 05:16
@kimminw00 kimminw00 force-pushed the feature/allow-templating-webserver-ingress-hostnames branch from 9f3ac64 to 3e7618d Compare August 13, 2023 05:31
@kimminw00 kimminw00 closed this Aug 13, 2023
@kimminw00 kimminw00 force-pushed the feature/allow-templating-webserver-ingress-hostnames branch from 3e7618d to c645d8e Compare August 13, 2023 05:42
@kimminw00 kimminw00 reopened this Aug 13, 2023
@kimminw00 kimminw00 force-pushed the feature/allow-templating-webserver-ingress-hostnames branch 4 times, most recently from 90a650a to d79f5e8 Compare August 13, 2023 08:08
@kimminw00 kimminw00 force-pushed the feature/allow-templating-webserver-ingress-hostnames branch from d79f5e8 to c3b3ea9 Compare August 13, 2023 08:09
@kimminw00
Copy link
Contributor Author

@potiuk I added test cases as requested!

@potiuk potiuk merged commit 2976a56 into apache:main Aug 14, 2023
48 checks passed
@hussein-awala
Copy link
Member

I'm a bit late! I opened #33384 to change the used function.

@potiuk
Copy link
Member

potiuk commented Aug 14, 2023

I'm a bit late! I opened #33384 to change the used function.

And merged :)

ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 17, 2023
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:helm-chart Airflow Helm Chart changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants