You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vizeit (via GitHub)" <gi...@apache.org> on 2024/01/19 07:36:01 UTC
[I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
vizeit opened a new issue, #36888:
URL: https://github.com/apache/airflow/issues/36888
### Description
Currently configmaps are not supported in the template fields in the KubernetesPodOperator. It will be helpful to add this support to dynamically attach configmaps to a pod
### Use case/motivation
Currently configmaps are not supported in the template fields in the KubernetesPodOperator. It will be helpful to add this support to dynamically attach configmaps to a pod
### Related issues
_No response_
### Are you willing to submit a 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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on issue #36888:
URL: https://github.com/apache/airflow/issues/36888#issuecomment-1900397243
Do KubernetesPodOperator's existing parameters [volumes](https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/pod.py#L121) and [configmaps](https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/pod.py#L175) not suffice?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "RNHTTR (via GitHub)" <gi...@apache.org>.
RNHTTR commented on issue #36888:
URL: https://github.com/apache/airflow/issues/36888#issuecomment-1900968211
Sounds good. I assigned the Issue to you. Feel free to open a PR! The [Contributors Quickstart Guide](https://github.com/apache/airflow/blob/main/CONTRIBUTORS_QUICK_START.rst) might be helpful, and feel free to [reach out on slack](https://apache-airflow-slack.herokuapp.com/).
> The reason I think it will help to add configmap template functionality rather in the k8 provider package is because decorator also uses k8 operator and I am not sure I can easily add template fields to k8 decorator without creating custom provider package for k8 that has extended k8 operator class.
Wouldn't the template fields be added to the [KubernetesPodOperator in the Kubernetes provider package](https://github.com/apache/airflow/blob/main/airflow/providers/cncf/kubernetes/operators/pod.py#L213)?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "vizeit (via GitHub)" <gi...@apache.org>.
vizeit commented on issue #36888:
URL: https://github.com/apache/airflow/issues/36888#issuecomment-1900977219
Yes, the change will only be in the KubernetesPodOperator class in the Kubernetes provider package. I meant to say in my comment that if I wanted to incorporate additional template fields in the k8 decorator myself in my project, I could not do it unless I first created custom k8 operator class with those additional template fields and then creating custom k8 decorator in a custom provider package. I hope this clarifies
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "vizeit (via GitHub)" <gi...@apache.org>.
vizeit commented on issue #36888:
URL: https://github.com/apache/airflow/issues/36888#issuecomment-1900785224
@RNHTTR exisiting parameters configmaps and volumes for configmaps do not suffice. If the configmaps are dynamically created in a DAG with the name of configmaps template based, k8 operator currently fails to attach configmaps because the name is not rendered. To mount configmaps as Volumes, V1ConfigMapVolumeSource type will contain the name that is not supported in the current k8 operator recursive template rendering
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "vizeit (via GitHub)" <gi...@apache.org>.
vizeit commented on issue #36888:
URL: https://github.com/apache/airflow/issues/36888#issuecomment-1900939654
Also to add, I have been able to extend k8 operator to accommodate configmap as a volume with templated values, not as environment variables. I did that last year with pvcs before the pvcs were added to template fields. The reason I think it will help to add configmap template functionality rather in the k8 provider package is because decorator also uses k8 operator and I am not sure I can easily add template fields to k8 decorator without creating custom provider package for k8 that has extended k8 operator class. I hope these details will help you to understand better
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator [airflow]
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala closed issue #36888: Support for configmaps (as env var & volume) in the template fields in the KubernetesPodOperator
URL: https://github.com/apache/airflow/issues/36888
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org