This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"schemaVersion":1,"label":"tests","message":"1745","color":"brightgreen"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -e | |
| label_match="spotinst.io/node-lifecycle in (spot,od)" | |
| # kubectl function wrappers | |
| function drain_and_cordon { | |
| kubectl drain $1 --delete-emptydir-data --ignore-daemonsets --force | |
| } | |
| function list_nodes { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -eo pipefail | |
| touch done_namespace.tmp | |
| skipWithinHours="${1:-48}" | |
| workloadTypes=("ds" "deploy" "sts") | |
| excludedNamespaces=("kube-system" "istio-system") | |
| doneNamespaces=$(cat done_namespace.tmp) | |
| podUpdateStrategyRegex="RollingUpdate" | |
| podRolloutSleepTime=60 | |
| namespaces=$(kubectl get ns -o json | jq -r '.items[].metadata.name') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| show_help() { | |
| cat << EOF | |
| Usage: | |
| ${0##*/} help | |
| ${0##*/} list | |
| ${0##*/} images | |
| ${0##*/} password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| list=$(gcloud compute instances list --filter='tags.items=redis' --format="value(name,networkInterfaces[0].networkIP,networkInterfaces[0].subnetwork)") | |
| IFS=' | |
| ' | |
| for entry in $list | |
| do | |
| # set some convenience vars | |
| name=$(echo $entry | awk '{ print $1 }') | |
| ip=$(echo $entry | awk '{ print $2 }') | |
| region=$(echo $entry | gawk 'match($0, /regions\/(.+)\/subnetworks/, arr) { print arr[1] }') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List kernel image and header package | |
| sudo dpkg --list | egrep 'linux-image|linux-headers' | |
| # Get the sizes of the kernel images | |
| dpkg-query -Wf '${Installed-Size}\t${Package}\n' | egrep 'linux-image|linux-headers' | sort -n | |
| # Get list of package by size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| global: | |
| scrape_interval: 60s | |
| external_labels: | |
| monitor: "prometheus" | |
| cluster: monitoring-cluster | |
| scrape_configs: | |
| # Scrape volume stats from the Kubelet proxy at /metrics | |
| - job_name: "kubernetes-kubelet" | |
| kubernetes_sd_configs: |