mirror of
https://github.com/kerberos-io/helm-charts.git
synced 2026-08-23 15:18:33 +00:00
Update devcontainer for Go and cloud tooling
Switch base image to the Go 1.25 Bookworm devcontainer and rework container tooling installs. Remove explicit apt/pip installs from the old image and instead remove the expired Yarn repo key, install Azure CLI, Helm, kubectl, Argo CD CLI, and Google Cloud SDK (including GKE auth plugin). Update devcontainer metadata: change container name, add --privileged to runArgs, and refresh the VS Code extensions list to include Go/Helm/AKS/Azure tooling and Copilot.
This commit is contained in:
@@ -1,27 +1,28 @@
|
|||||||
FROM mcr.microsoft.com/devcontainers/base:bookworm
|
FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm
|
||||||
|
|
||||||
# Install common CLI tooling for Helm chart development and validation.
|
# Remove expired Yarn GPG key from base image
|
||||||
RUN apt-get update \
|
RUN sudo rm -f /etc/apt/sources.list.d/yarn.list
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
jq \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
shellcheck \
|
|
||||||
yq \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Install the latest Helm 3 release.
|
# Remove expired Yarn repository key (inherited from base image)
|
||||||
RUN curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
RUN sudo rm -f /etc/apt/sources.list.d/yarn.list
|
||||||
|
|
||||||
# Install the latest stable kubectl release.
|
# Install AZURE CLI
|
||||||
RUN KUBECTL_VERSION="$(curl -fsSL https://dl.k8s.io/release/stable.txt)" \
|
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
||||||
&& curl -fsSL "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
|
|
||||||
&& chmod +x /usr/local/bin/kubectl
|
|
||||||
|
|
||||||
# Install YAML linter via pip (available as yamllint command).
|
# Install helm and kubectl
|
||||||
RUN pip3 install --no-cache-dir yamllint
|
RUN curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
|
||||||
|
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
|
||||||
|
&& chmod +x ./kubectl \
|
||||||
|
&& sudo mv ./kubectl /usr/local/bin/kubectl
|
||||||
|
|
||||||
USER vscode
|
# Install Argocd CLI
|
||||||
|
RUN VERSION=$(curl -L -s https://raw.githubusercontent.com/argoproj/argo-cd/stable/VERSION)
|
||||||
|
RUN curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/download/v$VERSION/argocd-linux-amd64
|
||||||
|
RUN sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
|
||||||
|
RUN rm argocd-linux-amd64
|
||||||
|
|
||||||
|
# Install google-cloud-sdk
|
||||||
|
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||||
|
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
|
||||||
|
RUN sudo apt-get update && sudo apt-get install -y google-cloud-cli
|
||||||
|
RUN sudo apt-get install google-cloud-cli-gke-gcloud-auth-plugin
|
||||||
@@ -1,22 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "helm-charts-bookworm",
|
"name": "go:1.25-bookworm",
|
||||||
"runArgs": [
|
"dockerFile": "Dockerfile",
|
||||||
"--name=kerberos-helm-charts",
|
"runArgs": [
|
||||||
"--network=host"
|
"--name=helm-charts",
|
||||||
],
|
"--network=host",
|
||||||
"dockerFile": "Dockerfile",
|
"--privileged"
|
||||||
"mounts": [
|
],
|
||||||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
|
"customizations": {
|
||||||
],
|
"vscode": {
|
||||||
"customizations": {
|
"extensions": [
|
||||||
"vscode": {
|
"ms-kubernetes-tools.vscode-kubernetes-tools",
|
||||||
"extensions": [
|
"redhat.vscode-yaml",
|
||||||
"GitHub.copilot",
|
"Tim-Koehler.helm-intellisense",
|
||||||
"ms-azuretools.vscode-docker",
|
"ms-vscode.azurecli",
|
||||||
"ms-kubernetes-tools.vscode-kubernetes-tools",
|
"ms-vscode-remote.remote-containers",
|
||||||
"redhat.vscode-yaml"
|
"GitHub.copilot",
|
||||||
]
|
"ms-kubernetes-tools.vscode-aks-tools",
|
||||||
}
|
"fabiospampinato.vscode-diff"
|
||||||
},
|
]
|
||||||
"postCreateCommand": "helm version && kubectl version --client && yamllint --version"
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user