diff --git a/.gitignore b/.gitignore index 3a37d204..da5c2add 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ GameUserSettings.ini ostree/*.repo *.sops.*.tmp *.code-workspace -*venv* -*venv*/** +#*venv*/** .decrypted~* .ignore~* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..15a9b8b0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dots/k9s/.source"] + path = dots/k9s/.source + url = https://github.com/derailed/k9s diff --git a/.mise.toml b/.mise.toml index 13ede524..a4b647a8 100644 --- a/.mise.toml +++ b/.mise.toml @@ -5,21 +5,32 @@ kubectx = ["0.9.5"] fzf = ["0.52.1"] # used by kubectx interactive mode kustomize = ["5.3.0"] flux2 = "2.2.3" -talosctl = ["1.6.7", "1.5.4", "1.3.6"] -talhelper = ["1.16.2"] +talosctl = ["1.7.5", "1.6.7", "1.5.4", "1.3.6"] +talhelper = ["3.0.5", "1.16.2"] cilium-cli= ["0.15.14"] 1password-cli = ["2.24.0"] restic = ["0.16.4"] -k9s = ["0.32.4"] +k9s = ["0.32.5"] soft-serve = ["0.7.4"] #pulumi = ["3.95.0"] python = ["3.11"] +# TODO: experimental backends +#rust = ["1.80.1"] +#"cargo:cargo-binstall" = ["1.10.2"] +#"cargo:atac" = ["0.17.0"] +#go = ["1.22.6"] +#"go:github.com/gcla/termshark/v2/cmd/termshark" = ["2.4.0"] +#[settings] +#experimental = true # Cargo backend + [env] KUBECTL_INTERACTIVE_DELETE = "true" KUBECTL_COMMAND_HEADERS = "true" +K9S_CONFIG_DIR = "{{config_root}}/dots/k9s" #SSH_AUTH_SOCK = $(gpgconf --list-dirs agent-ssh-socket) _.python.venv = { path = ".venv", create = true } # create the venv if it doesn't exist [plugins] talhelper = "https://github.com/bjw-s/asdf-talhelper.git" + diff --git a/.venv/.gitignore b/.venv/.gitignore new file mode 100644 index 00000000..20277e83 --- /dev/null +++ b/.venv/.gitignore @@ -0,0 +1,3 @@ +# this gitignore is to have the directory present so Mise can create the venv with 0 user interaction +* +!.gitignore diff --git a/dots/k9s/.gitignore b/dots/k9s/.gitignore new file mode 100644 index 00000000..6cb5d55c --- /dev/null +++ b/dots/k9s/.gitignore @@ -0,0 +1,5 @@ +clusters/**/benchmarks.yaml +benchmarks/** +screen-dumps/** +**/k9s.log + diff --git a/dots/k9s/.source b/dots/k9s/.source new file mode 160000 index 00000000..35893ce4 --- /dev/null +++ b/dots/k9s/.source @@ -0,0 +1 @@ +Subproject commit 35893ce49b941c8a2b8706a50cfc35a449572231 diff --git a/dots/k9s/aliases.yaml b/dots/k9s/aliases.yaml new file mode 100644 index 00000000..0a5005cc --- /dev/null +++ b/dots/k9s/aliases.yaml @@ -0,0 +1,14 @@ +aliases: + # k9s defaults + sec: v1/secrets + jo: jobs + cr: clusterroles + crb: clusterrolebindings + ro: roles + rb: rolebindings + np: networkpolicies + # mine + dp: deployments + rsrc: ReplicationSource + rdst: ReplicationDestination + cron: cronjob diff --git a/dots/k9s/clusters/biohazard/biohazard/config.yaml b/dots/k9s/clusters/biohazard/biohazard/config.yaml new file mode 100644 index 00000000..046bdd4d --- /dev/null +++ b/dots/k9s/clusters/biohazard/biohazard/config.yaml @@ -0,0 +1,26 @@ +k9s: + cluster: biohazard + skin: transparent + namespace: + active: all + lockFavorites: true + favorites: + - all + - kube-system + - rook-ceph + - monitoring + - dns + - flux-system + - ingress + - pg + - minio-nas + - authentik + - media + - apps + - vm-ad + - system-upgrade-controller + view: + active: pods + featureGates: + nodeShell: true + portForwardAddress: '[::]' diff --git a/dots/k9s/config.yaml b/dots/k9s/config.yaml new file mode 100644 index 00000000..2d7c07f6 --- /dev/null +++ b/dots/k9s/config.yaml @@ -0,0 +1,29 @@ +--- +k9s: + #skin: dracula + skin: transparent + liveViewAutoRefresh: true + ui: + enableMouse: true + reactive: true + #imageScans: + # enable: false + # exclusions: + # namespaces: [] + # labels: {} + logger: + tail: -1 + sinceSeconds: -1 + fullScreen: true + textWrap: true + thresholds: + cpu: + critical: 90 + warn: 70 + memory: + critical: 90 + warn: 70 + namespace: + active: all + lockFavorites: true + favorites: [all, kube-system, rook-ceph, monitoring, dns, flux-system, ingress, pg] diff --git a/dots/k9s/skins b/dots/k9s/skins new file mode 120000 index 00000000..c5bb7fa0 --- /dev/null +++ b/dots/k9s/skins @@ -0,0 +1 @@ +./.source/skins \ No newline at end of file diff --git a/dots/vimrc b/dots/vimrc index 10f4469b..6a2ca86b 100644 --- a/dots/vimrc +++ b/dots/vimrc @@ -7,6 +7,46 @@ " --- " CREDITS: " https://github.com/amix/vimrc - Basic Config +" + +" nocompatible, placed first so all others below follow this +set nocompatible + +" set vim tmp files (https://stackoverflow.com/a/61585014) +if has('win32') + set noundofile + set nobackup + set noswapfile + set undodir= + set backupdir= + set directory= +elseif has('mac') || has('unix') + set undofile + set undolevels=1000 " How many undos + set undoreload=10000 " number of lines to save for undo + + set backup " enable backups + set swapfile " enable swaps + + set undodir=/tmp/.vim/tmp/undo" " undo files + set backupdir=/tmp/.vim/tmp/backup " backups + set directory=/tmp/.vim/tmp/swap " swap files +endif + +" Make those folders automatically if they don't already exist. +if !isdirectory(expand(&undodir)) + call mkdir(expand(&undodir), "p") +endif +if !isdirectory(expand(&backupdir)) + call mkdir(expand(&backupdir), "p") +endif +if !isdirectory(expand(&directory)) + call mkdir(expand(&directory), "p") +endif + +" set yank to: remember last 100 files' marks, yank across files if <10k lines +" and <5MB, and disable search highlighting on startup +set viminfo='100,<10000,s5000,h " Sets how many lines of history VIM has to remember set history=500