View x-workload-name-envoyfilter.yaml
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
apiVersion: networking.istio.io/v1alpha3 | |
kind: EnvoyFilter | |
metadata: | |
name: add-x-workload-header | |
namespace: istio-system | |
annotations: | |
name: Add Workload Header | |
description: Adds an x-workload-header | |
spec: | |
configPatches: |
View istio-progress-bar.sh
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
#!/bin/bash | |
TOTAL=$(istioctl proxy-status | tail -n +2 | awk '{print $7}' | wc -l) | |
prog() { | |
local w=100 p=$1; shift | |
pct="$(( $p*$w/$TOTAL ))" | |
printf -v dots "%*s" "$pct" ""; dots=${dots// /.}; | |
printf "\r\e[K|%-*s| %3d %%" "$w" "$dots" "$pct"; | |
} |
View Istio Telemetry v2 Recording Rules
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
groups: | |
# These sum(irate()) functions are in separate groups, so they run in parallel | |
- name: istio.workload.istio_request_duration_milliseconds_bucket | |
interval: 10s | |
rules: | |
- record: workload:istio_request_duration_milliseconds_bucket:rate1m | |
expr: | | |
sum(irate(istio_request_duration_milliseconds_bucket{reporter="source", source_workload!=""}[1m])) | |
by ( |
View pilot-agent-agent
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
#!/bin/bash | |
echo "Starting custom autotrader pilot-agent wrapper..." | |
echo "Pilot-agent args: $@" | |
/usr/local/bin/pilot-agent "$@" & | |
AGENT_PID=$! | |
echo "Pilot agent started with pid: $AGENT_PID" | |
log() { | |
echo "[pilot-agent-agent] $*" |
View istio-rollout-sidecars.rb
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/bin/ruby | |
require 'json' | |
require 'net/http' | |
require 'shellwords' | |
require 'time' | |
require 'uri' | |
require 'yaml' | |
@target_sidecar_image = YAML.load(YAML.load(`kubectl --namespace=istio-system get configmap istio-sidecar-injector -o yaml`)['data']['config'])['template'].match(/.*(eu.gcr.io\/at-artefacts\/platform-istio-proxy.*)".*/)[1] |
View remove-istio.sh
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
#!/bin/bash | |
echo "Deleting istio components..." | |
array=( istio istio-crd istio-grafana istio-prometheus istio-jaeger kube-state-metrics prometheus-alertmanager ) | |
for i in "${array[@]}" | |
do | |
echo " - Removing: $i" | |
helm del --purge $i | |
done |
View debug-istio.sh
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
#!/bin/bash | |
set +e | |
rm -rf /tmp/istio-debug* | |
mkdir /tmp/istio-debug | |
cd /tmp/istio-debug | |
for pod in $(kubectl --namespace=istio-system get pods --no-headers -l istio=pilot | awk '{print $1}'); do | |
echo "Gathering info from $pod" | |
mkdir $pod | |
cd $pod |
View install-istio.sh
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
#!/bin/bash | |
set -e | |
array=( istio istio-crd istio-grafana istio-prometheus istio-jaeger ) | |
for i in "${array[@]}" | |
do | |
echo "Installing: $i" | |
helm upgrade --install $i --namespace istio-system $i/ --debug -f $ENV | |
done |
View generate-istio.rb
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/bin/env ruby | |
require 'psych' | |
require 'fileutils' | |
require 'yaml' | |
# These mappings are used by looking at the Type of the resource, and then | |
# from that deciding the sub folder | |
@mappings = { | |
'CustomResourceDefinition' => 'custom-resources', | |
'ClusterRole' => 'rbac/role', |
View helm-deploy.sh
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
#!/bin/bash | |
if [ -z "$RELEASE_NAME" ]; then | |
echo "ERROR: Please set \$RELEASE_NAME" | |
exit 1 | |
fi | |
if [ -z "$GO_PIPELINE_COUNTER" ]; then | |
echo "ERROR: Please set \$GO_PIPELINE_COUNTER" | |
exit 1 | |
fi | |
APP="aws/helm-$RELEASE_NAME" |
NewerOlder