@@ -60,13 +60,19 @@ def get_execution_dates(execution_date, external_dag_id, **kwargs):
6060 arguments = ['run' , '--verbose' , '--no-use-cache' , f'./{ pipeline_id } ' ],
6161 volumes = [
6262 k8s .V1Volume (name = 'k8s-ops' , secret = k8s .V1SecretVolumeSource (secret_name = 'ops' )),
63- k8s .V1Volume (name = 'data' , nfs = k8s .V1NFSVolumeSource (server = '172.16.0.9' , path = '/mnt/sdb3/srv/default/oknesset/pipelines/data/oknesset-nfs-gcepd' )),
63+ k8s .V1Volume (
64+ name = 'data' ,
65+ persistent_volume_claim = k8s .V1PersistentVolumeClaimVolumeSource (claim_name = 'airflow-scheduler' )
66+ ),
6467 ],
6568 volume_mounts = [
6669 k8s .V1VolumeMount (name = 'k8s-ops' , mount_path = '/secret_service_key' , sub_path = 'secret.json' , read_only = True ),
6770 k8s .V1VolumeMount (name = 'data' , mount_path = '/pipelines/data' , sub_path = 'data' ),
6871 k8s .V1VolumeMount (name = 'data' , mount_path = '/pipelines/dist' , sub_path = 'dist' ),
6972 ],
73+ env_from = [
74+ k8s .V1EnvFromSource (config_map_ref = k8s .V1ConfigMapEnvSource (name = 'hasadna-proxy1' ))
75+ ],
7076 env_vars = [
7177 k8s .V1EnvVar (name = 'DPP_DB_ENGINE' , value_from = k8s .V1EnvVarSource (secret_key_ref = k8s .V1SecretKeySelector (name = 'publicdb' , key = 'DPP_DB_ENGINE' ))),
7278 k8s .V1EnvVar (name = 'DUMP_TO_STORAGE' , value = '1' ),
@@ -80,9 +86,6 @@ def get_execution_dates(execution_date, external_dag_id, **kwargs):
8086 requests = {'cpu' : '0.5' , 'memory' : '1.5Gi' },
8187 limits = {'cpu' : '1.5' , 'memory' : '2Gi' },
8288 ),
83- node_selector = {
84- 'oknesset-allowed-ip' : 'true'
85- },
8689 random_name_suffix = True ,
8790 task_id = pipeline_dag_id ,
8891 dag = dag
0 commit comments