-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
801 additions
and
161 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: default-http-backend | ||
labels: | ||
k8s-app: default-http-backend | ||
namespace: kube-system | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: default-http-backend | ||
spec: | ||
terminationGracePeriodSeconds: 60 | ||
containers: | ||
- name: default-http-backend | ||
# Any image is permissable as long as: | ||
# 1. It serves a 404 page at / | ||
# 2. It serves 200 on a /healthz endpoint | ||
image: gcr.io/google_containers/defaultbackend:1.0 | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8080 | ||
scheme: HTTP | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 5 | ||
ports: | ||
- containerPort: 8080 | ||
resources: | ||
limits: | ||
cpu: 10m | ||
memory: 20Mi | ||
requests: | ||
cpu: 10m | ||
memory: 20Mi | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: default-http-backend | ||
namespace: kube-system | ||
labels: | ||
k8s-app: default-http-backend | ||
spec: | ||
ports: | ||
- port: 80 | ||
targetPort: 8080 | ||
selector: | ||
k8s-app: default-http-backend |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
. ./e2e/e2e-internal/e2e-env.sh | ||
|
||
echo "Destroying running e2e cluster..." | ||
${MINIKUBE} --profile ${MINIKUBE_PROFILE} delete || echo "Cluster already destroyed" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
export MINIKUBE_VERSION=0.22.0 | ||
export K8S_VERSION=v1.7.5 | ||
|
||
export PWD=`pwd` | ||
export BASEDIR="$(dirname ${BASH_SOURCE})" | ||
export KUBECTL="${BASEDIR}/kubectl" | ||
export MINIKUBE="${BASEDIR}/minikube" | ||
export GOOS="${GOOS:-linux}" | ||
|
||
export MINIKUBE_WANTUPDATENOTIFICATION=false | ||
export MINIKUBE_WANTREPORTERRORPROMPT=false | ||
export MINIKUBE_HOME=$HOME | ||
export CHANGE_MINIKUBE_NONE_USER=true | ||
|
||
export KUBECONFIG=$HOME/.kube/config | ||
|
||
export MINIKUBE_PROFILE="ingress-e2e" | ||
|
||
export PATH=$PATH:$BASEDIR | ||
|
||
if [ ! -e ${KUBECTL} ]; then | ||
echo "kubectl binary is missing. downloading..." | ||
curl -sSL http://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/${GOOS}/amd64/kubectl -o ${KUBECTL} | ||
chmod u+x ${KUBECTL} | ||
fi | ||
|
||
if [ ! -e ${MINIKUBE} ]; then | ||
echo "minikube binary is missing. downloading..." | ||
curl -sSLo ${MINIKUBE} https://storage.googleapis.com/minikube/releases/v${MINIKUBE_VERSION}/minikube-linux-amd64 | ||
chmod +x ${MINIKUBE} | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eof pipefail | ||
|
||
. ./e2e/e2e-internal/e2e-env.sh | ||
|
||
${MINIKUBE} --profile ${MINIKUBE_PROFILE} status |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eof pipefail | ||
|
||
. ./e2e/e2e-internal/e2e-env.sh | ||
|
||
mkdir -p $HOME/.kube | ||
touch $KUBECONFIG | ||
|
||
if [ "$TRAVIS" = true ] ; then | ||
sudo -E ${MINIKUBE} --profile ${MINIKUBE_PROFILE} start --vm-driver=none | ||
else | ||
${MINIKUBE} --profile ${MINIKUBE_PROFILE} start | ||
fi | ||
|
||
# this for loop waits until kubectl can access the api server that minikube has created | ||
for i in {1..150} # timeout for 5 minutes | ||
do | ||
$KUBECTL get po &> /dev/null | ||
if [ $? -ne 1 ]; then | ||
break | ||
fi | ||
sleep 10 | ||
done | ||
|
||
sleep 60 | ||
|
||
echo "Kubernetes started" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eof pipefail | ||
|
||
. ./e2e/e2e-internal/e2e-env.sh | ||
|
||
PATH=$PATH:$(pwd) | ||
|
||
echo "Creating test tag for image $IMAGE:$TAG" | ||
docker tag $IMAGE:$TAG $IMAGE:test | ||
|
||
echo "Uploading test image to minikube" | ||
dockerenv=$(${MINIKUBE} --profile ${MINIKUBE_PROFILE} docker-env | sed 's/export//g' | sed 's/^#.*$//g' | sed 's/"//g') | ||
docker save $IMAGE:test | env -i $dockerenv docker load | ||
|
||
echo "Running tests..." | ||
go test -v k8s.io/ingress/controllers/nginx/e2e/... -run ^TestIngressSuite$ --args --alsologtostderr --v=10 |
Oops, something went wrong.