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

test: add e2e test setup for GCP provider #1701

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dargudear-google
Copy link
Contributor

@dargudear-google dargudear-google commented Dec 5, 2024

What type of PR is this?

/kind failing-test

What this PR does / why we need it: Runs e2e test for driver with gcp provider

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #1583

Special notes for your reviewer:
Earlier gcp tests were using hardcoded static secrets from google owned project. Now this PR uses secrets freshly created on boskos project.

TODOs:

  • squashed commits
  • includes documentation

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 5, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @dargudear-google. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. 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 Dec 5, 2024
@k8s-ci-robot
Copy link
Contributor

@dargudear-google: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-secrets-store-csi-driver-e2e-gcp

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 6, 2024
@aramase
Copy link
Member

aramase commented Dec 6, 2024

/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 Dec 6, 2024
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

2 similar comments
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@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 Dec 6, 2024
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

4 similar comments
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

1 similar comment
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

2 similar comments
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 14, 2024
@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 20, 2024
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dargudear-google
Once this PR has been reviewed and has the lgtm label, please assign aramase for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

4 similar comments
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@dargudear-google dargudear-google force-pushed the provider-gcp-test branch 3 times, most recently from a9f26b6 to ff90da3 Compare January 9, 2025 05:39
@dargudear-google dargudear-google changed the title TEST: GCP e2e test E2E test for GCP provider Jan 9, 2025
@dargudear-google dargudear-google marked this pull request as ready for review January 9, 2025 07:36
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 9, 2025
@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 9, 2025

@dargudear-google: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-secrets-store-csi-driver-image-scan a7f7ec2 link false /test pull-secrets-store-csi-driver-image-scan

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@dargudear-google
Copy link
Contributor Author

/test pull-secrets-store-csi-driver-e2e-gcp

@aramase
Copy link
Member

aramase commented Jan 9, 2025

/retitle test: add e2e test setup for GCP provider

@k8s-ci-robot k8s-ci-robot changed the title E2E test for GCP provider test: add e2e test setup for GCP provider Jan 9, 2025
Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

Few minor nits!

echo -n "secret-b" | gcloud secrets versions add ${SECRET_ID} --data-file=-

# wait for secret rotation
sleep 120
Copy link
Member

Choose a reason for hiding this comment

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

How long does it take for rotation to take effect in secret manager? Could you add a comment here?

@@ -0,0 +1,97 @@
#!/usr/bin/env bash

# Copyright 2024 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2024 The Kubernetes Authors.
# Copyright 2025 The Kubernetes Authors.

main() {
echo "starting the secret store csi driver test for gcp provider"

#install boskosctl
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#install boskosctl
# install boskosctl

echo "testing boskosctl"
boskosctl --help

# Aquire a project from boskos pool, test will use secret created on this aquired project
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Aquire a project from boskos pool, test will use secret created on this aquired project
# Acquire a project from boskos pool, test will use secret created on this acquired project

Comment on lines +56 to +59
RESOURCE_NAME=$(echo "$BOSKOS_RESOURCE" | jq -r ".name")
export RESOURCE_NAME
GCP_PROJECT=$(echo "$BOSKOS_RESOURCE" | jq -r ".name")
export GCP_PROJECT
Copy link
Member

Choose a reason for hiding this comment

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

The RESOURCE_NAME and GCP_PROJECT are the same. Could we just use a single var instead or does this need to be 2 different ones for clarity?

echo "Using project ${GCP_PROJECT}"
gcloud config set project "${GCP_PROJECT}"

# create a secret in the aquired project
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# create a secret in the aquired project
# create a secret in the acquired project

--role=roles/secretmanager.secretAccessor \
--member=principalSet://iam.googleapis.com/projects/773781448124/locations/global/workloadIdentityPools/k8s-infra-prow-build.svc.id.goog/namespace/test-pods

# wait for permissions to propogate
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# wait for permissions to propogate
# wait for permissions to propagate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate remaining CI jobs to community infra by ~August 1st
3 participants