Code and jobs to cleanup the the new auto-deployed blueprints. #655
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to auto-deploy the GCP blueprint (Setup autodeploy for GCP blueprints GoogleCloudPlatform/kubeflow-distribution#5)
We need to add logic and K8s resources to cleanup the blueprints so
we don't run out of GCP quota.
Create cleanup_blueprints.py to cleanup auto_deployed blueprints.
use fire and possibly python3 (not sure code in cleanup_ci is python3
compatible)
Create a CLI create_context.py to create K8s config contexts. This will
be used to get credentials to talk to the cleanup cluster when running
on K8s.
Create a Tekton task to run the cleanup script. This is intended
as a replacement for our existing K8s job (Use Tekton (instead of K8s jobs) to cleanup the Kubeflow CI project #654). There's a couple reasons
to start using Tekton
i) We are already using Tekton as part of AutoDeploy infrastructure.
ii) We can leverage Tekton to handle git checkouts.
iii) Tekton makes it easy to additional steps to do things like
create the context.
This is a partial solution. This PR contains a Tekton pipeline
that is only running cleanup for the blueprints.
run the existing cleanup-ci script. The only issue I forsee
is that the Tekton pipeline runs in the kf-ci-v1 cluster and
will need to be granted access to the kubeflow-testing cluster
so we can cleanup Argo workflows in that cluster.
To run the Tekton pipeline regulary we create a cronjob that runs kubectl
apply.
cnrm_clients.py is a quick hack to create a wrapper to make it
easier to work with CNRM custom resources.