Skip to content

support fetching containerd from non public GCS buckets#7771

Merged
estesp merged 2 commits intocontainerd:mainfrom
akhilerm:fetch-from-private-buckets
Dec 12, 2022
Merged

support fetching containerd from non public GCS buckets#7771
estesp merged 2 commits intocontainerd:mainfrom
akhilerm:fetch-from-private-buckets

Conversation

@akhilerm
Copy link
Copy Markdown
Member

@akhilerm akhilerm commented Dec 7, 2022

  • add support to fetch and download containerd tarball from GCS buckets that require authentication.

GCS_BUCKET_TOKEN should have read access to the bucket from which artifacts are to be fetched. The token is expected to be present in the instance metadata of the VM, similar to other node environment variables

Signed-off-by: Akhil Mohan [email protected]

To use this in tests from kubernetes, a new node env can be added as follows here. <your_gcs_bucket_token> can be fetched from a secret or from an env.

-node-env=GCS_BUCKET_TOKEN=<your_gcs_bucket_token>

- add support to fetch and download containerd tarball from GCS buckets
that require authentication.

GCS_BUCKET_TOKEN should have read access to the bucket from which
artifacts are to be fetched. The token is expected to be present in
the instance metadata of the VM, similar to other node environment
variables

Signed-off-by: Akhil Mohan <[email protected]>
@k8s-ci-robot
Copy link
Copy Markdown

Hi @akhilerm. Thanks for your PR.

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

@akhilerm
Copy link
Copy Markdown
Member Author

akhilerm commented Dec 7, 2022

/cc @estesp @samuelkarp

Comment thread contrib/gce/configure.sh
source "${CONTAINERD_HOME}/${CONTAINERD_ENV_METADATA}"
fi

# GCS_BUCKET_TOKEN_METADATA is the metadata key for the GCS bucket token
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it okay to keep set -o xtrace on the top of this file? I'm fine removing that to be honest.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I dont want to remove tracing from the file, as it greatly helps with debugging the tests. Will figure out a way so that the token is not directly printed into the logs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@kzys Have updated the changes so that tracing is disabled when dealing with tokens

@samuelkarp samuelkarp added area/cri Container Runtime Interface (CRI) kind/test labels Dec 7, 2022
@akhilerm
Copy link
Copy Markdown
Member Author

/cc @kzys

@k8s-ci-robot k8s-ci-robot requested a review from kzys December 12, 2022 13:52
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cri Container Runtime Interface (CRI) kind/test needs-ok-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants