Skip to content

image-builder/capg: add more permissions to the service account#2061

Merged
k8s-ci-robot merged 1 commit intokubernetes:mainfrom
cpanato:update-permission
Jun 2, 2021
Merged

image-builder/capg: add more permissions to the service account#2061
k8s-ci-robot merged 1 commit intokubernetes:mainfrom
cpanato:update-permission

Conversation

@cpanato
Copy link
Copy Markdown
Member

@cpanato cpanato commented May 19, 2021

after we merge: #2057 and #2025

the periodic job ran https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/periodic-image-builder-gcp-all-nightly/1394944554532081664 but we got an error

Error creating instance: googleapi: Error 403: Required 'compute.zones.get' permission for 'projects/k8s-staging-cluster-api-gcp/zones/us-central1-a', forbidden

So looks like we need to give a bit more permissions to the svcacc in order to work.
doing a search saw the role/editor have the necessary permissions. However, I don't know if this the correct way to enable it.

/assign @spiffxp @ameukam

@k8s-ci-robot k8s-ci-robot added wg/k8s-infra cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 19, 2021
@k8s-ci-robot k8s-ci-robot requested review from dims and thockin May 19, 2021 09:42
@cpanato cpanato force-pushed the update-permission branch from c5e483f to e0ecd80 Compare May 19, 2021 09:51
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 20, 2021
@cpanato cpanato force-pushed the update-permission branch from e0ecd80 to 0ad72c3 Compare May 21, 2021 07:16
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 21, 2021
@ameukam
Copy link
Copy Markdown
Member

ameukam commented Jun 2, 2021

/lgtm
/approve

Let's try with this set of permissions.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 2, 2021
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2021
@k8s-ci-robot k8s-ci-robot merged commit 1776b5d into kubernetes:main Jun 2, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jun 2, 2021
@ameukam
Copy link
Copy Markdown
Member

ameukam commented Jun 2, 2021

Running : ./infra/gcp/ensure-staging-storage.sh

@cpanato cpanato deleted the update-permission branch June 2, 2021 11:40
@cpanato
Copy link
Copy Markdown
Member Author

cpanato commented Jun 2, 2021

@ameukam let me know when is ready and I will try to trigger the job

@ameukam
Copy link
Copy Markdown
Member

ameukam commented Jun 2, 2021

Vaccine shot forced me to stay away from computers today. I got:

Ensuring GKE clusters in 'k8s-infra-prow-build-trusted' can run pods in 'test-pods' as 'gcb-builder-cluster-api-gcp@k8s-staging-cluster-api-gcp.iam.gserviceaccount.com' 
./lib_iam.sh: line 228: local: serviceaccount: readonly variable

I'm looking into it.

ameukam added a commit to ameukam/k8s.io that referenced this pull request Jun 2, 2021
Followup of kubernetes#2061.
`ensure_staging_gcb_builder_service_account` invokes
`ensure_serviceaccount_role_binding` lib_iam.sh function but can't be
used with readonly variables.

Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
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. 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. 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