Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gcp): updated + enhanced gcp estimation script #45

Merged
merged 7 commits into from
Jul 29, 2024

Conversation

carlosmmatos
Copy link
Contributor

@carlosmmatos carlosmmatos commented Jul 23, 2024

Fixes #41

This PR introduces several improvements, enhancements, and bug fixes that were much needed. The main issue to target was to add the inclusion of tracking serverless resources in GCP. This PR adds

  • Count of GKE Autopilot clusters
  • Count of services for Google Cloud run
  • Count of jobs for Google Cloud run

On top of that, I've added better logging support and error handling, especially around service APIs that are disabled in a project that is needed. This should also Fix #40 .

Other updates:

  • I've added some type hinting to make it clearer what the functions are returning
  • Using tabulate now to match output of AWS to keep some consistency
  • Added a way to generate a file that tracks failed service API calls. Produces a list of gcloud commands that can be ran to enable them. **Might make this options?

@carlosmmatos carlosmmatos self-assigned this Jul 23, 2024
@carlosmmatos carlosmmatos added enhancement New feature or request GCP GCP related issues and questions labels Jul 23, 2024
This commit adds the logic/support for cloud run jobs. It also ensures
that the failed service call returns a uniq set before writing to file
to prevent duplicates.
@redhatrises
Copy link
Contributor

For GKE autopilot, are you able to add the node count since daemonset is recommended for deployment?

Clean up messaging, clean up logging, add node count, and clean up
output such as table headers.
@yannhowe
Copy link

Looks like the output here

https://github.com/carlosmmatos/cloud-resource-estimator/blob/d914ea2ac89b20323f37657981cf6f0b1e1a37da/benchmark.sh#L158

needs to be synced up with the output from here

https://github.com/carlosmmatos/cloud-resource-estimator/blob/d914ea2ac89b20323f37657981cf6f0b1e1a37da/GCP/gcp_cspm_benchmark.py#L224

since most will run from root folder the paths won't be correct. Was the same with Azure

#44 (comment)

@carlosmmatos carlosmmatos merged commit 441a924 into CrowdStrike:main Jul 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GCP GCP related issues and questions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(GCP): Discover serverless workloads Enhance script to gracefully handle errors
3 participants