initial setup

This commit is contained in:
ari committed 2023-02-18 21:41:57 +00:00
commit 3e4803366b
6 files changed
+153

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
@echo off
REM On Linux/macOS the passed in script will run inside of bash, but on
REM Windows, this will run a batch file with the same script name instead.
%1.cmd
+70
View File
@@ -0,0 +1,70 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/kubernetes-helm
{
"name": "HomeLab",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"runArgs": ["--network=host"],
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "latest",
"minikube": "none"
},
"./local-features/tweaks": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "vscode",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/mpriscella/features/helm-chart-testing:1": {
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/argo-cd:1": {
"version": "latest"
},
"ghcr.io/eitsupi/devcontainer-features/jq-likes:1": {
"jqVersion": "os-provided",
"yqVersion": "latest",
"gojqVersion": "latest"
},
"ghcr.io/dhoeric/features/act:1": {},
"ghcr.io/rio/features/k3d:1": {}
},
// "remoteEnv": {
// "SYNC_LOCALHOST_KUBECONFIG": "true"
// },
// "initializeCommand": "cd .devcontainer && bash ensure-mount-sources",
"mounts": [
{
"source": "${env:HOME}${env:USERPROFILE}/.kube",
"target": "/home/vscode/kube-localhost",
"type": "bind"
},
{
"source": "${env:HOME}${env:USERPROFILE}/.gitconfig",
"target": "/home/vscode/.gitconfig",
"type": "bind"
}
],
"customizations": {
"vscode": {
"extensions": [
"inercia.vscode-k3d",
"tumido.crd-snippets",
"hilleer.yaml-plus-json"
]
}
}
}
@@ -0,0 +1,11 @@
{
"id": "tweaks",
"name": "Additional tweaks to the devcontainer",
"options": {
"username": {
"type": "string",
"default": "",
"description": "Enter name of non-root user to configure or blank to use remoteUser"
}
}
}
@@ -0,0 +1,14 @@
#!/bin/bash
set -e
USERNAME="${USERNAME:-"${_REMOTE_USER}"}"
cat >> /home/${USERNAME}/.zshrc <<- EOM
source <(kubectl completion zsh)
alias k=kubectl
complete -o default -F __start_kubectl k
source <(k3d completion zsh)
source <(helm completion zsh)
EOM