This page introduces the Istio test framework. For an overview of the architecture as well as how to extend the framework, see the Developer Guide.
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/bash | |
cd "$(dirname "$0")" | |
for ctx in $(kubectl config get-contexts -o name); do | |
FILE="$ctx.yaml" | |
# if we have exactly 4 parts, it's probably a GKE cluster. Use the shortname and hope there aren't collisions. | |
SHORTNAME=$(echo $ctx | cut -d'_' -f4) | |
if [ -n $SHORTNAME ]; then | |
FILE=$SHORTNAME.yaml | |
fi |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
"go.uber.org/atomic" | |
"istio.io/istio/pkg/config/schema/collections" | |
kubelib "istio.io/istio/pkg/kube" |
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/bash | |
set -e | |
set -u | |
set -o pipefail | |
SERVICE="vm" | |
NAMESPACE="echo" | |
NETWORK="" | |
CLUSTER="Kubernetes" |
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
package main | |
import ( | |
"fmt" | |
"encoding/json" | |
"istio.io/istio/pkg/kube" | |
"k8s.io/apimachinery/pkg/runtime" | |
) |
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
# triggers a new "b" pod to be created | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: b | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
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
# scales deployment a to 500 replicas | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: a | |
spec: | |
replicas: 500 | |
selector: | |
matchLabels: |
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
# sets up a, b, c deployments with services for a and b | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: a | |
labels: | |
app: a | |
spec: | |
ports: |