From 6651f6452b0f707b40523bd138d1fca950eeb8f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Cantournet?= Date: Fri, 2 Aug 2019 14:23:58 +0200 Subject: [PATCH] Multiple port canary: fix FAQ and add e2e tests --- docs/gitbook/faq.md | 3 +-- test/e2e-tests.sh | 4 +++- test/e2e-workload.yaml | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/gitbook/faq.md b/docs/gitbook/faq.md index 244fb773..1ae56485 100644 --- a/docs/gitbook/faq.md +++ b/docs/gitbook/faq.md @@ -232,8 +232,7 @@ spec: mode: ISTIO_MUTUAL ``` -Both port `8080` and `9090` will be added to the ClusterIP services but the virtual service -will point to the port specified in `spec.service.port`. +Both port `8080` and `9090` will be added to the ClusterIP services. ### Label selectors diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index df5797d8..3d654c15 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -33,6 +33,7 @@ spec: progressDeadlineSeconds: 60 service: port: 9898 + portDiscovery: true headers: request: add: @@ -142,6 +143,7 @@ spec: name: podinfo progressDeadlineSeconds: 60 service: + portDiscovery: true port: 9898 canaryAnalysis: interval: 10s @@ -202,4 +204,4 @@ echo '✔ A/B testing promotion test passed' kubectl -n istio-system logs deployment/flagger -echo '✔ All tests passed' \ No newline at end of file +echo '✔ All tests passed' diff --git a/test/e2e-workload.yaml b/test/e2e-workload.yaml index 56d0dbc3..ca7c043d 100644 --- a/test/e2e-workload.yaml +++ b/test/e2e-workload.yaml @@ -20,6 +20,7 @@ spec: metadata: annotations: prometheus.io/scrape: "true" + prometheus.io/port: "9797" labels: app: podinfo spec: @@ -31,9 +32,13 @@ spec: - containerPort: 9898 name: http protocol: TCP + - containerPort: 9797 + name: http-prom + protocol: TCP command: - ./podinfo - --port=9898 + - --port-metrics=9797 - --level=info - --random-delay=false - --random-error=false