-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
✨ (go/v4): Added DevContainer support for seamless development in environments like GitHub Workspaces without local setup. #4078
Conversation
|
Welcome @TAM360! |
Hi @TAM360. 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 Once the patch is verified, the new status will be reflected by the 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. |
/ok-to-test |
/ok-to-test |
pkg/plugins/golang/v4/scaffolds/internal/templates/devcontainer.go
Outdated
Show resolved
Hide resolved
testdata/project-v4-with-deploy-image/.devcontainer/devcontainer.json
Outdated
Show resolved
Hide resolved
HI @kannon92, @awfuel, @FabianKramm I think you all were interest in this one and it seems great for me. |
I see |
@caozhuozi It looks like the JetBrain's support for DevContainers is still in Beta phase. Maybe we can add them later, once it gets stable? @camilamacedo86 any second thoughts? |
Hi @caozhuozi, @TAM360
I personally use JetBrains IDEs, but I recognize that a significant portion of users rely on VS Code since it's free and widely adopted. My preference would be to keep the setup vendor-agnostic for this reason. (each person has her/his own preferences and we never will make everybody happy). We also try to avoid dependencies with third-party as much as possible. That said, it's straightforward for anyone to customize the setup according to their preference after the scaffold is created. So, I suggest we stick with VS Code as the default (given its common, free adoption) while allowing users the flexibility to modify their scaffold to suit their needs. A second option would not have any IDE at all. |
/hold We might need an small ajusts |
chmod +x kubectl | ||
mv kubectl /usr/local/bin/kubectl | ||
|
||
docker network create -d=bridge --subnet=172.19.0.0/24 kind |
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.
Just for we have tracked at least here in a comment why it is required:
kubernetes-sigs/kind#2488 (comment)
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.
/hold cancel
I think all missing nits are addressed now !!
Great work
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.
Hi @TAM360, thanks for your contribution! This is amazing!
Looks good from my end! Just a small question - I personally don't use vscode anymore, but do we also need envtest binaries along with others to be able to test KB projects. We do have a makefile target that helps install this, but would it make it easier to have them in the container itself? (we can have this in follow up too if required)
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, TAM360, varshaprasad96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Issue Link
3432
Description
This PR add the functionality of generating DevContainer configuration files along with rest of the Kubebuilder project during scaffolding.
Motivation
DevContainer is an Open Source tool which allows users consolidate their development environment into single container image. This image then can be shared across any environment by anyone. DevContainers can then be launched using any IDE including VSCode. Github's CodeSpaces uses the same tech underline.
In the context of Kubebuilder, having a DevContainer with Kind, Go, and Kubebuilder will allow any user to readily test their Operator's changes without installing any of the tools explicitly, thereby saving the time.