-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
109 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM mcr.microsoft.com/devcontainers/go:dev-1.23-bookworm | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ENV HELMVERS="v3.16.4" | ||
ENV YQVERSION="v4.44.6" | ||
ENV KUBECOLORVERSION="0.4.0" | ||
|
||
# Install kubectl | ||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin | ||
|
||
# Install helm | ||
RUN bash -c "curl -s https://get.helm.sh/helm-${HELMVERS}-linux-${TARGETARCH}.tar.gz > helm3.tar.gz" && tar -zxvf helm3.tar.gz linux-${TARGETARCH}/helm && chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin && rm helm3.tar.gz && rm -R linux-${TARGETARCH} | ||
|
||
# Install yq | ||
RUN curl -L -o yq "https://github.com/mikefarah/yq/releases/download/${YQVERSION}/yq_linux_${TARGETARCH}" && install -c -m 0755 yq /usr/local/bin | ||
|
||
# Install kubecolor | ||
RUN curl -L -o kubecolor.tar.gz https://github.com/kubecolor/kubecolor/releases/download/v${KUBECOLORVERSION}/kubecolor_${KUBECOLORVERSION}_linux_${TARGETARCH}.tar.gz && tar -xvzf kubecolor.tar.gz && install -c -m 0755 kubecolor /usr/local/bin | ||
|
||
# Install bash-complete to make kubectl autocomplete work | ||
RUN apt-get update && apt-get install bash-completion make vim -y && rm -rf /var/lib/apt/lists/* |
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,54 @@ | ||
{ | ||
"name": "KubeBuilder Example", | ||
"build": { | ||
"dockerfile": "./Dockerfile" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
"version": "latest", | ||
"moby": true | ||
}, | ||
"ghcr.io/mikaello/devcontainer-features/modern-shell-utils:1": {} | ||
}, | ||
"postCreateCommand": "./.devcontainer/postCreateCommand.sh", | ||
"customizations": { | ||
// "devpod": { | ||
// "prebuildRepository": "ghcr.io/loft-sh/devpod-kubebuilder-template" | ||
// }, | ||
"vscode": { | ||
"extensions": [ | ||
"golang.go", | ||
"ms-vscode.makefile-tools", | ||
"redhat.vscode-yaml", | ||
"timonwong.shellcheck", | ||
"eamodio.gitlens", | ||
"mhutchie.git-graph" | ||
], | ||
"settings": { | ||
// This has to be set individually to each developers preference | ||
// in their local vscode configs. | ||
// "terminal.integrated.defaultProfile.linux": "zsh", | ||
"terminal.integrated.profiles.linux": { | ||
"bash": { | ||
"path": "bash", | ||
"icon": "terminal-bash" | ||
}, | ||
"zsh": { | ||
"path": "zsh" | ||
}, | ||
"fish": { | ||
"path": "fish" | ||
}, | ||
"tmux": { | ||
"path": "tmux", | ||
"icon": "terminal-tmux" | ||
}, | ||
"pwsh": { | ||
"path": "pwsh", | ||
"icon": "terminal-powershell" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,19 @@ | ||
mkdir -p $HOME/.kube | ||
kubectl completion bash > /home/vscode/.kube/completion.bash.inc | ||
printf " | ||
source /usr/share/bash-completion/bash_completion | ||
source $HOME/.kube/completion.bash.inc | ||
alias k=kubectl | ||
complete -F __start_kubectl k | ||
" >> $HOME/.bashrc | ||
|
||
printf " | ||
source <(kubectl completion zsh) | ||
alias k=kubectl | ||
alias ll='ls -al' | ||
complete -F __start_kubectl k | ||
" >> $HOME/.zshrc | ||
|
||
make setup-kindev | ||
|
||
cp .kind/.kind/kind-config ~/.kube/config |
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 |
---|---|---|
|
@@ -31,3 +31,6 @@ __debug_bin* | |
hack/res | ||
hack/tmp | ||
hack/diff/function.yaml | ||
|
||
# MacOS stuff | ||
.DS_store |
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