feat/chore(dots): k9s, vimrc, mise, cleanup

This commit is contained in:
JJGadgets
2024-08-27 18:15:32 +08:00
parent 170bc6be9f
commit d5c7eb918c
11 changed files with 137 additions and 5 deletions

3
.gitignore vendored
View File

@@ -20,7 +20,6 @@ GameUserSettings.ini
ostree/*.repo
*.sops.*.tmp
*.code-workspace
*venv*
*venv*/**
#*venv*/**
.decrypted~*
.ignore~*

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "dots/k9s/.source"]
path = dots/k9s/.source
url = https://github.com/derailed/k9s

View File

@@ -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"

3
.venv/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# this gitignore is to have the directory present so Mise can create the venv with 0 user interaction
*
!.gitignore

5
dots/k9s/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
clusters/**/benchmarks.yaml
benchmarks/**
screen-dumps/**
**/k9s.log

1
dots/k9s/.source Submodule

Submodule dots/k9s/.source added at 35893ce49b

14
dots/k9s/aliases.yaml Normal file
View File

@@ -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

View File

@@ -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: '[::]'

29
dots/k9s/config.yaml Normal file
View File

@@ -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]

1
dots/k9s/skins Symbolic link
View File

@@ -0,0 +1 @@
./.source/skins

View File

@@ -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