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

add NFS and GCS volume support to Cloud Run v2 *Jobs* #17336

Comments

@moredip
Copy link

moredip commented Feb 21, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally
    to expedite investigation and resolution of this issue.

Description

Support for NFS and GCS volumes in Cloud Run services was recently added, but is still not available for Cloud Run jobs.

New or Affected Resource(s)

  • google_cloud_run_v2_job

Potential Terraform Configuration

resource "google_cloud_run_v2_job" "default" {
  name     = "service"
  launch_stage = "BETA"

  template {
    template {

      volumes {
        name = "nfs"
        nfs {
          server = google_filestore_instance.default.networks[0].ip_addresses[0]
          path   = "/share1"
        }
      }
  
      volumes {
        name = "bucket"
        gcs {
          bucket = google_storage_bucket.default.name
        }
      }

      containers {
        image = "us-docker.pkg.dev/cloudrun/container/hello:latest"
        volume_mounts {
          name       = "nfs"
          mount_path = "/mnt/nfs"
        }
        volume_mounts {
          name       = "gcs"
          mount_path = "/mnt/bucket"
        }
      }
   }
}

References

related issues (covering cloud run services):

PR implementing GCS and NFS support in service:

b/326474722

@github-actions github-actions bot added forward/review In review; remove label to forward service/run labels Feb 21, 2024
@roaks3
Copy link
Collaborator

roaks3 commented Feb 22, 2024

This appears to be something that can be added to jobs the same way as it was for services, however, I cannot find the nfs or gcs fields documented in the public API documentation https://cloud.google.com/run/docs/reference/rest/v2/Volume. With that said, I'm forwarding to the service team as a viable coverage gap, but it's possible this can only be done with services at this point in time.

@roaks3 roaks3 removed the forward/review In review; remove label to forward label Feb 22, 2024
@bskaplan
Copy link

It can be done with jobs, I guess the documentation just hasn't been updated yet. You can see it in the golang api Documentation, for example, which I guess gets updated more often. https://pkg.go.dev/google.golang.org/api/run/v2#GoogleCloudRunV2GCSVolumeSource

I included GCS in jobs in GoogleCloudPlatform/magic-modules#9746 but then someone beat me to including it in Services and I haven't merged those changes in yet.

@moredip
Copy link
Author

moredip commented Feb 27, 2024

It can be done with jobs, I guess the documentation just hasn't been updated yet. You can see it in the golang api Documentation, for example, which I guess gets updated more often. https://pkg.go.dev/google.golang.org/api/run/v2#GoogleCloudRunV2GCSVolumeSource

I included GCS in jobs in GoogleCloudPlatform/magic-modules#9746 but then someone beat me to including it in Services and I haven't merged those changes in yet.

@bskaplan is this something you're planning to take on?

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.