Comments (9)
in the Triggerer
[2022-03-11 10:41:14,176] {triggerer_job.py:356} INFO - Trigger <astronomer.providers.cncf.kubernetes.triggers.wait_container.WaitContainerTrigger kubernetes_conn_id=None, hook_params={'cluster_context': None, 'config_file': None, 'in_cluster': None}, pod_name=airflow-test-pod.3279ee5034e046e2baa4b22d746cabf4, container_name=base, pod_namespace=default, pending_phase_timeout=120, poll_interval=10> (ID 9) starting
2022-03-11T10:41:14.186014105Z [2022-03-11 10:41:14,176] {kube_config.py:482} WARNING - Config not found: ~/.kube/config
I can fix the problem by doing this ->
KubernetesPodOperatorAsync(
config_file=os.getenv("AIRFLOW__KUBERNETES__CONFIG_FILE"),
...
from astronomer-providers.
actually i would prefer if we do not add support for using the config. as @raphaelauv has pointed out, users can set the config file in operator param. and once we add support for k8s hook in kpo, then users can just set it in k8s connection.
if we add support for taking values from conf, then we'll have to make a major release in astro operators to remove it. it seems that if we document this difference, then when switching to this operator they can also take care to set param.
what do yall think?
from astronomer-providers.
Yup agreed, thank you both
from astronomer-providers.
@raphaelauv Where did you see this log, on Triggerer
or Scheduler
?
cc @dstandish
from astronomer-providers.
Looks like we have the same thing with KubernetesPodOperator
, currently that setting is mostly for KubernetesExecutor
and we can make it explicit in Airflow docs or start using the configs for KPO too :)
The other thing you could do is:
KubernetesPodOperatorAsync(
config_file=conf.get("kubernetes", "config_file"),
namespace=conf.get("kubernetes", "namespace"),
...
That way, it will work for all different ways of settings Airflow configs: Secrets Backend, Env Vars, airflow.cfg :)
from astronomer-providers.
No AIRFLOW__KUBERNETES__CONFIG_FILE work with the KubernetesPodOperator
because of this line
I've been using for long time the KPO without explicitly passing the config_file thanks to that env_var
from astronomer-providers.
Oh yes, you are absolutely right, we will fix it and release a new version soon :)
from astronomer-providers.
Yeah more work needs to be done to (1) make KPO use K8s hook and (2) no longer depend on internal kubernetes utils. There are a few PRs in flight concerning this. I am thinking we should add support for AIRFLOW__KUBERNETES__CONFIG_FILE
with a deprecation warning and signal that in future everything will have to be configured through the hook. Let me look into this.
from astronomer-providers.
I agree with you, using a K8S connection will be nicer, so let's not add this feature to the KPOA.
from astronomer-providers.
Related Issues (20)
- check_fn For S3KeySensorAsync Is Not Compatible With check_fn Of Its Super Class S3KeySensor HOT 1
- Example DAG for Livy and Hive fails for multiple workers HOT 1
- AWS assume role not working HOT 3
- `snowflake` not included in the `extras_require` of `amazon` extra HOT 1
- Deprecation Warning Incorrectly Triggered for 'poll_interval' When Using 'poke_interval' in HttpSensorAsync
- Add AioRefreshableCredentials for AwsBaseHookAsync
- change ExternalDeploymentTaskSensorAsync to use aiohttp HOT 1
- Test astronomer-providers on all supported Python versions HOT 3
- Bring back hive support for Python 3.11 HOT 3
- HttpAsyncHook: cannot do an await response.text() or response.json() after run: "Connection closed" HOT 7
- astronomer-providers not pinning airflow version (updating current setup) HOT 3
- Bad data leading to confusing logging in SnowflakeOperatorAsync HOT 1
- SnowflakeOperator expiring Token
- KPO log reasons for not starting pod HOT 1
- KubernetesPodOperatorAsync failing for latest release of CNCF provider HOT 3
- Release astronomer-providers 1.18.3 HOT 1
- Add secret for readthedoc webhook HOT 3
- Compare astronomer-providers and oss airflow operators/sensors and scope out deprecation plan HOT 5
- Debug snowflake flaky test HOT 3
- Update snowflake_op_multiple_query_in_one_run task in snowflake DAG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astronomer-providers.