-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Add a VS Code devcontainer configuration #788
Conversation
This comment has been minimized.
This comment has been minimized.
I think this is great. Thanks a lot for contributing this. |
left some comments + suggestions + questions after having tested out the basics + the extensions. definitely merging this as it's pretty easy to maintain and an easy win. some overall questions: i guess the way you intend to use this is by creating a new i would have assumed the builtin tasks would be useful for less terminal use, but not even sure they forward into the devcontainer (or if they can be configured at this level) - there's another comment on that. |
My workflow is generally to use a terminal to run compilations, etc (because RLS/compiling is painfully slow in Linkerd); but I should give tasks a shot in kube-rs. I'll take a look at configuring them. Re: lldb, I didn't actually try it. I can remove that plugin for now. I think it was a recommended plugin for rust projects and I cargo-culted it here. |
When loading `kube-rs` in VS Code, a variety of configurations are needed to end up with a working environment. It does't Just Work out of the box. VS Code [devcontainers][dc] make it easy to bootstrap a development environment with project-specific tooling and configuration. This configuration should also be usable in [GitHub Codespaces][ghcs]. This configuration ensures that various tools are available including: * `cargo-deny` * `cargo-tarpaulin` * `k3d` * `kubectl` * rust stable-1.58 toolchain * rust nightly toolchain * a variety of related VS Code plugins While this developer image is based on rust 1.56 (the documented MSRV for the project), it updates the default toolchain to be _nightly_ so clippy and rustfmt work as expected (since `kube-rs` depends on nightly versions of these tools). [dc]: https://code.visualstudio.com/docs/remote/containers [ghcs]: https://github.com/features/codespaces Signed-off-by: Oliver Gould <ver@buoyant.io>
Co-authored-by: Eirik A <sszynrae@gmail.com> Signed-off-by: Oliver Gould <ver@buoyant.io>
removing instructions on default features since they are all turned off by default. Signed-off-by: clux <sszynrae@gmail.com> Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: clux <sszynrae@gmail.com> Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
…ckerfile Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
Ensures that the devcontainer builds when the configuration changes. Signed-off-by: Oliver Gould <ver@buoyant.io>
2f29e64
to
8d8fa42
Compare
Signed-off-by: Oliver Gould <ver@buoyant.io>
9e91aa9
to
f48b8f5
Compare
Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
Signed-off-by: Oliver Gould <ver@buoyant.io>
I don't have any further comments on this. Are you happy with it as is? |
Signed-off-by: Oliver Gould <ver@buoyant.io>
@clux I noticed a small issue with the dev container workflow, but fine to merge once the build is green :) Thanks! |
Motivation
When loading
kube-rs
in VS Code, a variety of configurations areneeded to end up with a working environment. It does't Just Work out of
the box.
Solution
VS Code devcontainers make it easy to bootstrap a development
environment with project-specific tooling and configuration. This
configuration should also be usable in GitHub Codespaces.
This configuration ensures that various tools are available including:
cargo-deny
cargo-tarpaulin
k3d
kubectl
While this developer image is based on rust 1.56 (the documented MSRV
for the project), it updates the default toolchain to be nightly so
clippy and rustfmt work as expected (since
kube-rs
depends on nightlyversions of these tools).
On one hand, I'd rather not commit configuration for any single editor into the repo. On the other hand, having a working development environment in VS Code should dramatically reduce the setup time for new contributors. We've recently adopted devcontainers in Linkerd (1 2), so I thought I'd share a modified version for
kube-rs
. At the very least, this would help me; but I won't be offended if this isn't accepted here.Note that I've tried to omit anything touching developer-specific personalization (choice of shell, etc), leaving that to be configured in a
dotfiles
repo (eg) and in user-specific vscode configuration.