added prom2json check in api validation function
This commit is contained in:
parent
2750fe86cb
commit
b5a1946ab4
@ -58,5 +58,9 @@ function validate_private_ingress(){
|
||||
|
||||
function k8s_list_deprecation_apis(){
|
||||
#Prints all api deprecation warnings in cluster
|
||||
if ! command -v prom2json > /dev/null; then
|
||||
printf "You need prom2json for this function: https://github.com/prometheus/prom2json\n"
|
||||
return 1
|
||||
fi
|
||||
kubectl get --raw /metrics | prom2json | jq -c '.[] | select(.name=="apiserver_requested_deprecated_apis").metrics[].labels' | column -t -s'{}[],"'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user