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

Grant GCR write privileges to prow-build Service Account #1393

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Grant GCR write privileges to prow-build Service Account #1393

merged 1 commit into from
Nov 5, 2020

Conversation

ameukam
Copy link
Member

@ameukam ameukam commented Nov 3, 2020

Grant prow-build Service Account privileges to write to GCR registries
for the staging projects.

Signed-off-by: Arnaud Meukam ameukam@gmail.com

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. wg/k8s-infra labels Nov 3, 2020
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 3, 2020
@ameukam
Copy link
Member Author

ameukam commented Nov 3, 2020

Potential Fix for build failure of ci-kubernetes-build-canary : kubernetes/kubernetes#95936.

/assign @spiffxp

Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ameukam -- An idea about special-casing this.

infra/gcp/ensure-staging-storage.sh Outdated Show resolved Hide resolved
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold
So thank you for submitting this, but I'm trying to figure out if this is really how we want to proceed vs. other alternatives

The k8s-infra-prow-build cluster runs untrusted jobs (PRs), and this would allow any of those to write to gcr.io/k8s-staging-ci-images.

At the same time, we have all these @kubernetes.io groups that try to restrict who can write to these repos. I'm not sure we want to completely bypass that security mechanism.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 4, 2020
@spiffxp
Copy link
Member

spiffxp commented Nov 4, 2020

Looks like I reviewed a stale version of this PR.

Two thoughts:

  • I think it would be clearer if we added the service account to
    - email-id: k8s-infra-staging-ci-images@kubernetes.io
  • I think a more sustainable solution would be to setup service accounts for staging repos, and enforce which jobs are allowed to use which service accounts (I won't block this PR for that, if we're willing to allow any job to write to k8s-staging-ci-images temporarily)

@justaugustus
Copy link
Member

if we're willing to allow any job to write to k8s-staging-ci-images temporarily

I'm fine with this in the interim.
AFAIK, there's nothing preventing any CI job from writing to gcr.io/kubernetes-ci-images today.

Grant prow-build Service Account privileges to write to GCR registries
for the staging projects.

Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
@k8s-ci-robot k8s-ci-robot added area/access Define who has access to what via IAM bindings, role bindings, policy, etc. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. labels Nov 4, 2020
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 5, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ameukam, spiffxp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spiffxp
Copy link
Member

spiffxp commented Nov 6, 2020

For reasons I no longer have the visibility to troubleshoot, it appears as though service account membership in a group isn't being picked up.

https://gsuiteupdates.googleblog.com/2020/08/service-accounts-in-google-groups-beta.html leads me to believe it should be, but our gsuite may not be in beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/access Define who has access to what via IAM bindings, role bindings, policy, etc. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants