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 17
17
# [START composer_kubernetespodoperator]
18
18
import datetime
19
19
from airflow import models
20
- from airflow .contrib .kubernetes import pod
21
20
from airflow .contrib .kubernetes import secret
22
21
from airflow .contrib .operators import kubernetes_pod_operator
23
22
200
199
annotations = {'key1' : 'value1' },
201
200
# Resource specifications for Pod, this will allow you to set both cpu
202
201
# 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 },
204
210
# Specifies path to kubernetes config. If no config is specified will
205
211
# default to '~/.kube/config'. The config_file is templated.
206
212
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
2
2
kubernetes == 10.0.1
3
3
scipy == 1.3.1
4
4
numpy == 1.17.2
You can’t perform that action at this time.
0 commit comments