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

Requesting to Enable CORS on gcsweb.k8s.io for easy access via AJAX calls to bucket objects #1810

Open
ashnehete opened this issue Mar 19, 2021 · 11 comments
Assignees
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.

Comments

@ashnehete
Copy link

On relnotes.k8s.io we want to fetch the release notes for each release directly from the bucket using a AJAX call. Relevant issue: kubernetes/release#1087

While trying to fetch the object using a gcsweb.k8s.io link (eg. https://gcsweb.k8s.io/gcs/kubernetes-release/release/release-notes-index.json) we ran into a CORS error. It seems that CORS isn't enabled on the GCS bucket.

Will it be possible to enable CORS on the bucket?

/cc @saschagrunert

@saschagrunert
Copy link
Member

@spiffxp @dims @justaugustus do you think that we could set the CORS config for the kubernetes-release bucket?

Like:

[
  {
    "AllowedHeaders": ["*"],
    "AllowedMethods": ["GET"],
    "AllowedOrigins": ["https://relnotes.k8s.io/"]
  }
]

@dims
Copy link
Member

dims commented Mar 22, 2021

@saschagrunert Is this script-able?

@saschagrunert
Copy link
Member

saschagrunert commented Mar 22, 2021

@saschagrunert Is this script-able?

Yes, gsutil has a cors subcommand:

> gsutil cors set JSON_FILE_NAME.json gs://BUCKET_NAME

@ashnehete
Copy link
Author

I just had a thought, do we want to restrict AllowedOrigins to only https://relnotes.k8s.io/ or open it up for everyone (*)? This will make the testing easier on localhost as well as open up avenues for other tools to use the objects in the bucket programmatically. Only downside I see is the security implication.

@spiffxp
Copy link
Member

spiffxp commented Mar 22, 2021

/assign @listx
gs://kubernetes-release lives in a project I do not have rights to edit or modify in any way (ref: #1571), so it's not clear to me whether we can accommodate this request

It could be that fully migrating to gs://k8s-release is a blocker to this (the first step / proof-of-concept for doing so being #1569)

@listx
Copy link
Contributor

listx commented Mar 23, 2021

The gs://kubernetes-release lives in the google-containers GCP project, and I also do not have rights to modify it. Fully migrating to k8s-release seems to be the right thing.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2021
@spiffxp
Copy link
Member

spiffxp commented Jul 9, 2021

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 9, 2021
@spiffxp
Copy link
Member

spiffxp commented Jul 9, 2021

/milestone v1.23
This is going to have to wait until we can move the project to gs://k8s-release

@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Jul 9, 2021
@spiffxp
Copy link
Member

spiffxp commented Sep 2, 2021

/priority backlog

@k8s-ci-robot k8s-ci-robot added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Sep 2, 2021
@k8s-ci-robot k8s-ci-robot added sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. and removed wg/k8s-infra labels Sep 29, 2021
@ameukam
Copy link
Member

ameukam commented Dec 6, 2021

/milestone clear
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Dec 6, 2021
@k8s-ci-robot k8s-ci-robot removed this from the v1.23 milestone Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra.
Projects
Status: No status
sig-k8s-infra
  
Needs Triage
Development

No branches or pull requests

8 participants