This file contains 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
{ | |
"_index" : ".operations.2017.08.07", | |
"_type" : "com.redhat.viaq.common", | |
"_id" : "AV28LhKeHnu-8fxLW30H", | |
"_score" : 1.0, | |
"_source" : { | |
"docker" : { | |
"container_id" : "020f49711f0d441dbeec0665a8ebd702aa6ec4ffc829aa2bd69f79c6a211b00e" | |
}, | |
"kubernetes" : { |
This file contains 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
readonly tempdir="/tmp/templates" | |
mkdir -p "$tempdir" | |
oc project logging | |
readonly dcs=( $(oc get dc | awk 'NR > 1 {print($1)}') ) | |
for dc in ${dcs[@]}; do | |
oc get dc "$dc" -o yaml | | |
sed 's/^apiVersion: v1/apiVersion: extensions\/v1beta1/' | | |
sed 's/DeploymentConfig/Deployment/' | | |
awk '/strategy:/{l=0}/.*/{if(l){print(" "$0)}else{print($0)}} / selector:/{print " matchLabels:";l=1}' | |
This file contains 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
#!/usr/local/bin/bash | |
#or this !/bin/bash | |
trap 'echo "" ; exit 1' SIGINT | |
shopt -s globstar | |
usage() { | |
echo "Usage: [-i|--include=<.*>] [-d|--dir=<.*>] [-s|--semiauto] REGEXP_FROM STRING_TO" |
NewerOlder