AdeshDeshmukh opened a new issue, #77665:
URL: https://github.com/apache/airflow/issues/77665

   ### Under which category would you file this issue?
   
   Helm chart
   
   ### Apache Airflow version
   
   3.2.2 (default image for Helm chart 1.22.0)
   
   ### What happened and how to reproduce it?
   
   I tried using the Helm release name in `config.api.base_url`. The chart 
fails to render when it parses the URL to build the default Execution API URL.
   
   ```sh
   helm template probe airflow \
     --repo https://airflow.apache.org \
     --version 1.22.0 \
     --set-string 'config.api.base_url=https://{{ .Release.Name 
}}.example.org/airflow' \
     --show-only templates/configmaps/configmap.yaml
   ```
   
   The relevant part of the error is:
   
   ```text
   error calling urlParse: unable to parse url: parse "https://{{ .Release.Name 
}}.example.org/airflow": invalid character "{" in host name
   ```
   
   Replacing the templated value with the equivalent literal URL, 
`https://probe.example.org/airflow`, renders successfully.
   
   ### What you think should happen instead?
   
   The chart should evaluate the Helm expression before parsing the URL. The 
templated value should render the same configuration as the equivalent literal 
URL:
   
   ```ini
   base_url = https://probe.example.org/airflow
   execution_api_server_url = http://probe-api-server:8080/airflow/execution/
   ```
   
   ### Operating System
   
   macOS (Apple Silicon)
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   1.22.0 (latest released)
   
   ### Kubernetes Version
   
   Reproduced locally with helm template (Helm 3.19.0). No Kubernetes cluster 
was used.
   
   ### Helm Chart configuration
   
   ```yaml
   config:
     api:
       base_url: 'https://{{ .Release.Name }}.example.org/airflow'
   ```
   
   ### Docker Image customizations
   
   None.
   
   ### Anything else?
   
   The chart documents that values under `config` support Helm templating. The 
ConfigMap template passes the raw `config.api.base_url` to `urlParse` while 
generating the default Execution API URL, before rendering the config values 
with `tpl`.
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
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]

Reply via email to