GoogleCloudService#
- class phalanx.services.google_cloud.GoogleCloudService(storage, phalanx_run_id)#
Bases:
objectOperations for working with Google Cloud resources.
All operations must happen in the same Google Cloud region and project.
Anything that uses this should assume all authentication has already been done and that the Google Cloud Python SDK can find whatever it needs to send authenticated requests.
If you’re running locally,
gcloud auth application-default loginshould work.- Parameters:
storage (
GoogleCloudAPIStorage) – Storage object for interacting with the google cloud API.phalanx_run_id (
str) – An identifier to put in thephalanx-runlabel on every Google Cloud resource that is created with this service. This is helpful in resuming backup and restore process after a Google Cloud operation fails (which does happen intermittently), and in cleaning up these resources later.
Methods Summary
backup_and_restore_pvcs(source_cluster, ...)Backup a GKE cluster and restore the PVCs and PVs to another.
Delete Google Cloud resources labeled with this phalanx run id.
Get details about a Google Cloud Firewall rule.
get_cluster(cluster)Get details about a GKE cluster.
List all of the provisioned static IP addresses.
Methods Documentation
- backup_and_restore_pvcs(source_cluster, destination_cluster)#
Backup a GKE cluster and restore the PVCs and PVs to another.
- get_cert_manager_firewall_rule()#
Get details about a Google Cloud Firewall rule.
- Returns:
Information about that Google Cloud Firewall rule.
- Return type: