Skip to content

Setting Service Account on Kubernetes Deployment #766

@apjoseph

Description

@apjoseph

docker buildx create appears to have no driver specific option or mechanism for the Kubernetes driver to specify the service account the deployment should use. As far as I can tell there is no way to set this other than to manually modify the deployment itself after it as been created by applying a patch like this:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: example-buildkit0
  name: example-buildkit0
spec:
  selector:
    matchLabels:
      app: example-buildkit0
  template:
    spec:
      serviceAccountName: buildx-builder
      containers:
        - name: buildkitd
          image: moby/buildkit:buildx-stable-1

It would be highly beneficial to allow the ability to set serviceAccounts on creation as these are often needed to access external resources such as a storage bucket using WorkloadIdentity. This is a fairly fundamental need for builds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions