GoogleContainerTools / GoogleContainerTools/skaffold
Args configuration for googleCloudBuild dockerImage builder
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Expected behavior
The `skaffold.yaml` configuration for the `googleCloudBuild` remote builder, supports configuring extended builder image parameters/arguments to be passed into the builder image. ie, config that passes through to `steps[].args` in `cloudbuild.yaml`.
This would allow more builder images to operate for remote builds with Google Cloud Build.
An example of a GCB builder that requires step arguments is the [gke-windows-builder for multi-architecture images](https://cloud.google.com/kubernetes-engine/docs/tutorials/building-windows-multi-arch-images)
### Actual behavior
There is no configuration option to define builder arguments/parameters within skaffold.yaml for `googleCloudBuild` remote building.
(Contrast with the `docker` `buildArgs` configuration that is possible in `skaffold.yaml`)
### Information
- Skaffold version: `v1.38.0`
- Operating system: `Debian 12 (rodete) amd64`
- Installed via: `skaffold.dev`
- Contents of skaffold.yaml:
```yaml
apiVersion: skaffold/v2beta28
kind: Config
metadata:
name: test-win-go-http
build:
googleCloudBuild:
projectId: ticketingdevops-332715
timeout: 3600
logging: GCS_ONLY
dockerImage: 'us-docker.pkg.dev/gke-windows-tools/docker-repo/gke-windows-builder:latest'
concurrency: 1
artifacts:
[...]
```
- Contents of cloudbuild.yaml I am trying to induce:
```
logsBucket: 'gs://ticketingdevops-332715-tf-demo-b1'
options:
logging: GCS_ONLY
timeout: 3600s
steps:
- name: 'us-docker.pkg.dev/gke-windows-tools/docker-repo/gke-windows-builder:latest'
args:
- '--project'
- 'ticketingdevops-332715'
- '--network'
- 'ticketing-vpc'
- '--subnetwork'
- 'ticketing-vpc'
- --serviceAccount
- 'cloud-builder-tf-iam-tf-cb@ticketingdevops-332715.iam.gserviceaccount.com'
- --container-image-name
- 'us-central1-docker.pkg.dev/ticketingdevops-332715/devops-iac/windows-hello:tag1'
# Specify specific variants of images to be built. Or, remove the following 2 lines to default to all available variants.
- --versions
- '20H2,ltsc2019'
```
### Steps to reproduce the behavior
Feature gap.
Contributor guide
Assessment
This issue has not been assessed yet.