-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dev-container): ✨ Devcontainer configuration file
Add Go templates for scaffolding DevContainer related configuration files in a new Kubebuilder project. refactor(dev-container): Add separate post-create.sh script. refactor(dev-container): Use separate shell post create shell script in the container. fix(dev-container): Remove redudant /bin/bash field. :seedling: Bump github.com/onsi/ginkgo/v2 from 2.19.0 to 2.19.1 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.19.0 to 2.19.1. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.19.0...v2.19.1) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> :seedling: Bump github.com/onsi/gomega from 1.33.1 to 1.34.1 Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.33.1 to 1.34.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](onsi/gomega@v1.33.1...v1.34.1) --- updated-dependencies: - dependency-name: github.com/onsi/gomega dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> fix: typo in designs template Signed-off-by: Gabriele Quaresima <[email protected]> refactor(.devcontainer/Dockerfile): Use Go to install Kind binary. fix(.devcontainer): 🐛 Paas host network & update post-install script path. Use Host network to connect with the Host OS's Docker network. Also, execute the post-install.sh script from .devcontainer sub-directory, not the root. refactor(.devcontainer): Change go's version to 1.22.0. refactor(.devcontainer/Dockefile): Download Kubebuilder binary directly. refactor(.devcontainer/post-install.sh) Remove Makefile command. refactor(.devcontainer): Add check for verifying the existing Kind cluster. refactor(.devcontainer): Remove debug flag from post-install.sh fix(.devcontainer): Change interpreter from sh to bash in post-install.sh. refactor(templates): Add template for generating .devcontainer settings.⚠️ (cleanup/fix): ImplementWebhooks method should only be used by the e2e tests and should be under its package (#4065) (cleanup/fix): ImplementWebhooks method should only be used by the e2e tests and should be under its package (cleanup): cleanup tests for plugin/util functions pkg/plugin/utils: add tests to cover funcs 🐛 (go/v4): add missing cancel context to controller's suite-test (#4067) fix: add missing cancel context to controller's suite-test Upgrade the muilt-version sample to the latest :seedling: Bump github.com/onsi/ginkgo/v2 from 2.19.1 to 2.20.0 Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.19.1 to 2.20.0. - [Release notes](https://github.com/onsi/ginkgo/releases) - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md) - [Commits](onsi/ginkgo@v2.19.1...v2.20.0) --- updated-dependencies: - dependency-name: github.com/onsi/ginkgo/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> 📖 docs:samples:cronjob: change makefile to generate the CRD without description to allow apply CRDs (#4075) docs:samples:cronjob: fix makefile to generate the CRD with less description 🌱 Cleanup hack generate docs by removing code duplication (#4076) (cleanup) hack docs fix(devcontainer.go): Resolve golangci-lint related issues. fix(devcontainer.go): Use bash command instead of '.' due to permission issuses. chore: Remove testDev Container files. docs(devcontainer): Generate documentation.
- Loading branch information
1 parent
eb97367
commit 5e4a7e0
Showing
92 changed files
with
1,483 additions
and
5,233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Build the manager binary | ||
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): | ||
# 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster | ||
ARG TAG=1.22 | ||
FROM golang:${TAG} | ||
|
||
COPY post-install.sh . | ||
|
||
# Install dependencies | ||
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ | ||
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | ||
|
||
RUN go install sigs.k8s.io/[email protected] && \ | ||
curl -o kubebuilder \ | ||
-L https://github.com/kubernetes-sigs/kubebuilder/releases/latest/download/kubebuilder_linux_amd64 && \ | ||
chmod +x kubebuilder && \ | ||
mv kubebuilder /usr/local/bin/ && \ | ||
chmod +x post-install.sh |
42 changes: 42 additions & 0 deletions
42
docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker | ||
{ | ||
"name": "Kubebuilder DevContainer", | ||
"build": { | ||
"dockerfile": "./Dockerfile", | ||
"context": "." | ||
}, | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2.11.0": { | ||
"moby": true, | ||
"azureDnsAutoDetection": true, | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": false, | ||
"upgradePackages": true, | ||
"username": "devcontainer", | ||
"userUid": "1001", | ||
"userGid": "1001" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"ppa": true, | ||
"version": "system" | ||
}, | ||
"ghcr.io/devcontainers/features/go:1": { | ||
"version": "1.22.0" | ||
} | ||
}, | ||
|
||
"runArgs": ["--network=host"], | ||
// "forwardPorts": [], | ||
|
||
"postCreateCommand": "bash ./.devcontainer/post-install.sh" | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
15 changes: 15 additions & 0 deletions
15
docs/book/src/cronjob-tutorial/testdata/project/.devcontainer/post-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
go version | ||
kubectl version --client | ||
|
||
# Check if Kind cluster already exists. | ||
if kubectl cluster-info &>/dev/null; then | ||
echo "Kind cluster already exists." | ||
else | ||
echo "Kind cluster doesn't exist. Creating new cluster...." | ||
kind create cluster | ||
fi | ||
|
||
kubectl get nodes -o wide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4,896 changes: 0 additions & 4,896 deletions
4,896
...ob-tutorial/testdata/project/config/crd/bases/batch.tutorial.kubebuilder.io_cronjobs.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
docs/book/src/getting-started/testdata/project/.devcontainer/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Build the manager binary | ||
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): | ||
# 1, 1.19, 1.18, 1-bullseye, 1.19-bullseye, 1.18-bullseye, 1-buster, 1.19-buster, 1.18-buster | ||
ARG TAG=1.22 | ||
FROM golang:${TAG} | ||
|
||
COPY post-install.sh . | ||
|
||
# Install dependencies | ||
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ | ||
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | ||
|
||
RUN go install sigs.k8s.io/[email protected] && \ | ||
curl -o kubebuilder \ | ||
-L https://github.com/kubernetes-sigs/kubebuilder/releases/latest/download/kubebuilder_linux_amd64 && \ | ||
chmod +x kubebuilder && \ | ||
mv kubebuilder /usr/local/bin/ && \ | ||
chmod +x post-install.sh |
42 changes: 42 additions & 0 deletions
42
docs/book/src/getting-started/testdata/project/.devcontainer/devcontainer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker | ||
{ | ||
"name": "Kubebuilder DevContainer", | ||
"build": { | ||
"dockerfile": "./Dockerfile", | ||
"context": "." | ||
}, | ||
|
||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2.11.0": { | ||
"moby": true, | ||
"azureDnsAutoDetection": true, | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": false, | ||
"upgradePackages": true, | ||
"username": "devcontainer", | ||
"userUid": "1001", | ||
"userGid": "1001" | ||
}, | ||
"ghcr.io/devcontainers/features/git:1": { | ||
"ppa": true, | ||
"version": "system" | ||
}, | ||
"ghcr.io/devcontainers/features/go:1": { | ||
"version": "1.22.0" | ||
} | ||
}, | ||
|
||
"runArgs": ["--network=host"], | ||
// "forwardPorts": [], | ||
|
||
"postCreateCommand": "bash ./.devcontainer/post-install.sh" | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
15 changes: 15 additions & 0 deletions
15
docs/book/src/getting-started/testdata/project/.devcontainer/post-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
go version | ||
kubectl version --client | ||
|
||
# Check if Kind cluster already exists. | ||
if kubectl cluster-info &>/dev/null; then | ||
echo "Kind cluster already exists." | ||
else | ||
echo "Kind cluster doesn't exist. Creating new cluster...." | ||
kind create cluster | ||
fi | ||
|
||
kubectl get nodes -o wide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.