Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
function ResizeRow() { | |
// Be careful about this. If you change this to `getActiveSpreadSheet()`, it will be super confusing: | |
// see https://www.reddit.com/r/GoogleAppsScript/comments/10dbe41/comment/j4knea5 | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var selection = sheet.getSelection(); | |
var activeRange = selection.getActiveRange(); | |
var rowsInSelection = activeRange.getNumRows(); | |
var cell = selection.getCurrentCell(); | |
var row = cell.getRow(); |
# Load colors, use like this: | |
# autoload colors; colors | |
# echo $fg[green]text$reset_color | |
autoload -U colors; colors | |
for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do | |
eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete | |
eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' | |
done | |
eval RESET='%{$reset_color%}' |
# Credit http://stackoverflow.com/a/2514279 | |
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
GitHub::DGit::ThreePhaseCommitClient::PhaseQuorumError: all voting replicas failed while acquiring locks |
#!/usr/bin/env bash | |
BLACK=$(tput setaf 0) | |
RED=$(tput setaf 1) | |
GREEN=$(tput setaf 2) | |
YELLOW=$(tput setaf 3) | |
LIME_YELLOW=$(tput setaf 190) | |
POWDER_BLUE=$(tput setaf 153) | |
BLUE=$(tput setaf 4) |
#!/usr/bin/env bash | |
# Pretty rough script on downloading GDSLs. Replace http://localhost:8080 with your Jenkins URL. You may have to | |
# provide an authtoken. | |
jobs_curl=$(curl --silent --location --request GET 'http://localhost:8080/api/json?tree=jobs\[name\]') | |
list=$(jq --raw-output '.jobs[] | .name' <<< "$jobs_curl") | |
write_gdsl_file() { |