Skip to content

infra/gcp: enable GCS access logs for staging project GCS and GCR#2231

Merged
k8s-ci-robot merged 3 commits intokubernetes:mainfrom
ii:ensure_staging_pii
Jul 1, 2021
Merged

infra/gcp: enable GCS access logs for staging project GCS and GCR#2231
k8s-ci-robot merged 3 commits intokubernetes:mainfrom
ii:ensure_staging_pii

Conversation

@bernokl
Copy link
Copy Markdown
Contributor

@bernokl bernokl commented Jun 16, 2021

Addresses:
#904 (comment)
Intent:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 16, 2021
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @bernokl. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 16, 2021
@k8s-ci-robot k8s-ci-robot requested review from spiffxp and thockin June 16, 2021 03:09
@k8s-ci-robot k8s-ci-robot added wg/k8s-infra size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 16, 2021
Copy link
Copy Markdown
Contributor

@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.

Thanks for starting on this! I added suggestions on how to implement

Copy link
Copy Markdown
Contributor

@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.

Getting there, more suggestions

@spiffxp spiffxp changed the title GCS Logs for staging #904 infra/gcp: enable GCS access logs for staging project GCS and GCR Jun 17, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 17, 2021
@spiffxp
Copy link
Copy Markdown
Contributor

spiffxp commented Jun 29, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 29, 2021
Copy link
Copy Markdown
Contributor

@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.

This should hopefully be the last round

Comment on lines +60 to +66
# $1: The GCS bucket
function ensure_gcs_bucket_logging() {
if [ $# != 2 ] || [ -z "$1" ]; then
echo "ensure_gcs_bucket_logging(name) requires 1 argument" >&2
return 1
fi
local bucket="$1"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For parity with other functions in this library, give an example, and stick with bucket vs. bucket name

Suggested change
# $1: The GCS bucket
function ensure_gcs_bucket_logging() {
if [ $# != 2 ] || [ -z "$1" ]; then
echo "ensure_gcs_bucket_logging(name) requires 1 argument" >&2
return 1
fi
local bucket="$1"
# $1: The GCS bucket (e.g. gs://k8s-infra-foo)
function ensure_gcs_bucket_logging() {
if [ $# != 2 ] || [ -z "$1" ]; then
echo "ensure_gcs_bucket_logging(bucket) requires 1 argument" >&2
return 1
fi
local bucket="$1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

whoops, one more... it should be [ $# != 1 ]

@bernokl bernokl force-pushed the ensure_staging_pii branch from 35cccf5 to b8f1991 Compare June 30, 2021 07:44
Copy link
Copy Markdown
Contributor

@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.

Please address shellcheck failures that are causing the verify job to fail

@spiffxp
Copy link
Copy Markdown
Contributor

spiffxp commented Jun 30, 2021

Since we're getting close, I would also prefer to see this rebased to get rid of the fixup commits, and into commits relevant to the appropriate files

  • infra/gcp/lib: add gcs logs bucket
  • infra/gcp/lib_gcs: add ensure_gcs_bucket_logging
  • infra/gcp/staging: enable gcs logs for staging buckets

@bernokl bernokl force-pushed the ensure_staging_pii branch from b8f1991 to ad7b145 Compare June 30, 2021 22:43
Copy link
Copy Markdown
Contributor

@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

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Jul 1, 2021
@k8s-ci-robot k8s-ci-robot merged commit 39ac2c4 into kubernetes:main Jul 1, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Jul 1, 2021
@spiffxp
Copy link
Copy Markdown
Contributor

spiffxp commented Jul 1, 2021

Running into a few issues while trying to deploy these changes, opened #2283 with the necessary fixes to deploy

@spiffxp
Copy link
Copy Markdown
Contributor

spiffxp commented Jul 1, 2021

Running ./infra/gcp/ensure-staging-storage.sh to deploy changes for all staging projects

@spiffxp
Copy link
Copy Markdown
Contributor

spiffxp commented Jul 1, 2021

Finished deploying

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants