-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
[AIRFLOW-4008] add envFrom for Kubernetes Executor #4952
[AIRFLOW-4008] add envFrom for Kubernetes Executor #4952
Conversation
678fbd1
to
cdbf418
Compare
cdbf418
to
3e7caf1
Compare
…AIRFLOW-4008/k8s-exec-envfrom-configmap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on this feature. Could you please add an integration test?
tests/contrib/kubernetes/kubernetes_request_factory/test_pod_request_factory.py
Show resolved
Hide resolved
Please prefix your commits with There is some overlap between this PR and #4772 - can you and @galuszkak work out how do get both these in without duplicating code/what makes sense where etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedback to align this with #4772 . I'm working on my PR for 3 weeks already, there was a lot of code reviews there, so hopefully, this can help catch changes that I made because of different requests in CR.
airflow/contrib/kubernetes/kubernetes_request_factory/kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
self.kube_env_from_configmap_ref = configuration.get(self.kubernetes_section, | ||
'env_from_configmap_ref') | ||
self.kube_env_from_secret_ref = configuration.get(self.kubernetes_section, | ||
'env_from_secret_ref') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be consistent with #4772 I would suggest using self.kube_secrets
and add self.kube_configmaps
.
I think the simplest move here would be to get @galuszkak's PR merged first, and I can just work off the changes that make it into master. It's true that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring style change is needed.
@davlum my changes were merged, so I believe You can start working back on this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partial review (on mobile)
Nice improvement to the tests.
I wonder if we can reduce code in tests some how - want to look at that on a bigger screen
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
Let me know if you think some of the tests are redundant. I just refactored the Secrets object to be a bit more intuitive. I find optionally setting attributes of an object to be very difficult to reason about. |
ac451a5
to
665bbc0
Compare
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Outdated
Show resolved
Hide resolved
tests/contrib/kubernetes/kubernetes_request_factory/test_kubernetes_request_factory.py
Show resolved
Hide resolved
665bbc0
to
93384db
Compare
…AIRFLOW-4008/k8s-exec-envfrom-configmap
1026bac
to
4c590ba
Compare
b6b10e4
to
9191d80
Compare
Codecov Report
@@ Coverage Diff @@
## master #4952 +/- ##
==========================================
+ Coverage 75.99% 76.11% +0.11%
==========================================
Files 461 461
Lines 29968 29979 +11
==========================================
+ Hits 22774 22818 +44
+ Misses 7194 7161 -33
Continue to review full report at Codecov.
|
9191d80
to
5a7b0aa
Compare
* deepcopy objects
5a7b0aa
to
6e0068f
Compare
Thanks @dimberman . No other comment/issue to me. |
Make sure you have checked all steps below.
Jira
Description
This PR enables workers brought up by the KubernetesExecutor to use the envFrom feature to set environment variables.
Tests
Commits
Documentation
Code Quality
flake8