Skip to content

Commit

Permalink
Merge pull request #3752 from saschagrunert/acl
Browse files Browse the repository at this point in the history
Remove ACL ownership change on release publish
  • Loading branch information
k8s-ci-robot committed Sep 11, 2024
2 parents e75995d + 908e806 commit c868eaf
Showing 1 changed file with 0 additions and 19 deletions.
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

0 comments on commit c868eaf

Please sign in to comment.