-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
10 lines (10 loc) · 1.2 KB
/
aliases
1
2
3
4
5
6
7
8
9
10
alias watch="watch "
alias k="kubectl ${KUBECTL_CONTEXT:+--context=$KUBECTL_CONTEXT} ${KUBECTL_NAMESPACE:+--namespace=$KUBECTL_NAMESPACE}"
alias kctx="kubectx"
alias kjob='f() { kubectl get po --selector=job-name=$1 };f'
alias customscore="kube-score score --kubernetes-version v1.24 --ignore-test container-security-context,container-image-pull-policy,deployment-has-poddisruptionbudget,pod-networkpolicy,pod-probes,statefulset-has-poddisruptionbudget,container-ephemeral-storage-request-and-limit,container-security-context-user-group-id,container-security-context-readonlyrootfilesystem --enable-optional-test container-security-context-privileged -"
alias sshhosts="sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]]\{1,\}\([^#*?%]*\)\(#.*\)\{0,1\}$/\1/p' ~/.ssh/config"
alias timestamp="date '+%s'"
alias check-tls-yaml='f() { output=`kubectl create secret tls tls-secret --key <(yq eval ".data.*key" $1 | base64 --decode) --cert <(yq eval ".data.*crt" $1 | base64 --decode) --dry-run=client`; if (( $? )); then echo $output && return 1; fi };f'
alias tls-enddate='f() { yq eval ".data.*crt" $1 | base64 --decode | openssl x509 --noout --enddate };f'
alias ansible-galaxy-list-collections="python ~/.bin/list_collections.py"