File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1717# [START composer_kubernetespodoperator]
1818import datetime
1919from airflow import models
20- from airflow .contrib .kubernetes import pod
2120from airflow .contrib .kubernetes import secret
2221from airflow .contrib .operators import kubernetes_pod_operator
2322
200199 annotations = {'key1' : 'value1' },
201200 # Resource specifications for Pod, this will allow you to set both cpu
202201 # and memory limits and requirements.
203- resources = pod .Resources ().__dict__ ,
202+ # Prior to Airflow 1.10.4, resource specifications were
203+ # passed as a Pod Resources Class object,
204+ # If using this example on a version of Airflow prior to 1.10.4,
205+ # import the "pod" package from airflow.contrib.kubernetes and use
206+ # resources = pod.Resources() instead passing a dict
207+ # For more info see:
208+ # https://github.com/apache/airflow/pull/4551
209+ resources = {'limit_memory' : 1 , 'limit_cpu' : 1 },
204210 # Specifies path to kubernetes config. If no config is specified will
205211 # default to '~/.kube/config'. The config_file is templated.
206212 config_file = '/home/airflow/composer_kube_config' ,
Original file line number Diff line number Diff line change 1- apache-airflow [gcp_api ]== 1.10.5
1+ apache-airflow [gcp ]== 1.10.5
22kubernetes == 10.0.1
33scipy == 1.3.1
44numpy == 1.17.2
You can’t perform that action at this time.
0 commit comments