Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-21738

Ability to mount custom volumes into a build container

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      We are running self hosted pipelines runner in GKE cluster. We need to pull/push docker images from/to "gcr.io" in a pipeline.

      In GKE cluster, we use Kubernetes Service Account + GKE workload identity to allow an application (Kubernetes POD) to be able to access GCP services/resources, including logging in to gcr.io. This is a regular and recommended way to authorise applications to access services/resources in GCP (and AWS/Azure) cloud environment, and it's safer than using a static service account key file or credentials.

      With Kubernetes Service Account + GKE Workload Identity, we can login to “gcr.io” in the bitbucket-pipelines-runner and docker:dind containers of a POD. But a build container which is started by bitbucket-pipelines-runner runs as docker in docker. The build container couldn’t access the mounted service account token in bitbucket-pipelines-runner container (i.e. “/var/run/secrets/kubernetes.io/serviceaccount”). As the result, we won’t be able to login to gcr.io within the build container and “docker build/pull/push” in a pipeline fails.

      If we could have an ability to mount “/var/run/secrets/kubernetes.io/serviceaccount” into the build container, the issue would be solved.

      With this ability, we may also pass some environment related variables into the build container by mounting file(s) without defining them in Bitbucket Cloud workspace/repository variables separately. 

      This feature request is to provide flexibility, and will take pipelines runner closer to a native Kubernetes runner.

      Attachments

        Activity

          People

            Unassigned Unassigned
            0a313967c426 Aaron.Luo
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated: