http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/
https://sre.google/sre-book/table-of-contents/
https://www.piglei.com/articles/en-programming-is-still-hard-after-14-years/
URL=https://chartmuseum.example.com | |
CHART_NAME=argo-cd | |
CHART_VERSION=1.0.5 | |
TOKEN=dXNlcm5hbWU6cGFzc3dvcmQ= | |
curl -X DELETE $URL/api/charts/$CHART_NAME/$CHART_VERSION -H "Authorization: Basic $TOKEN" |
Delete failed pipelineruns:
kubectl -n target-namespace delete pipelinerun $(kubectl -n target-namespace get pipelinerun -o jsonpath='{range .items[?(@.status.conditions[*].status=="False")]}{.metadata.name}{"\n"}{end}')
Delete successful pipelineruns:
kubectl -n target-namespace delete pipelinerun $(kubectl -n target-namespace get pipelinerun -o jsonpath='{range .items[?(@.status.conditions[*].status=="True")]}{.metadata.name}{"\n"}{end}')
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: sleeping-pod | |
spec: | |
containers: | |
- name: test | |
image: bash | |
command: ["sh", "-c", "tail -f /dev/null"] |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: test | |
namespace: default | |
spec: | |
containers: | |
- command: | |
- sh |
kubectl run -it --rm --image=wbitt/network-multitool network-multitool -- sh
kubectl get pods --all-namespaces -o wide | grep NODE_NAME | awk '{print $1" "$2}' | xargs -n2 kubectl top pods --no-headers --namespace | sort -t ' ' --key 2 --numeric --reverse
kubectl get pod -A -o custom-columns="Name:metadata.name,CPU-request:spec.containers[*].resources.requests.cpu,CPU-limit:spec.containers[*].resources.limits.cpu,Memory-request:spec.containers[*].resources.requests.memory,Memory-limits:spec.containers[*].resources.limits.memory"
# Custom environment variables | |
export GIT_EDITOR=/usr/bin/vim | |
export EDITOR=/usr/bin/vim | |
export VISUAL=/usr/bin/vim | |
# Command for git root | |
git config --global alias.root "rev-parse --show-toplevel" | |
# Custom aliases | |
alias l='ls' |
" Reference: | |
" http://nvie.com/posts/how-i-boosted-my-vim/ | |
" | |
" Most general settings first | |
set nocompatible " set Vim rather than Vi settings; must go first | |
set nowrap " don't wrap lines | |
set tabstop=4 " a tab is four spaces | |
set expandtab " spaces instead of tabs | |
set backspace=indent,eol,start " allow backspacing over everything in insert mode | |
set hlsearch " highlight search terms |