diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 766f7574f..d9ec35602 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -148,7 +148,7 @@ cmd paste &{{ lf -remote "send clear" }} -cmd dupe &{{ +cmd dupe %{{ for file in $fx; do find "$PWD" "$file" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | ( ext=$(($(cat /dev/stdin)+1)) @@ -160,11 +160,37 @@ cmd dupe &{{ cmd share $curl -F"file=@$fx" https://0x0.snaile.de | xclip -r -selection c +cmd fzfsearch ${{ + file="$(fzf)" + [ -d $file ] && lf -remote "send $id cd $file" + [ -f $file ] && lf -remote "send $id select $file" +}} +cmd fzftags ${{ + file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/tags | sed 's/:\*$//' | fzf)" + [ -d $file ] && lf -remote "send $id cd $file" + [ -f $file ] && lf -remote "send $id select $file" +}} +cmd fzfmarks ${{ + file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/marks | sed 's/^.://' | fzf)" + [ -d $file ] && lf -remote "send $id cd $file" + [ -f $file ] && lf -remote "send $id select $file" +}} +cmd fzfshortcutfiles ${{ + file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-files | fzf)" + lf -remote "send $id select $file" +}} +cmd fzfshortcutdirs ${{ + file="$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-dirs | fzf)" + [ -d $file ] && lf -remote "send $id cd $file" + lf -remote "send $id select $file" +}} + # Bindings -map a $lf -remote "send $id select '$(fzf)'" -map t $lf -remote "send $id select '$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/tags | sed 's/:\*$//' | fzf)'" -map f $lf -remote "send $id select '$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-files | fzf)'" -map d $lf -remote "send $id cd '$(cat ${XDG_DATA_HOME:-$HOME/.local/share}/lf/shortcut-dirs | fzf)'" +map a fzfsearch +map t fzftags +map m fzfmarks +map f fzfshortcutfiles +map d fzfshortcutdirs map J $dir=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf) && lf -remote "send $id cd $(eval echo $dir)" map D trash map delete diff --git a/.config/shell/profile b/.config/shell/profile index d8006e7fd..8145192a8 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -2,9 +2,9 @@ # profile file. Runs on login. Environmental variables are set here. -# Adds `~/.local/bin` to $PATH localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" -export PATH="$PATH:~/.local/share/npm-global/bin:$localpath" +export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath" +export FPATH="$FPATH:$HOME/.local/share/zsh/functions:$HOME/.local/share/zsh/site-functions" # Default programs: export EDITOR="nvim" diff --git a/.config/zsh/.kubernetesrc_ansible b/.config/zsh/.kubernetesrc_ansible new file mode 100644 index 000000000..21b35a8fc --- /dev/null +++ b/.config/zsh/.kubernetesrc_ansible @@ -0,0 +1,589 @@ +function kctl () { + case "$1" in + (netsyno) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml $@ ;; + (testing) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml $@ ;; + (production) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml $@ ;; + (server315) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml $@ ;; + (nds) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml $@ ;; + (hetzner) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml $@ ;; + (communalfmdemo) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml $@ ;; + (customer) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml $@ ;; + (k3s_testing) shift + kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml $@ ;; + (*) kubeconfig=$1 + shift + kubectl --kubeconfig ~/.kube/config_${kubeconfig} $@ ;; + esac +} + +function velero () { + case "$1" in + (netsyno) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml $@ ;; + (testing) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml $@ ;; + (production) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml $@ ;; + (server315) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml $@ ;; + (nds) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml $@ ;; + (hetzner) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml $@ ;; + (communalfmdemo) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml $@ ;; + (customer) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml $@ ;; + (k3s_testing) shift + /usr/local/bin/velero --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml $@ ;; + (*) kubeconfig=$1 + shift + /usr/local/bin/velero --kubeconfig ~/.kube/config_${kubeconfig} $@ ;; + esac +} + +# function kubectl () { +# case "$1" in +# # (netsyno) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml $@ ;; +# # (testing) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml $@ ;; +# # (production) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml $@ ;; +# # (server315) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml $@ ;; +# # (nds) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml $@ ;; +# # (hetzner) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml $@ ;; +# # (communalfmdemo) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml $@ ;; +# # (customer) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml $@ ;; +# # (k3s_testing) shift +# /usr/local/bin/kubectl --kubeconfig /home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml $@ ;; +# # (*) kubeconfig=$1 +# shift +# /usr/local/bin/kubectl --kubeconfig ~/.kube/config_${kubeconfig} $@ ;; +# esac +# } + +alias kubectl_netsyno="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; kubectl" +alias velero_netsyno="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_testing="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; kubectl" +alias velero_testing="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_production="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; kubectl" +alias velero_production="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_server315="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; kubectl" +alias velero_server315="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_nds="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; kubectl" +alias velero_nds="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_hetzner="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; kubectl" +alias velero_hetzner="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_communalfmdemo="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; kubectl" +alias velero_communalfmdemo="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_customer="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; kubectl" +alias velero_customer="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; /usr/local/bin/velero" +alias kubectl_k3s_testing="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; kubectl" +alias velero_k3s_testing="export KUBECONFIG=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; /usr/local/bin/velero" + + +function kubedash () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kubedash_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + + +function kdash () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kdash_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n kubernetes-dashboard describe secret `kubectl --kubeconfig ${kubeconfig} get secret -n kubernetes-dashboard | grep admin-user | awk '{ print $1}'` | grep token: | awk '{ print $2}') + echo ${token} | xsel -b -i + xdg-open https://dashboard.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + + +function kprom () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + xdg-open https://prometheus.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + xdg-open https://prometheus.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + xdg-open https://prometheus.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + xdg-open https://prometheus.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + xdg-open https://prometheus.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + xdg-open https://prometheus.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + xdg-open https://prometheus.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + xdg-open https://prometheus.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + xdg-open https://prometheus.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function kprom_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + xdg-open https://prometheus.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + + +function klonghorn () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + xdg-open https://longhorn.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + xdg-open https://longhorn.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + xdg-open https://longhorn.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + xdg-open https://longhorn.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + xdg-open https://longhorn.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + xdg-open https://longhorn.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + xdg-open https://longhorn.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + xdg-open https://longhorn.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + xdg-open https://longhorn.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function klonghorn_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + xdg-open https://longhorn.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + + +function ktraefik () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + xdg-open https://traefik.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + xdg-open https://traefik.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + xdg-open https://traefik.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + xdg-open https://traefik.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + xdg-open https://traefik.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + xdg-open https://traefik.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + xdg-open https://traefik.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + xdg-open https://traefik.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + xdg-open https://traefik.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function ktraefik_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + xdg-open https://traefik.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + + +function krook () { + case "$1" in + (netsyno) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml; cluster=netsyno.kubernetes.tralios.de ;; + (testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml; cluster=testing.kubernetes.tralios.de ;; + (production) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml; cluster=production.kubernetes.tralios.de ;; + (server315) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml; cluster=server315.kubernetes.tralios.de ;; + (nds) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml; cluster=nds.kubernetes.tralios.de ;; + (hetzner) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml; cluster=hetzner.kubernetes.tralios.de ;; + (communalfmdemo) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml; cluster=communalfmdemo.kubernetes.tralios.de ;; + (customer) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml; cluster=customer.kubernetes.tralios.de ;; + (k3s_testing) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml; cluster=k3s-testing.kubernetes.tralios.de ;; +# (*) kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/$1.yaml ;; + esac + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.${cluster}/ > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_netsyno () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/netsyno.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.netsyno.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_production () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/production.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.production.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_server315 () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/server315.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.server315.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_nds () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/nds.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.nds.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_hetzner () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/hetzner.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.hetzner.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_communalfmdemo () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/communalfmdemo.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.communalfmdemo.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_customer () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/customer.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.customer.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + +function krook_k3s_testing () { + local kubeconfig=/home/luca/.local/src/git/ansible/classes/kubeconfig/k3s-testing.kubernetes.tralios.de.yaml + local token=$(kubectl --kubeconfig ${kubeconfig} -n rook-ceph get secret rook-ceph-dashboard-password -o jsonpath='{.data.password}' | base64 -d) + echo ${token} | xsel -b -i + xdg-open https://rook.k3s-testing.kubernetes.tralios.de/#/login > /dev/null 2>&1 & + #kubectl --kubeconfig ${kubeconfig} proxy +} + diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 36f4d23ef..2295ac64a 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -3,6 +3,9 @@ autoload edit-command-line && zle -N edit-command-line autoload -U add-zsh-hook autoload -U compinit autoload -Uz edit-command-line + +source ${ZDOTDIR:-$HOME}/.kubernetesrc_ansible + PS1="%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%f%3~%F{magenta}] %(?.%F{green}.%F{red})ยป%f%b " RPS1="%(?..%F{red}%?)" stty stop undef # Disable ctrl-s to freeze terminal. diff --git a/.local/share/librewolf/chrome/userChrome.css b/.local/share/librewolf/chrome/userChrome.css index f3200f377..87fc27a72 100644 --- a/.local/share/librewolf/chrome/userChrome.css +++ b/.local/share/librewolf/chrome/userChrome.css @@ -1,18 +1,18 @@ /* change these variables to get different colors */ :root { - --userchrome-tab-active-bgcolor: #7aa2f7; - --userchrome-tab-inactive-bgcolor: #15161E; - --userchrome-tab-loading-bgcolor: #7dcfff; - --userchrome-tab-active-fgcolor: #15161E; - --userchrome-tab-inactive-fgcolor: #7aa2f7; - --userchrome-tab-loading-fgcolor: #15161E; + --userchrome-tab-active-bgcolor: #7aa2f7; + --userchrome-tab-inactive-bgcolor: #15161E; + --userchrome-tab-loading-bgcolor: #7dcfff; + --userchrome-tab-active-fgcolor: #15161E; + --userchrome-tab-inactive-fgcolor: #7aa2f7; + --userchrome-tab-loading-fgcolor: #15161E; --userchrome-font: "JetBrains Mono"; } /* change to control tabbar height */ /* try increasing to 20px if you see a black line under tabbar */ #titlebar { - --tab-min-height: 16px !important; + --tab-min-height: 16px !important; } /* --- GENERAL DEBLOAT ---------------------------------- */ @@ -233,9 +233,9 @@ tab { } /* hide tab bar if only one tab open */ -tab:only-of-type:not([progress="true"]):not([bursting="true"]):not([busy="true"]) { - display: none; -} +/* tab:only-of-type:not([progress="true"]):not([bursting="true"]):not([busy="true"]) { */ +/* display: none; */ +/* } */ /* Hide close button on tabs */ #tabbrowser-tabs .tabbrowser-tab .tab-close-button {