Skip to content
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

✨ Initial devcontainer support #5271

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

faermanj
Copy link

@faermanj faermanj commented Jan 8, 2025

/kind support

Adding .devcontainer with clusterctl, kind and other dependencies.

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/support Categorizes issue or PR as a support question. labels Jan 8, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign richardcase for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 8, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @faermanj. 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 /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.

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.

@richardcase
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 13, 2025
@faermanj faermanj changed the title initial devcontainer support ✨ Initial devcontainer support Jan 13, 2025
@richardcase
Copy link
Member

Thanks for this @faermanj . Can we simplify this by using an existing base image and features?

For example:

{
	"name": "CPAA",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/go:1-1.22-bookworm",
	// Features to add to the dev container. More info: https://containers.dev/features.
	"features": {
		"ghcr.io/devcontainers/features/docker-in-docker:2": {},
		"ghcr.io/devcontainers-contrib/features/kind:1": {},
		"ghcr.io/rio/features/k9s:1": {},
		"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
			"version": "latest",
			"helm": "latest",
			"minikube": "none"
		}
	},
	// Configure tool-specific properties.
	"customizations": {
		"vscode": {
			"extensions": [
				"ms-kubernetes-tools.vscode-kubernetes-tools",
				"ms-azuretools.vscode-dockerr",
				"golang.go"
			]
.....

Whats the benefit to using a container file? We could also use devbox within the devcontainer.

@faermanj faermanj changed the title ✨ Initial devcontainer support ✨ WIP: Initial devcontainer support Jan 14, 2025
@faermanj
Copy link
Author

@richardcase Sure, i'll try the devbox devcontainer then, if kind works in that it should be fine.

@faermanj faermanj marked this pull request as draft January 14, 2025 16:39
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 14, 2025
@faermanj
Copy link
Author

  • Changed to kind feature instead of dockerfile scripts
  • Changed to go latest base image
  • Integrated devbox

@faermanj faermanj marked this pull request as ready for review January 14, 2025 20:25
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2025
@k8s-ci-robot k8s-ci-robot requested a review from faiq January 14, 2025 20:25
@faermanj faermanj changed the title ✨ WIP: Initial devcontainer support ✨ Initial devcontainer support Jan 14, 2025
@richardcase
Copy link
Member

@faermanj - thanks for considering the change. I think this is simpler, plus people can then use devbox locally if they want.

Have you seen the devbox generate devcontainer command by the way? It would reduce the need for the devbox feature and postCreateCommand i think.

@faermanj
Copy link
Author

@faermanj - thanks for considering the change. I think this is simpler, plus people can then use devbox locally if they want.

Have you seen the devbox generate devcontainer command by the way? It would reduce the need for the devbox feature and postCreateCommand i think.

I did, and started from that. However, kind failed to create the cluster so I added the features and it worked \o/

@k8s-ci-robot
Copy link
Contributor

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/contains-merge-commits kind/support Categorizes issue or PR as a support question. needs-priority ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants