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
Support Dev Containers / Github Codespaces #124584
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
.devcontainer/devcontainer.json
Outdated
|
||
// Add etcd path to PATH | ||
"remoteEnv": { | ||
"PATH": "${containerEnv:PATH}:${containerEnv:GOPATH}/src/k8s.io/kubernetes/third_party/etcd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm -f /etc/apt/sources.list.d/google-cloud-sdk.list | ||
|
||
# Install PyYAML | ||
pip3 install pyyaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bells17 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 |
# Never push to upstream master | ||
git remote set-url --push upstream no_push | ||
|
||
# Install gcloud command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
364df68
to
905bc10
Compare
mkdir -p /usr/local/etc/vscode-dev-containers | ||
cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt | ||
|
||
# Ensure that the upstream remote is set, and configure it if it's not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
# Install kind & kubetest2 for e2e testing | ||
go install sigs.k8s.io/kind@latest | ||
go install sigs.k8s.io/kubetest2/...@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Features to add to the dev container. More info: https://containers.dev/features | ||
"features": { | ||
// The first-run-notice.txt is displayed by a script within |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1). | ||
|
||
🤖 Run e2e test command example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not familiar with the best command to easily run e2e tests in a local environment, so I would appreciate any guidance.
(I believe it is preferable to use a deployer like kind
that allows anyone to easily run it locally.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/retest |
I'll add individuals who appear to be related to the original PR as reviewers: |
68f0c9a
to
2fda795
Compare
Based on:
https://kubernetes.slack.com/archives/C1TU9EB9S/p1714223550391479?thread_ts=1713701062.612009&cid=C1TU9EB9S
What type of PR is this?
/kind feature
/sig architecture
/sig contributor-experience
What this PR does / why we need it:
This PR adds configuration files for running dev containers.
Currently, I am developing on Mac OS X, but sometimes I encounter errors like the one mentioned below:
#124156
By enabling the use of dev containers in the k/k repository, I can reduce the discrepancies in the development environment caused by differences in operating systems, and decrease the occurrence of errors like the one mentioned above.
Which issue(s) this PR fixes:
Fixes #113019
Special notes for your reviewer:
To ensure that all tools mentioned in the Development Guide are installed, I use the dev container feature and
setup.sh
to install any tools that are not already included in the kube-cross Dockerfile.The following commands have been confirmed to work successfully in VSCode Dev Containers / Github Codespaces:
make
make verify
make update
make test
make test-integration
Running e2e tests with kubetest2:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
cc @craiglpeters