Repository navigation
fix(validators): remove legacy GCSFuse IAM role validator and update blueprint comments - #6300
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request removes a legacy IAM role validator that was causing fatal 404 errors during infrastructure provisioning. By decoupling the IAM validation from the initial deployment phase, the change prevents unnecessary blocking of users. Future pre-flight checks will be integrated into the job submission workflow, and documentation has been updated to provide better guidance on managing GCSFuse permissions in various deployment scenarios. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request removes the automatic GCS Fuse IAM role existence validator from the Go codebase. Additionally, it updates several GKE example blueprints to reflect that the GKE Service Agent permissions are now automatically granted by default, and updates the gke-persistent-volume module documentation to explain how to disable automatic IAM grants for shared or pre-configured buckets. I have no further feedback to provide as there are no review comments.
a828389
into
GoogleCloudPlatform:develop
This PR resolves an issue where
gcluster createfailed with a fatal HTTP 404 error on clean Google Cloud projects when validating GCSFuse custom IAM roles (test_gcsfuse_iam_role_exists), forcing users to bypass validation using-l IGNORE.Architectural Context & Root Cause
Separation of Lifecycle Stages (Day 0 vs Day 2):
gcluster create(Day 0 - Infrastructure Provisioning): Validates cloud infrastructure feasibility (project existence, enabled APIs, machine types, zones, reservations). It does not have context on runtime user workloads or target GCS buckets.gcluster job submit(Day 2 - Workload Execution): This is where pre-flight IAM validation properly belongs. When a user submits a job targeting a bucket (--mount gs://<bucket>=/data;profile=...),gclusterwill inspect the bucket's IAM policy (storage.buckets.getIamPolicy) at runtime and emit non-blocking advisory warnings if permissions are missing.Decoupled Deployment Automation:
modules/file-system/gke-persistent-volumealready automates granting the required Anywhere Cache permissions to the GKE Service Agent using Google's built-inroles/storage.admindirectly on the target bucket, eliminating the requirement for project-level custom IAM role creation (iam.roles.create).Key Changes
pkg/validators/:test_gcsfuse_iam_role_exists,testGCSFuseIAMRoleExistsCheck, andcheckGCSFuseIAMBindingfrompkg/validators/cloud.go.testGCSFuseIAMRoleExistsNameandblueprintHasGCSFusefrompkg/validators/validators.goanddefaults(bp).modules/file-system/gke-persistent-volume/README.md:grant_gcsfuse_service_agent_role: false) when targeting shared or pre-configured enterprise buckets.examples/:roles/storage.adminis automatically granted by default and reference the module documentation for custom least-privilege role overrides.*NOTE: Runtime pre-flight IAM verification against target buckets will be integrated into
gcluster job submitas part of the dynamic GCSFuse Storage Profile workflow.Testing
go test -v ./pkg/validators/...(All 34 tests passed).make gcluster(Compiled cleanly with zero errors).go fmt,go vet,golangci-lint,yamllint,codespell).Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.