diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 44302dfc9..6738464a3 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -9,12 +9,6 @@ for f in $ZDOTDIR/configs/autogenerated/*; do source $f done -for f in $ZDOTDIR/functions/*; do - source $f -done - source $ZDOTDIR/plugins/fzf/bindings.zsh source $ZDOTDIR/plugins/autopyenv/autopyenv.zsh source $ZDOTDIR/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh - -source $ZDOTDIR/completions/ssh diff --git a/.config/zsh/completions/ssh b/.config/zsh/completions/ssh deleted file mode 100644 index 77b8370ec..000000000 --- a/.config/zsh/completions/ssh +++ /dev/null @@ -1,34 +0,0 @@ -# vim:set ft=zsh - -ZSH_CACHE_DIR="${ZSH_CACHE_DIR:-${TMPDIR:-/tmp}/zsh-${UID:-user}}" -CACHE_FILE="${ZSH_CACHE_DIR}/ssh-hosts.zsh" - -hosts=() -if [[ -f ~/.ssh/config ]]; then - if [[ "$CACHE_FILE" -nt "$HOME/.ssh/config" ]]; then - source "$CACHE_FILE" - else - mkdir -p "${CACHE_FILE:h}" - hosts=( $(grep '^Host ' ~/.ssh/config | awk '{first = $1; $1 = ""; print $0; }' | xargs) ) - typeset -p hosts >! "$CACHE_FILE" 2> /dev/null - zcompile "$CACHE_FILE" - fi -fi - -zstyle ':completion:*:hosts' hosts $hosts - -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*' sort false -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*' format ' %F{yellow}-- %d --%f' - -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*' group-name '' -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*' verbose yes - -zstyle ':completion:*:(scp|rsync|sshfs):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' -zstyle ':completion:*:(scp|rsync|sshfs):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr - -zstyle ':completion:*:(ssh|mosh):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' -zstyle ':completion:*:(ssh|mosh):*' group-order users hosts-domain hosts-host users hosts-ipaddr - -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*:hosts-host' ignored-patterns '*(.|:)*' loopback localhost broadcasthost 'ip6-*' -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' -zstyle ':completion:*:(ssh|scp|sshfs|mosh):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.*' '255.255.255.255' '::1' 'fe80::*' 'ff02::*' diff --git a/.config/zsh/configs/bindings b/.config/zsh/configs/bindings index f6ff20290..96a448634 100644 --- a/.config/zsh/configs/bindings +++ b/.config/zsh/configs/bindings @@ -1,5 +1,4 @@ # vim:set ft=zsh - # vi mode bindkey -v diff --git a/.config/zsh/configs/setup b/.config/zsh/configs/setup index d0608d379..64d4f13d4 100644 --- a/.config/zsh/configs/setup +++ b/.config/zsh/configs/setup @@ -3,10 +3,10 @@ setopt HIST_IGNORE_ALL_DUPS HIST_REDUCE_BLANKS HIST_VERIFY BANG_HIST interactive_comments autocd noflowcontrol longlistjobs nonomatch notify hash_list_all share_history histignorespace -autoload -U colors && colors -autoload edit-command-line && zle -N edit-command-line -autoload -U add-zsh-hook -autoload -U compinit +autoload -Uz colors && colors +autoload -Uz edit-command-line && zle -N edit-command-line +autoload -Uz add-zsh-hook +autoload -Uz compinit autoload -Uz edit-command-line zstyle ':completion:*' menu select @@ -23,3 +23,8 @@ add-zsh-hook precmd write_info echo -ne '\e[5 q' # Use beam shape cursor on startup. preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. + +whed() { + $EDITOR "$(which "$1")" +} + diff --git a/.config/zsh/configs/widgets b/.config/zsh/configs/widgets index ca5b46782..cbc149ad8 100644 --- a/.config/zsh/configs/widgets +++ b/.config/zsh/configs/widgets @@ -1,5 +1,4 @@ # vim:set ft=zsh - # LF Change Dir function lfcd () { tmp="$(mktemp)" diff --git a/.config/zsh/functions/kubernetesrc_ansible b/.config/zsh/functions/kubernetesrc_ansible deleted file mode 100644 index 229050d79..000000000 --- a/.config/zsh/functions/kubernetesrc_ansible +++ /dev/null @@ -1,590 +0,0 @@ -# vim:set ft=zsh -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/functions/misc b/.config/zsh/functions/misc deleted file mode 100644 index 6b8f1b57a..000000000 --- a/.config/zsh/functions/misc +++ /dev/null @@ -1,4 +0,0 @@ -# vim:set ft=zsh -whed() { - $EDITOR "$(which "$1")" -} diff --git a/.config/zsh/profile b/.config/zsh/profile index 21781ecce..054c33088 100644 --- a/.config/zsh/profile +++ b/.config/zsh/profile @@ -1,9 +1,6 @@ -#!/bin/sh +#!/bin/zsh # profile file. Runs on login. Environmental variables are set here. -localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" -export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath" - export EDITOR="nvim" export TERMINAL="kitty" export BROWSER="librewolf" @@ -59,5 +56,9 @@ export LESS_TERMCAP_ue="$(printf '%b' '')" export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null" export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible +localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')" +export PATH="$PATH:$HOME/.local/share/npm-global/bin:$localpath" +export FPATH="$FPATH:$ZDOTDIR/functions:$ZDOTDIR/completions" + # Start X Server if logging in on TTY1 and no other server is running [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startgraphical