Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(job): new flag to pass additional mount options for gcsfuse mounts#6005

Open
Neelabh94 wants to merge 5 commits into
GoogleCloudPlatform:developGoogleCloudPlatform/cluster-toolkit:developfrom
Neelabh94:gcs-mount-optionsNeelabh94/cluster-toolkit:gcs-mount-optionsCopy head branch name to clipboard
Open

feat(job): new flag to pass additional mount options for gcsfuse mounts#6005
Neelabh94 wants to merge 5 commits into
GoogleCloudPlatform:developGoogleCloudPlatform/cluster-toolkit:developfrom
Neelabh94:gcs-mount-optionsNeelabh94/cluster-toolkit:gcs-mount-optionsCopy head branch name to clipboard

Conversation

@Neelabh94

@Neelabh94 Neelabh94 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds support for passing custom mount options when submitting a job, bringing gcluster into closer parity with xpk behavior.

Key Changes:

  • Added --mount-options flag: Users can now pass custom storage options (e.g., logging:severity:info,enable-atomic-rename-object:true) to gcluster job submit.
  • Added Validation: Included a pre-run validation step (validateMountOptions) that ensures the --mount-options flag is currently only utilized for GCS fuse volumes (i.e. it enforces that all supplied --mount values start with gs:// when mount options are present).
  • Updated Documentation: Added the new flag and usage examples to the docs/gcluster_job_guide.md.

@Neelabh94 Neelabh94 self-assigned this Jul 23, 2026
@Neelabh94 Neelabh94 added the release-improvements Added to release notes under the "Improvements" heading. label Jul 23, 2026
@Neelabh94

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new --mount-options flag to the gcluster job submit command, enabling custom mount options for GCS fuse volumes, and updates the orchestrator, GKE storage manager, and documentation accordingly. The review feedback suggests enhancing validation to fail-fast if --mount-options is specified without any mounts, and formatting struct fields in pkg/orchestrator/orchestrator.go to comply with standard Go alignment.

Comment thread cmd/job/submit.go
Comment thread pkg/orchestrator/orchestrator.go Outdated
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 enhances the gcluster CLI by enabling custom mount options for GCS fuse volumes, improving parity with other Google Cloud job submission tools. The changes include adding the necessary CLI flag, implementing strict validation to prevent misuse with non-GCS volumes, and updating the orchestration layer to pass these options through to the GKE CSI driver.

Highlights

  • New CLI Flag: Introduced the --mount-options flag to gcluster job submit to allow users to pass custom configuration options for GCS fuse volumes.
  • Validation Logic: Added a validation step to ensure that the --mount-options flag is only applied when mounting GCS buckets (gs://).
  • Orchestration Updates: Updated the GKE storage manager and job definition types to propagate and apply these mount options to the underlying CSI driver.
  • Documentation: Updated the GCluster job guide with usage examples and details regarding the new flag.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new --mount-options flag to the gcluster job submit command, enabling custom mount options for GCS fuse volumes, and updates the relevant documentation. Feedback suggests adding a validation check to ensure --mount-options is not silently ignored when no mounts are specified, and formatting the JobDefinition struct to align the new field according to standard Go guidelines.

Comment thread cmd/job/submit.go
Comment thread pkg/orchestrator/orchestrator.go
@Neelabh94
Neelabh94 marked this pull request as ready for review July 23, 2026 08:49
@Neelabh94
Neelabh94 requested a review from a team as a code owner July 23, 2026 08:49
Comment thread cmd/job/submit.go
return fmt.Errorf("--mount-options requires at least one GCS mount")
}
for _, m := range volumeStr {
if !strings.HasPrefix(m, "gs://") {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user runs a job that mounts a GCS bucket alongside a local disk or NFS drive, the command will be completely rejected. In storage.go, the backend handles mixed workloads perfectly by explicitly checking if volType == "gcsfuse". Should we update the validation to just confirm that at least one GCS bucket is mounted when --mount-options is used, rather than an aggressive front-end validation?

example snippet:

func validateMountOptions() error {
	if mountOptions != "" {
		hasGCSMount := false
		for _, m := range volumeStr {
			if strings.HasPrefix(m, "gs://") {
				hasGCSMount = true
				break
			}
		}
		if !hasGCSMount {
			return fmt.Errorf("--mount-options was provided, but no GCS fuse volumes (gs://...) were mounted")
		}
	}
	return nil
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-improvements Added to release notes under the "Improvements" heading.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.