Skip to content

Commit

Permalink
tests: Adds e2e-test-auth-img project
Browse files Browse the repository at this point in the history
The gcr.io/k8s-staging-e2e-test-auth-img and gcr.io/kubernetes-e2e-test-auth-img
registries are meant to be private, to be used in a few E2E test scenarios, and it is
meant to replace the gcr.io/authenticated-image-pulling.

An auth token with read-only access will have to be generated afterwards, and then
baked into the E2E tests.
  • Loading branch information
claudiubelu committed Apr 9, 2021
1 parent 39c1025 commit f941a0e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 0 deletions.
14 changes: 14 additions & 0 deletions groups/groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,20 @@ groups:
- [email protected]
- [email protected]

- email-id: [email protected]
name: k8s-infra-staging-e2e-test-auth-img
description: |-
Group that owns pushing rights to the gcr.io/k8s-staging-e2e-test-auth-img staging registry
settings:
ReconcileMembers: "true"
members:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]

- email-id: [email protected]
name: k8s-infra-staging-e2e-test-images
description: |-
Expand Down
15 changes: 15 additions & 0 deletions infra/gcp/ensure-staging-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ readonly STAGING_PROJECTS=(
csi-secrets-store
descheduler
dns
e2e-test-auth-img
e2e-test-images
etcd
etcdadm
Expand Down Expand Up @@ -126,6 +127,10 @@ readonly STAGING_PROJECT_SERVICES=(
storage-component.googleapis.com
)

PRIVATE_PROJECTS=(
e2e-test-auth-img
)

if [ $# = 0 ]; then
# default to all staging projects
set -- "${STAGING_PROJECTS[@]}"
Expand Down Expand Up @@ -310,3 +315,13 @@ color 6 "Configuring special case for k8s-staging-releng-test"
(
ensure_staging_gcb_builder_service_account "releng-test" "k8s-infra-prow-build"
)

# Special case: Create private registries thar require authentication
color 6 "Configuring special cases for authenticated access to private registries"
for repo in "${PRIVATE_PROJECTS[@]}"; do
(
PROJECT="k8s-staging-${repo}"
local bucket=$(gcs_bucket_for_gcr "${PROJECT}")
ensure_private_gcs_bucket "${PROJECT}" "${bucket}"
) 2>&1 | indent
done
16 changes: 16 additions & 0 deletions k8s.gcr.io/images/k8s-staging-e2e-test-auth-img/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See the OWNERS docs at https://go.k8s.io/owners

approvers:
- BenTheElder
- dims
- listx
- mkumatag
- spiffxp
reviewers:
- BenTheElder
- dims
- listx
- mkumatag
- spiffxp
labels:
- sig/testing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No images yet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# google group for gcr.io/k8s-staging-e2e-test-auth-img is [email protected]
registries:
- name: gcr.io/k8s-staging-e2e-test-auth-img
src: true
- name: us.gcr.io/k8s-artifacts-prod/e2e-test-auth-img
service-account: k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com
- name: eu.gcr.io/k8s-artifacts-prod/e2e-test-auth-img
service-account: k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com
- name: asia.gcr.io/k8s-artifacts-prod/e2e-test-auth-img
service-account: k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com

0 comments on commit f941a0e

Please sign in to comment.