-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
60 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,23 @@ | |
|
||
from airflow.contrib.hooks.gcp_api_base_hook import GoogleCloudBaseHook | ||
|
||
docs = """ | ||
### Clean GKE Pods | ||
Built from cloudops-infra repo, projects/airflow/pod-clean | ||
#### Purpose | ||
This DAG executes a GKEPodOperator to clean out old completed pods | ||
on the shared derived-datasets gke cluster. We need to do this periodically | ||
because GCP has a 1500 object limit quota. | ||
#### Owner | ||
[email protected] | ||
""" | ||
|
||
|
||
default_args = { | ||
'owner': '[email protected]', | ||
'depends_on_past': False, | ||
|
@@ -14,11 +31,9 @@ | |
'retry_delay': timedelta(minutes=30), | ||
} | ||
|
||
dag = DAG("clean-gke-pods", default_args=default_args, schedule_interval="@daily") | ||
|
||
# Built from cloudops-infra repo, projects/airflow/pod-clean | ||
docker_image='gcr.io/moz-fx-data-airflow-prod-88e0/gke-pod-clean:1.0' | ||
dag = DAG("clean-gke-pods", default_args=default_args, schedule_interval="@daily", doc_md = docs) | ||
|
||
docker_image='gcr.io/moz-fx-data-airflow-prod-88e0/gke-pod-clean:1.3' | ||
gke_cluster_name='bq-load-gke-1' | ||
gke_location='us-central1-a' | ||
|
||
|
@@ -35,4 +50,3 @@ | |
image=docker_image, | ||
arguments=docker_args, | ||
dag=dag) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
### Using kube_client.py from 1.10.2 | ||
We include the airflow/contrib/kubernetes/kube_client.py from 1.10.2 | ||
We used to include the airflow/contrib/kubernetes/kube_client.py from 1.10.2 | ||
because the 1.10.7 kube_client.py has some configuration issues when | ||
trying to push xcom from gkepodoperator. if do_push_xcom is set to False, | ||
the upstream GkePodOperator works fine. | ||
|
||
### As of 1.10.12 I've removed the backported 1.10.7 gcp_container_operator, | ||
kubernetes_pod_operator, and the 1.10.2 kube_client |
327 changes: 0 additions & 327 deletions
327
dags/operators/backport/gcp_container_operator_1_10_7.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.