starting fixup for ambient getting-stated tests (#14953)

* starting fixup for ambient getting-stated tests

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* update gateway api installation output

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* fixing adding to ambient test

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* remove missing snips from tests

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* enable gtwapi tests, fixing other tests

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* further test updates for istio path and gtwapi path

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

* revise tests again, ensure cleanup works better

Signed-off-by: Ian Rudie <ian.rudie@solo.io>

---------

Signed-off-by: Ian Rudie <ian.rudie@solo.io>
This commit is contained in:
Ian Rudie 2024-04-24 14:43:23 -05:00 committed by GitHub
parent 7874416a02
commit 84c86bea38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 29 deletions

View File

@ -28,4 +28,3 @@ snip_uninstall_2
snip_uninstall_3
samples/bookinfo/platform/kube/cleanup.sh
snip_uninstall_4
snip_uninstall_5

View File

@ -116,13 +116,13 @@ four components (including {{< gloss "ztunnel" >}}ztunnel{{< /gloss >}}) have be
{{< text bash >}}
$ kubectl get pods,daemonset -n istio-system
NAME READY STATUS RESTARTS AGE
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-zq94l 1/1 Running 0 2m7s
pod/istio-ingressgateway-56b9cb5485-ksnvc 1/1 Running 0 2m7s
pod/istiod-56d848857c-mhr5w 1/1 Running 0 2m9s
pod/ztunnel-srrnm 1/1 Running 0 2m5s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m16s
daemonset.apps/ztunnel 1 1 1 1 1 kubernetes.io/os=linux 2m10s
{{< /text >}}
@ -133,13 +133,13 @@ daemonset.apps/ztunnel 1 1 1 1 1
{{< text bash >}}
$ kubectl get pods,daemonset -n istio-system
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-zq94l 1/1 Running 0 2m15s
pod/istiod-56d848857c-mhr5w 1/1 Running 0 2m23s
pod/ztunnel-srrnm 1/1 Running 0 2m9s
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-btbjf 1/1 Running 0 2m18s
pod/istiod-55b74b77bd-xggqf 1/1 Running 0 2m27s
pod/ztunnel-5m27h 1/1 Running 0 2m10s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m16s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m18s
daemonset.apps/ztunnel 1 1 1 1 1 kubernetes.io/os=linux 2m10s
{{< /text >}}
@ -249,6 +249,7 @@ by simply labeling the namespace:
{{< text bash >}}
$ kubectl label namespace default istio.io/dataplane-mode=ambient
namespace/default labeled
{{< /text >}}
Congratulations! You have successfully added all pods in the default namespace
@ -437,6 +438,7 @@ The label to instruct Istio to automatically include applications in the `defaul
{{< text bash >}}
$ kubectl label namespace default istio.io/dataplane-mode-
$ kubectl label namespace default istio.io/use-waypoint-
{{< /text >}}
To remove waypoint proxies, installed policies, and uninstall Istio:

View File

@ -38,13 +38,13 @@ kubectl get pods,daemonset -n istio-system
}
! IFS=$'\n' read -r -d '' snip_download_and_install_7_out <<\ENDSNIP
NAME READY STATUS RESTARTS AGE
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-zq94l 1/1 Running 0 2m7s
pod/istio-ingressgateway-56b9cb5485-ksnvc 1/1 Running 0 2m7s
pod/istiod-56d848857c-mhr5w 1/1 Running 0 2m9s
pod/ztunnel-srrnm 1/1 Running 0 2m5s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m16s
daemonset.apps/ztunnel 1 1 1 1 1 kubernetes.io/os=linux 2m10s
ENDSNIP
@ -54,13 +54,13 @@ kubectl get pods,daemonset -n istio-system
}
! IFS=$'\n' read -r -d '' snip_download_and_install_8_out <<\ENDSNIP
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-zq94l 1/1 Running 0 2m15s
pod/istiod-56d848857c-mhr5w 1/1 Running 0 2m23s
pod/ztunnel-srrnm 1/1 Running 0 2m9s
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-btbjf 1/1 Running 0 2m18s
pod/istiod-55b74b77bd-xggqf 1/1 Running 0 2m27s
pod/ztunnel-5m27h 1/1 Running 0 2m10s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m16s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 1 1 1 1 1 kubernetes.io/os=linux 2m18s
daemonset.apps/ztunnel 1 1 1 1 1 kubernetes.io/os=linux 2m10s
ENDSNIP
@ -125,6 +125,10 @@ snip_adding_your_application_to_the_ambient_mesh_1() {
kubectl label namespace default istio.io/dataplane-mode=ambient
}
! IFS=$'\n' read -r -d '' snip_adding_your_application_to_the_ambient_mesh_1_out <<\ENDSNIP
namespace/default labeled
ENDSNIP
snip_adding_your_application_to_the_ambient_mesh_2() {
kubectl exec deploy/sleep -- curl -s "http://$GATEWAY_HOST/productpage" | grep -o "<title>.*</title>"
}
@ -289,6 +293,7 @@ kubectl exec deploy/sleep -- sh -c "for i in \$(seq 1 100); do curl -s http://pr
snip_uninstall_1() {
kubectl label namespace default istio.io/dataplane-mode-
kubectl label namespace default istio.io/use-waypoint-
}
snip_uninstall_2() {

View File

@ -38,11 +38,9 @@ _wait_for_daemonset istio-system ztunnel
_wait_for_daemonset istio-system istio-cni-node
if [ "$GATEWAY_API" == "true" ]; then
_verify_like snip_download_and_install_9 "$snip_download_and_install_9_out"
_verify_like snip_download_and_install_10 "$snip_download_and_install_10_out"
_verify_like snip_download_and_install_8 "$snip_download_and_install_8_out"
else
_verify_like snip_download_and_install_7 "$snip_download_and_install_7_out"
_verify_like snip_download_and_install_8 "$snip_download_and_install_8_out"
fi
# deploy test application
@ -66,10 +64,8 @@ _verify_same snip_adding_your_application_to_the_ambient_mesh_1 "$snip_adding_yo
# test traffic after ambient mode is enabled
snip_adding_your_application_to_the_ambient_mesh_2
_verify_contains snip_adding_your_application_to_the_ambient_mesh_3 "received netns, starting proxy"
_verify_contains snip_adding_your_application_to_the_ambient_mesh_3 "$snip_adding_your_application_to_the_ambient_mesh_3_out"
_verify_same snip_adding_your_application_to_the_ambient_mesh_4 "$snip_adding_your_application_to_the_ambient_mesh_4_out"
_verify_same snip_adding_your_application_to_the_ambient_mesh_5 "$snip_adding_your_application_to_the_ambient_mesh_5_out"
_verify_same snip_adding_your_application_to_the_ambient_mesh_6 "$snip_adding_your_application_to_the_ambient_mesh_6_out"
snip_layer_4_authorization_policy_1
_verify_contains snip_layer_4_authorization_policy_2 "$snip_layer_4_authorization_policy_2_out"
@ -83,15 +79,13 @@ _verify_contains snip_layer_7_authorization_policy_4 "$snip_layer_7_authorizatio
_verify_contains snip_layer_7_authorization_policy_5 "$snip_layer_7_authorization_policy_5_out"
_verify_contains snip_layer_7_authorization_policy_6 "$snip_layer_7_authorization_policy_6_out"
_verify_contains snip_control_traffic_1 "$snip_control_traffic_1_out"
if [ "$GATEWAY_API" == "true" ]; then
snip_control_traffic_3
else
snip_control_traffic_2
else
snip_control_traffic_1
fi
_verify_lines snip_control_traffic_4 "
_verify_lines snip_control_traffic_3 "
+ reviews-v1
+ reviews-v2
- reviews-v3
@ -104,5 +98,4 @@ if [ "$GATEWAY_API" != "true" ]; then
snip_uninstall_3
samples/bookinfo/platform/kube/cleanup.sh
snip_uninstall_4
snip_uninstall_5
fi