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

Remove ACL ownership change on release publish #3752

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions pkg/release/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,25 +371,6 @@ func (p *Publisher) PublishToGcs(

var content string
if !privateBucket {
// New Kubernetes infra buckets, like k8s-staging-kubernetes, have a
// bucket-only ACL policy set, which means attempting to set the ACL on
// an object will fail. We should skip this ACL change in those
// instances, as new buckets already default to being publicly
// readable.
//
// Ref:
// - https://cloud.google.com/storage/docs/bucket-policy-only
// - https://github.com/kubernetes/release/issues/904
if !strings.HasPrefix(markerPath, object.GcsPrefix+"k8s-") {
aclOutput, err := p.client.GSUtilOutput(
"acl", "ch", "-R", "-g", "all:R", publishFileDst,
)
if err != nil {
return fmt.Errorf("change %s permissions: %w", publishFileDst, err)
}
logrus.Infof("Making uploaded version file public: %s", aclOutput)
}

// If public, validate public link
response, err := p.client.GetURLResponse(publicLink)
if err != nil {
Expand Down