From a0a9b7d29aaade90029f6e7d92140ea19d58f579 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 3 Mar 2020 13:51:12 +0200 Subject: [PATCH] e2e: use kustomize to install the load tester --- artifacts/flagger/account.yaml | 4 ++-- artifacts/flagger/deployment.yaml | 5 +---- docs/gitbook/usage/webhooks.md | 5 +---- test/e2e-contour-tests.sh | 2 +- test/e2e-gloo-tests.sh | 2 +- test/e2e-linkerd-tests.sh | 2 +- test/e2e-nginx-tests.sh | 2 +- 7 files changed, 8 insertions(+), 14 deletions(-) diff --git a/artifacts/flagger/account.yaml b/artifacts/flagger/account.yaml index c71e6108..173eb5e4 100644 --- a/artifacts/flagger/account.yaml +++ b/artifacts/flagger/account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: flagger - namespace: istio-system + namespace: default labels: app: flagger --- @@ -109,4 +109,4 @@ roleRef: subjects: - kind: ServiceAccount name: flagger - namespace: istio-system + namespace: default diff --git a/artifacts/flagger/deployment.yaml b/artifacts/flagger/deployment.yaml index 4a04cac4..55c2b8b0 100644 --- a/artifacts/flagger/deployment.yaml +++ b/artifacts/flagger/deployment.yaml @@ -2,7 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: flagger - namespace: istio-system + namespace: default labels: app: flagger spec: @@ -30,9 +30,6 @@ spec: command: - ./flagger - -log-level=info - - -control-loop-interval=10s - - -mesh-provider=$(MESH_PROVIDER) - - -metrics-server=http://prometheus.istio-system.svc.cluster.local:9090 livenessProbe: exec: command: diff --git a/docs/gitbook/usage/webhooks.md b/docs/gitbook/usage/webhooks.md index 16056db5..6f77e8c8 100644 --- a/docs/gitbook/usage/webhooks.md +++ b/docs/gitbook/usage/webhooks.md @@ -116,10 +116,7 @@ that generates traffic during analysis when configured as a webhook. First you need to deploy the load test runner in a namespace with sidecar injection enabled: ```bash -export REPO=https://raw.githubusercontent.com/weaveworks/flagger/master - -kubectl -n test apply -f ${REPO}/artifacts/loadtester/deployment.yaml -kubectl -n test apply -f ${REPO}/artifacts/loadtester/service.yaml +kubectl apply -k github.com/weaveworks/flagger//kustomize/tester ``` Or by using Helm: diff --git a/test/e2e-contour-tests.sh b/test/e2e-contour-tests.sh index 70d18372..90f9c84b 100755 --- a/test/e2e-contour-tests.sh +++ b/test/e2e-contour-tests.sh @@ -11,7 +11,7 @@ echo '>>> Creating test namespace' kubectl create namespace test echo '>>> Installing load tester' -kubectl -n test apply -f ${REPO_ROOT}/artifacts/loadtester/ +kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester echo '>>> Initialising canary' diff --git a/test/e2e-gloo-tests.sh b/test/e2e-gloo-tests.sh index f4525c72..75bad44d 100755 --- a/test/e2e-gloo-tests.sh +++ b/test/e2e-gloo-tests.sh @@ -11,7 +11,7 @@ echo '>>> Creating test namespace' kubectl create namespace test echo '>>> Installing load tester' -kubectl -n test apply -f ${REPO_ROOT}/artifacts/loadtester/ +kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester echo '>>> Initialising canary' diff --git a/test/e2e-linkerd-tests.sh b/test/e2e-linkerd-tests.sh index 519f9f58..c93b3d73 100755 --- a/test/e2e-linkerd-tests.sh +++ b/test/e2e-linkerd-tests.sh @@ -11,7 +11,7 @@ kubectl create namespace test kubectl annotate namespace test linkerd.io/inject=enabled echo '>>> Installing the load tester' -kubectl -n test apply -f ${REPO_ROOT}/artifacts/loadtester/ +kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester echo '>>> Initialising canary' diff --git a/test/e2e-nginx-tests.sh b/test/e2e-nginx-tests.sh index 3cf04fe9..66a33e45 100755 --- a/test/e2e-nginx-tests.sh +++ b/test/e2e-nginx-tests.sh @@ -11,7 +11,7 @@ echo '>>> Creating test namespace' kubectl create namespace test echo '>>> Installing load tester' -kubectl -n test apply -f ${REPO_ROOT}/artifacts/loadtester/ +kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester echo '>>> Initialising canary'