stephen-bracken commented on PR #70026:
URL: https://github.com/apache/airflow/pull/70026#issuecomment-5057592039
> I assume that the goal of this PR is to make the set of
core.hostname_callable=airflow.utils.net.get_host_ip_address not needed
(correct me if I'm wrong).
Partially yes. In order to make the calls work through the service we would
need to make a new method that strips the pod name from the FQDN returned by
`airflow.utils.net.getfqdn`, e.g.
```python
def get_host_service_name():
"""Service-aware hostname callable.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-aaaa-records-1
"""
from airflow.utils.net import getfqdn
fqdn = getfqdn()
return ".".join(fqdn.split(".")[1:])
```
Without the subdomain this method does not work, as the pod's FQDN will only
return the pod name without the subdomain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]