Re-ordered ASDF, fixed bashrc sourcing issues, and added software defs for k8s stuff

This commit is contained in:
Brian Zalewski 2023-11-27 10:12:13 +00:00
parent b49ce97c6e
commit 53bee1579d
8 changed files with 60 additions and 28 deletions

View file

@ -669,9 +669,11 @@ softwareGroups:
- kubernetes-kompose - kubernetes-kompose
- kubeval - kubeval
- k9s - k9s
- kustomize
- linkerd2 - linkerd2
- minikube - minikube
- openshift-cli - openshift-cli
- skaffold
- tilt - tilt
- velero - velero
Kubernetes-Desktop: &Kubernetes-Desktop Kubernetes-Desktop: &Kubernetes-Desktop
@ -1676,7 +1678,7 @@ softwarePlugins:
- redhatdeveloper/openshift-dd-ext - redhatdeveloper/openshift-dd-ext
- snyk/snyk-docker-desktop-extension - snyk/snyk-docker-desktop-extension
- tailscale/docker-extension:1.0.0 - tailscale/docker-extension:1.0.0
when: docker extension &>2 /dev/null when: docker extension list &> /dev/null
docker_images: docker_images:
cmd: null cmd: null
plugins: plugins:
@ -1700,12 +1702,8 @@ softwarePlugins:
- cloud-firestore-emulator - cloud-firestore-emulator
- cloud-run-proxy - cloud-run-proxy
- gke-gcloud-auth-plugin - gke-gcloud-auth-plugin
- kubectl
- kustomize
- log-streaming - log-streaming
- minikube
- pubsub-emulator - pubsub-emulator
- skaffold
- terraform-tools - terraform-tools
update: gcloud components update update: gcloud components update
gh: gh:
@ -1727,7 +1725,7 @@ softwarePlugins:
- if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi - if ! helm plugin list | grep "Query at a given interval a Prometheus, ElasticSearch or Sentry instance." > /dev/null; then helm plugin install https://github.com/ContainerSolutions/helm-monitor; fi
- if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi - if ! helm plugin list | grep "This plugin provides secrets values encryption for Helm charts secure storing" > /dev/null; then helm plugin install https://github.com/jkroepke/helm-secrets; fi
krew: krew:
cmd: bash -c 'if ! kubectl krew list | grep "^{PLUGIN}$" > /dev/null; then kubectl krew install "{PLUGIN}"; fi' cmd: bash -c 'if ! kubectl krew list | grep "^{PLUGIN}$" > /dev/null; then if ! kubectl krew search "{PLUGIN}" | grep ' unavailable on ' > /dev/null; then kubectl krew install "{PLUGIN}"; else echo "UNSUPPORTED PLATFORM - {PLUGIN} is not supported on the current platform"; fi; fi'
plugins: plugins:
- access-matrix - access-matrix
- cert-manager - cert-manager

View file

@ -11,6 +11,11 @@
{{- includeTemplate "universal/profile" }} {{- includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }} {{- includeTemplate "universal/logg" }}
### Re-source ~/.bashrc if necessary
if [ -z "$ASDF_DIR" ]; then
logg info 'ASDF_DIR is not defined so ~/.bashrc will be sourced' && source ~/.bashrc
fi
if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg info 'Sourcing asdf.sh' logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh . ${ASDF_DIR}/asdf.sh

View file

@ -8,13 +8,20 @@
{{ includeTemplate "universal/profile" }} {{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
### Re-source ~/.bashrc
if [ -z "$SDKMAN_DIR" ]; then
logg info 'SDKMAN_DIR is undefined so ~/.bashrc is being re-sourced' && source ~/.bashrc
fi
### SDKMan ~/.bashrc settings ### SDKMan ~/.bashrc settings
if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec" export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec"
. "$SDKMAN_DIR/bin/sdkman-init.sh" . "$SDKMAN_DIR/bin/sdkman-init.sh"
elif [ -f "$SDKMAN_DIR/bin/sdkman-init.sh" ]; then elif [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/sdkman" ]; then
export SDKMAN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/sdkman" export SDKMAN_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/sdkman"
. "$SDKMAN_DIR/bin/sdkman-init.sh" . "$SDKMAN_DIR/bin/sdkman-init.sh"
else
logg warn 'Unable to find SDKMAN instance'
fi fi
### Ensure SDKMan is installed (https://sdkman.io/) ### Ensure SDKMan is installed (https://sdkman.io/)
@ -22,10 +29,15 @@ if [ ! -d "$SDKMAN_DIR" ]; then
logg info 'Installing SDKMan via curl -s "https://get.sdkman.io?rcupdate=false' logg info 'Installing SDKMan via curl -s "https://get.sdkman.io?rcupdate=false'
logg info "Install directory: $SDKMAN_DIR" logg info "Install directory: $SDKMAN_DIR"
curl -s "https://get.sdkman.io?rcupdate=false" | bash curl -s "https://get.sdkman.io?rcupdate=false" | bash
logg info 'Re-sourcing ~/.bashrc' && source ~/.bashrc
logg info 'Running sdk install java with bash -c' logg info 'Running sdk install java with bash -c'
bash -c 'sdk install java' bash -c 'sdk install java'
else else
logg info 'SDKMan appears to already be installed.' logg info 'SDKMan appears to already be installed.'
logg info 'Running sdk update' logg info 'Running source ~/.bashrc && sdk update'
sdk update if command -v sdk > /dev/null; then
source ~/.bashrc && sdk update
else
logg warn 'Unable to run sdk update because the sdk command is unavailable'
fi
fi fi

View file

@ -12,7 +12,7 @@
function vimSetup() { function vimSetup() {
### Run the VIM plugin install routine ### Run the VIM plugin install routine
if command -v vim > /dev/null; then if command -v vim > /dev/null; then
vim +PlugInstall +qall > /dev/null && logg success 'Successfully ran vim +PlugInstall +qall' || logg error 'Failed to run vim +PlugInstall +qll' vim +PlugInstall +qall +silent > /dev/null && logg success 'Successfully ran vim +PlugInstall +qall +silent' || logg error 'Failed to run vim +PlugInstall +qall +silent'
fi fi
} }
vimSetup vimSetup

View file

@ -27,15 +27,20 @@ if [ -t 1 ]; then
true true
} }
fi fi
### Java (asdf)
[ ! -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ] || . "$ASDF_DATA_DIR/plugins/java/set-java-home.bash"
fi fi
fi fi
### Import Common Settings ### Import Common Settings
[ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" ] || . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" [ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" ] || . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh"
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### Java (asdf)
[ ! -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ] || . "$ASDF_DATA_DIR/plugins/java/set-java-home.bash"
### Ble.sh ### Ble.sh
# Loaded with bash-it # Loaded with bash-it
# [[ $- == *i* ]] && source "${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh" --noattach --rcfile "${XDG_CONFIG_HOME:-$HOME/.config}/blesh/bleshrc" # [[ $- == *i* ]] && source "${XDG_DATA_HOME:-$HOME/.local/share}/blesh/ble.sh" --noattach --rcfile "${XDG_CONFIG_HOME:-$HOME/.config}/blesh/bleshrc"
@ -46,11 +51,6 @@ case $- in
*) return;; *) return;;
esac esac
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### History ### History
export HISTFILE="$XDG_STATE_HOME/bash/history" export HISTFILE="$XDG_STATE_HOME/bash/history"

View file

@ -250,7 +250,7 @@ export HSTR_TIOCSTI=y
### Homebrew ### Homebrew
export HOMEBREW_BUNDLE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/Brewfile" export HOMEBREW_BUNDLE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/Brewfile"
export HOMEBREW_CASK_OPTS="--appdir=/Applications --display-times" export HOMEBREW_CASK_OPTS="--appdir=/Applications --display-times --no-quarantine"
### HTTPie ### HTTPie
export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/httpie" export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/httpie"

View file

@ -10,17 +10,20 @@ export BASH_SUPPORT=true
### Import Common Settings ### Import Common Settings
[ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" ] || source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" [ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" ] || source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh"
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### Java (asdf)
[ ! -f "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh" ] || source "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh"
# If not running interactively, don't do anything # If not running interactively, don't do anything
case $- in case $- in
*i*) ;; *i*) ;;
*) return;; *) return;;
esac esac
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### Misc. ### Misc.
export HISTFILE="$XDG_STATE_HOME/zsh/history" export HISTFILE="$XDG_STATE_HOME/zsh/history"
export ZLE_RPROMPT_INDENT=0 export ZLE_RPROMPT_INDENT=0
@ -429,9 +432,6 @@ fi
### iTerm2 ### iTerm2
[ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/iterm/iterm2.zsh" ] || source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/iterm/iterm2.zsh" [ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/iterm/iterm2.zsh" ] || source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/iterm/iterm2.zsh"
### Java (asdf)
[ ! -f "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh" ] || source "$ASDF_DATA_DIR/plugins/java/set-java-home.zsh"
### Navi (Ctrl+G) ### Navi (Ctrl+G)
! command -v navi > /dev/null || eval "$(navi widget zsh)" ! command -v navi > /dev/null || eval "$(navi widget zsh)"

View file

@ -4914,7 +4914,7 @@ softwarePackages:
_name: Java _name: Java
ansible: professormanhattan.java ansible: professormanhattan.java
apt: openjdk-11-jdk apt: openjdk-11-jdk
brew: java brew: openjdk
choco: jdk11 choco: jdk11
dnf: java-11-openjdk-devel.x86_64 dnf: java-11-openjdk-devel.x86_64
pacman: jdk-openjdk pacman: jdk-openjdk
@ -5196,6 +5196,14 @@ softwarePackages:
brew: kompose brew: kompose
choco: kubernetes-kompose choco: kubernetes-kompose
snap: kompose snap: kompose
kustomize:
_bin: kustomize
_github: https://github.com/kubernetes-sigs/kustomize
_name: Kustomize
brew: kustomize
port: kustomize
choco: kustomize
go: sigs.k8s.io/kustomize/kustomize/v5@latest
kubeval: kubeval:
_bin: kubeval _bin: kubeval
_desc: Validate your Kubernetes configuration files, supports multiple Kubernetes versions _desc: Validate your Kubernetes configuration files, supports multiple Kubernetes versions
@ -8549,6 +8557,14 @@ softwarePackages:
go: github.com/charmbracelet/skate@latest go: github.com/charmbracelet/skate@latest
nix: nixpkgs.skate nix: nixpkgs.skate
pacman: skate pacman: skate
skaffold:
_bin: skaffold
_name: Skaffold
_github: https://github.com/GoogleContainerTools/skaffold
brew: skaffold
port: skaffold
choco: skaffold
scoop: extras/skaffold
skm: skm:
_bin: skm _bin: skm
_desc: A simple and powerful SSH keys manager _desc: A simple and powerful SSH keys manager
@ -9910,6 +9926,7 @@ softwarePackages:
_github: https://github.com/vim/vim _github: https://github.com/vim/vim
_home: https://www.vim.org/ _home: https://www.vim.org/
_name: VIM _name: VIM
_post: vim +PlugInstall +qall +silent > /dev/null
ansible: professormanhattan.vim ansible: professormanhattan.vim
apt: vim apt: vim
brew: vim brew: vim