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

releng(kpromo): Drop --use-service-account flag #23496

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented Sep 7, 2021

In a previous commit (from #23493), the --use-service-account
flag was added for kpromo jobs, but it might not actually be
necessary (as we're already running in containers with access to
service accounts).

Let's validate this before touching the legacy code paths in CIP
(which handle auth via service account) or building/promoting a
new image containing gcloud SDK binaries.

Signed-off-by: Stephen Augustus foo@auggie.dev

/assign @ameukam @puerco @saschagrunert @cpanato
cc: @kubernetes/release-engineering


Example failures:

From https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-k8sio-file-promo/1435127641098162176:

********** START **********
level=info msg="processing destination \"gs://k8s-artifacts-prod/binaries/kops/\""
level=info msg="listing files in bucket k8s-staging-kops with prefix \"kops/releases/\""
level=info msg="listing files in bucket k8s-artifacts-prod with prefix \"binaries/kops/\""
level=info msg="getting service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\""
level=error msg="could not execute cmd gcloud auth --account=k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com print-access-token"
level=warning msg="failed to get service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\": exec: \"gcloud\": executable file not found in $PATH"
level=fatal msg="run `kpromo run files`: error building operations: error building promotion operations for \"gs://k8s-artifacts-prod/binaries/kops/\": error listing objects in \"gs://k8s-artifacts-prod/binaries/kops/\": Get \"https://storage.googleapis.com/storage/v1/b/k8s-artifacts-prod/o?alt=json&delimiter=&endOffset=&pageToken=&prefix=binaries%2Fkops%2F&prettyPrint=false&projection=full&startOffset=&versions=false\": exec: \"gcloud\": executable file not found in $PATH"

From https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/k8s.io/2663/pull-k8sio-file-promo/1435121919522246656:

********** START (DRY RUN) **********
level=info msg="processing destination \"gs://k8s-staging-cri-tools/releases/\""
level=info msg="listing files in bucket k8s-artifacts-cri-tools with prefix \"release/\""
level=info msg="listing files in bucket k8s-staging-cri-tools with prefix \"releases/\""
level=info msg="getting service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\""
level=error msg="could not execute cmd gcloud auth --account=k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com print-access-token"
level=warning msg="failed to get service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\": exec: \"gcloud\": executable file not found in $PATH"
level=fatal msg="run `kpromo run files`: error building operations: error building promotion operations for \"gs://k8s-staging-cri-tools/releases/\": error listing objects in \"gs://k8s-staging-cri-tools/releases/\": Get \"https://storage.googleapis.com/storage/v1/b/k8s-staging-cri-tools/o?alt=json&delimiter=&endOffset=&pageToken=&prefix=releases%2F&prettyPrint=false&projection=full&startOffset=&versions=false\": exec: \"gcloud\": executable file not found in $PATH"

In a previous commit (from PR 23493), the `--use-service-account`
flag was added for `kpromo` jobs, but it might not actually be
necessary (as we're already running in containers with access to
service accounts).

Let's validate this before touching the legacy code paths in CIP
(which handle auth via service account) or building/promoting a
new image containing `gcloud` SDK binaries.

Signed-off-by: Stephen Augustus <foo@auggie.dev>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 7, 2021
@k8s-ci-robot k8s-ci-robot added area/config Issues or PRs related to code in /config area/jobs area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. sig/testing Categorizes an issue or PR as relevant to SIG Testing. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 7, 2021
@ameukam
Copy link
Member

ameukam commented Sep 7, 2021

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

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

@k8s-ci-robot k8s-ci-robot merged commit 0d01918 into kubernetes:master Sep 7, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 7, 2021
@k8s-ci-robot
Copy link
Contributor

@justaugustus: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key container-image-promoter.yaml using file config/jobs/kubernetes/sig-release/cip/container-image-promoter.yaml
  • key releng-trusted.yaml using file config/jobs/kubernetes/wg-k8s-infra/trusted/releng/releng-trusted.yaml

In response to this:

In a previous commit (from #23493), the --use-service-account
flag was added for kpromo jobs, but it might not actually be
necessary (as we're already running in containers with access to
service accounts).

Let's validate this before touching the legacy code paths in CIP
(which handle auth via service account) or building/promoting a
new image containing gcloud SDK binaries.

Signed-off-by: Stephen Augustus foo@auggie.dev

/assign @ameukam @puerco @saschagrunert @cpanato
cc: @kubernetes/release-engineering


Example failures:

From https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-k8sio-file-promo/1435127641098162176:

********** START **********
level=info msg="processing destination \"gs://k8s-artifacts-prod/binaries/kops/\""
level=info msg="listing files in bucket k8s-staging-kops with prefix \"kops/releases/\""
level=info msg="listing files in bucket k8s-artifacts-prod with prefix \"binaries/kops/\""
level=info msg="getting service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\""
level=error msg="could not execute cmd gcloud auth --account=k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com print-access-token"
level=warning msg="failed to get service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\": exec: \"gcloud\": executable file not found in $PATH"
level=fatal msg="run `kpromo run files`: error building operations: error building promotion operations for \"gs://k8s-artifacts-prod/binaries/kops/\": error listing objects in \"gs://k8s-artifacts-prod/binaries/kops/\": Get \"https://storage.googleapis.com/storage/v1/b/k8s-artifacts-prod/o?alt=json&delimiter=&endOffset=&pageToken=&prefix=binaries%2Fkops%2F&prettyPrint=false&projection=full&startOffset=&versions=false\": exec: \"gcloud\": executable file not found in $PATH"

From https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/k8s.io/2663/pull-k8sio-file-promo/1435121919522246656:

********** START (DRY RUN) **********
level=info msg="processing destination \"gs://k8s-staging-cri-tools/releases/\""
level=info msg="listing files in bucket k8s-artifacts-cri-tools with prefix \"release/\""
level=info msg="listing files in bucket k8s-staging-cri-tools with prefix \"releases/\""
level=info msg="getting service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\""
level=error msg="could not execute cmd gcloud auth --account=k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com print-access-token"
level=warning msg="failed to get service-account-token for \"k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com\": exec: \"gcloud\": executable file not found in $PATH"
level=fatal msg="run `kpromo run files`: error building operations: error building promotion operations for \"gs://k8s-staging-cri-tools/releases/\": error listing objects in \"gs://k8s-staging-cri-tools/releases/\": Get \"https://storage.googleapis.com/storage/v1/b/k8s-staging-cri-tools/o?alt=json&delimiter=&endOffset=&pageToken=&prefix=releases%2F&prettyPrint=false&projection=full&startOffset=&versions=false\": exec: \"gcloud\": executable file not found in $PATH"

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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/config Issues or PRs related to code in /config area/jobs 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. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

6 participants