Skip to content

Commit

Permalink
Remove ACL ownership change on release publish
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Sep 11, 2024
1 parent e75995d commit 908e806
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 908e806

Please sign in to comment.