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 Custom Staging Bucket Option #9281

Open
shikanime opened this issue Jan 29, 2024 · 0 comments
Open

Add Custom Staging Bucket Option #9281

shikanime opened this issue Jan 29, 2024 · 0 comments

Comments

@shikanime
Copy link

Expected behavior

Users should be able to specify a custom staging bucket for Skaffold builds, such as a bucket with a specific region constraint or naming convention.

Actual behavior

Skaffold will create a new staging bucket if it does not exist, but there is no option to specify a custom bucket.

cbBucket := fmt.Sprintf("%s%s", projectID, constants.GCSBucketSuffix)
buildObject := fmt.Sprintf("source/%s-%s.tar.gz", projectID, uuid.New().String())
if err := b.createBucketIfNotExists(ctx, c, projectID, cbBucket); err != nil {
return "", sErrors.NewErrorWithStatusCode(&proto.ActionableErr{
ErrCode: proto.StatusCode_BUILD_GCB_CREATE_BUCKET_ERR,
Message: fmt.Sprintf("creating bucket if not exists: %s", err),
})
}
if err := b.checkBucketProjectCorrect(ctx, c, projectID, cbBucket); err != nil {
return "", sErrors.NewErrorWithStatusCode(&proto.ActionableErr{
ErrCode: proto.StatusCode_BUILD_GCB_GET_GCS_BUCKET_ERR,
Message: fmt.Sprintf("checking bucket is in correct project: %s", err),
})
}

I am open to contributing if the issue is relevant and I am not missing something that might solve my problem.

Information

  • Skaffold version: v2.10.0
  • Operating system: Ubuntu 22.04.3 LTS
  • Installed via: Nixpkgs
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta6
kind: Config
metadata:
  name: foo
build:
  artifacts:
    - image: europe-docker.pkg.dev/foo/app
      kaniko: {}
  googleCloudBuild:
    projectId: foo
    region: europe-west9
creating bucket if not exists: googleapi: Error 412: 'us' violates constraint 'constraints/gcp.resourceLocations', conditionNotMet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant