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
- kubeval
- k9s
- kustomize
- linkerd2
- minikube
- openshift-cli
- skaffold
- tilt
- velero
Kubernetes-Desktop: &Kubernetes-Desktop
@ -1676,7 +1678,7 @@ softwarePlugins:
- redhatdeveloper/openshift-dd-ext
- snyk/snyk-docker-desktop-extension
- tailscale/docker-extension:1.0.0
when: docker extension &>2 /dev/null
when: docker extension list &> /dev/null
docker_images:
cmd: null
plugins:
@ -1700,12 +1702,8 @@ softwarePlugins:
- cloud-firestore-emulator
- cloud-run-proxy
- gke-gcloud-auth-plugin
- kubectl
- kustomize
- log-streaming
- minikube
- pubsub-emulator
- skaffold
- terraform-tools
update: gcloud components update
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 "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:
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:
- access-matrix
- cert-manager

View file

@ -11,6 +11,11 @@
{{- includeTemplate "universal/profile" }}
{{- 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
logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh

View file

@ -8,13 +8,20 @@
{{ includeTemplate "universal/profile" }}
{{ 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
if command -v brew > /dev/null && command -v sdkman-cli > /dev/null; then
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec"
. "$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"
. "$SDKMAN_DIR/bin/sdkman-init.sh"
else
logg warn 'Unable to find SDKMAN instance'
fi
### 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 "Install directory: $SDKMAN_DIR"
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'
bash -c 'sdk install java'
else
logg info 'SDKMan appears to already be installed.'
logg info 'Running sdk update'
sdk update
logg info 'Running source ~/.bashrc && 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

View file

@ -12,7 +12,7 @@
function vimSetup() {
### Run the VIM plugin install routine
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
}
vimSetup

View file

@ -27,15 +27,20 @@ if [ -t 1 ]; then
true
}
fi
### Java (asdf)
[ ! -f "$ASDF_DATA_DIR/plugins/java/set-java-home.bash" ] || . "$ASDF_DATA_DIR/plugins/java/set-java-home.bash"
fi
fi
### Import Common Settings
[ ! -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
# Loaded with bash-it
# [[ $- == *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;;
esac
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### History
export HISTFILE="$XDG_STATE_HOME/bash/history"

View file

@ -250,7 +250,7 @@ export HSTR_TIOCSTI=y
### Homebrew
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
export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/httpie"

View file

@ -10,17 +10,20 @@ export BASH_SUPPORT=true
### Import Common Settings
[ ! -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
case $- in
*i*) ;;
*) return;;
esac
### Escape if user is root
if [ "$USER" = 'root' ]; then
return
fi
### Misc.
export HISTFILE="$XDG_STATE_HOME/zsh/history"
export ZLE_RPROMPT_INDENT=0
@ -429,9 +432,6 @@ fi
### iTerm2
[ ! -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)
! command -v navi > /dev/null || eval "$(navi widget zsh)"

View file

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