Commit 0837bc453be9

Vincent Demeester <vincent@sbr.pm>
2025-11-19 23:22:43
chore: remove unused tool called bekind
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 3338369
pkgs/default.nix
@@ -13,7 +13,6 @@ in
   scripts = pkgs.callPackage ./my/scripts { };
   vrsync = pkgs.callPackage ./my/vrsync { };
   vde-thinkpad = pkgs.callPackage ./my/vde-thinkpad { };
-  bekind = pkgs.callPackage ../tools/bekind { };
   battery-monitor = pkgs.callPackage ../tools/battery-monitor { };
   ape = pkgs.callPackage ./ape { };
   ram = pkgs.callPackage ./ram { };
tools/bekind/profiles/1.21.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: "kindest/node:v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093"
tools/bekind/profiles/1.22.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: "kindest/node:v1.22.17@sha256:f5b2e5698c6c9d6d0adc419c0deae21a425c07d81bbf3b6a6834042f25d4fba2"
tools/bekind/profiles/1.23.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: "kindest/node:v1.23.17@sha256:59c989ff8a517a93127d4a536e7014d28e235fb3529d9fba91b3951d461edfdb"
tools/bekind/profiles/1.24.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
tools/bekind/profiles/1.25.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
tools/bekind/profiles/1.26.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
tools/bekind/profiles/1.27.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
tools/bekind/profiles/1n.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.24.4@sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98
tools/bekind/profiles/3n.yaml
@@ -1,22 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
-  kubeadmConfigPatches:
-  - |
-    kind: InitConfiguration
-    nodeRegistration:
-      kubeletExtraArgs:
-        node-labels: "ingress-ready=true"
-- role: worker
-  image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
-- role: worker
-  image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
tools/bekind/profiles/demo.yaml
@@ -1,12 +0,0 @@
-kind: Cluster
-apiVersion: kind.x-k8s.io/v1alpha4
-networking:
-  apiServerAddress: HOST
-  apiServerPort: PORT
-containerdConfigPatches:
-- |-
-  [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
-    endpoint = ["http://sakhalin.home:5000"]
-nodes:
-- role: control-plane
-  image: kindest/node:v1.24.4@sha256:adfaebada924a26c2c9308edd53c6e33b3d4e453782c0063dc0028bdebaddf98
tools/bekind/bekind
@@ -1,158 +0,0 @@
-#!/usr/bin/env bash
-bekind=$(basename $0)
-bekind_dir=$(dirname "$(readlink -f "$0")")
-profile_dir="./profiles"
-
-bekind_help(){
-    echo "Usage: $ProgName <subcommand> [options]\n"
-    echo "Subcommands:"
-    echo "    clean    clean all kind clusters"
-    echo "    create   create a kind cluster"
-    echo "    delete   delete a kind cluster"
-    echo "    list     list kind clusters"
-    echo ""
-    echo "For help with each subcommand run:"
-    echo "$ProgName <subcommand> -h|--help"
-    echo ""
-}
-
-bekind_create(){
-    profile=""
-    host=""
-    port="8443"
-    while [[ $# -gt 1 ]]
-    do
-        case $1 in
-            "--profile" | "-p")
-                shift
-                profile=$1
-                shift
-                ;;
-            "--port")
-                shift
-                port=$1
-                shift
-                ;;
-            "--host")
-                shift
-                host=$1
-                shift
-                ;;
-        esac
-    done
-    name="$1"
-    shift
-    if [[ -z "${name}" ]]; then
-        name="kind"
-    fi
-    env=""
-    configfile="config.${name}"
-    if [[ -n "${host}" ]]; then
-        env="DOCKER_HOST=ssh://${host}"
-        configfile="${configfile}.${host}"
-    fi
-    args=""
-    if [[ -n "${profile}" ]]; then
-        if [[ -z "${host}" ]]; then
-            echo "Cannot use profile ${profile} without an host" 1>&2
-            exit 1
-        fi
-        # does the profile exists
-        profile_file="${profile_dir}/${profile}.yaml"
-        if [[ -f "${profile_file}" ]]; then
-            tmpfile=$(mktemp /tmp/bekind.XXXXXX)
-            hostip=$(getent hosts ${host} | awk '{ print $1 }')
-            sed -e "s/HOST/${hostip}/g" -e "s/PORT/${port}/g" "${profile_file}" > ${tmpfile}
-            args="${args} --config ${tmpfile}"
-        else
-            echo "Profile ${profile} doesn't exists" 1>&2
-            exit 1
-        fi
-        # replace hosts in there
-    fi
-    tmpkubeconfig=$(mktemp /tmp/bekind.kubeconfig.XXXXXX)
-    export KUBECONFIG=${tmpkubeconfig}
-    echo "> Create the cluster (name: ${name}, args: ${args})"
-    env $env kind create cluster --name ${name} ${args}
-    echo "> Write the kubeconfig in ~/.kube/${configfile}"
-    env $env kind get kubeconfig --name ${name} > ~/.kube/${configfile}
-    rm ${tmpkubeconfig}
-    unset KUBECONFIG
-}
-
-bekind_delete() {
-    while [[ $# -gt 1 ]]
-    do
-        case $1 in
-            "--host")
-                shift
-                host=$1
-                shift
-                ;;
-        esac
-    done
-    name="$1"
-    shift
-    env=""
-    if [[ -z "${name}" ]]; then
-        name="kind"
-    fi
-    if [[ -n "${host}" ]]; then
-        env="DOCKER_HOST=ssh://${host}"
-    fi
-    echo "> Delete kind cluster ${name} from ${host}"
-    env $env kind delete cluster --name ${name}
-}
-
-bekind_list() {
-    while [[ $# -gt 0 ]]
-    do
-        case $1 in
-            "--host")
-                shift
-                host=$1
-                shift
-                ;;
-        esac
-    done
-    env=""
-    if [[ -n "$host" ]]; then
-        env="DOCKER_HOST=ssh://${host}"
-    fi
-    env $env kind get clusters
-}
-
-bekind_clean() {
-    while [[ $# -gt 1 ]]
-    do
-        case $1 in
-            "--host")
-                shift
-                host=$1
-                shift
-                ;;
-        esac
-    done
-    env=""
-    if [[ -n "$host" ]]; then
-        env="DOCKER_HOST=ssh://${host}"
-    fi
-    echo "> Clean kind clusters from ${host}"
-    env $env kind delete clusters --all
-}
-
-subcommand=$1
-case $subcommand in
-    "" | "-h" | "--help")
-        bekind_help
-        ;;
-    *)
-        shift
-        bekind_${subcommand} $@
-        if [ $? = 127 ]; then
-            echo "Error: '$subcommand' is not a known subcommand." >&2
-            echo "       Run '$ProgName --help' for a list of known subcommands." >&2
-            exit 1
-        fi
-        ;;
-esac
tools/bekind/default.nix
@@ -1,16 +0,0 @@
-{ stdenv }:
-
-stdenv.mkDerivation {
-  name = "bekind";
-  src = ./.;
-  phases = [
-    "installPhase"
-    "fixupPhase"
-  ];
-  installPhase = ''
-    mkdir -p $out $out/bin $out/share/bekind
-    sed "s%profile_dir=\"./profiles\"%profile_dir=$out/share/bekind/profiles%g" $src/bekind > $out/bin/bekind
-    chmod +x $out/bin/bekind
-    cp -r $src/profiles $out/share/bekind/
-  '';
-}
tools/bekind/README.org
@@ -1,9 +0,0 @@
-# bekind
-
-=bekind= is my personnal command line to manage kind cluster in my developement
-environment. Here is a list of features:
-
-- create a kind cluster on a remote machine (using =ssh=)
-- create a kind cluster based on a /profile/ (1 node, 3 nodes, with ingress, …)
-- list kind cluster on a given remote machine
-- remove/re-create a kind cluster
CLAUDE.md
@@ -17,7 +17,7 @@ The repository follows a modular architecture centered around `flake.nix`:
 - **`/systems`**: NixOS system configurations, organized by hostname with a shared `/systems/common` directory containing base, desktop, hardware, programs, services, and users modules
 - **`/home`**: Home-manager configurations with `/home/common` containing desktop, dev, services, and shell modules
 - **`/pkgs`**: Custom Nix packages that are exposed via overlays
-- **`/tools`**: Source code for custom tools (bekind, battery-monitor, emacs configuration)
+- **`/tools`**: Source code for custom tools (battery-monitor, emacs configuration)
 - **`/modules`**: Custom NixOS modules (wireguard-client, wireguard-server, govanityurl, gosmee)
 - **`/overlays`**: Nix overlays for additions, modifications, and unstable packages
 - **`/keyboards`**: Hardware keyboard configurations (ZMK for Corne, QMK for Moonlander, Kanata software remapper)
README.org
@@ -47,13 +47,12 @@
 ** =/tools=
 Custom tools and utilities:
 - Battery monitor
-- Bekind (Kubernetes tooling)
 - Emacs configuration
 - Various Go-based utilities
 
 ** =/pkgs=
 Custom Nix packages and overlays including:
-- Development tools (bekind, govanityurl, manifest-tool)
+- Development tools (govanityurl, manifest-tool)
 - System utilities (battery-monitor, systemd-email, vrsync)
 - Custom scripts and utilities (ape, ram, batzconverter)
 - Emacs packages
@@ -217,7 +216,6 @@
 All packages are defined in the =/pkgs= directory and are available for both =x86_64-linux= and =aarch64-linux= systems. Notable packages include:
 
 **** Development Tools
-- =bekind= - CLI tool for managing kind (Kubernetes in Docker) clusters with profile support
 - =battery-monitor= - System battery monitoring utility
 - =govanityurl= - Go vanity URL service
 - =manifest-tool= - Container manifest tool