Skip to content

Istio PR testing workflow

The Istio PR testing workflow outlines the specific procedures contributors must follow to validate changes, particularly regarding container images, before code is merged into the repository^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

Prerequisites for Testing

For Pull Requests involving Docker images, the responsibility of initial testing lies with the PR owner. The workflow requires that owners build and push images to their own personal Docker Registry before requesting that images be built and pushed to the official Istio repository^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

Local Image Build

The process begins with building Docker images locally using the provided scripts^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]. The script accepts a version tag and a registry prefix^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

cd samples/bookinfo
src/build-services.sh <version> <prefix>

For example, to tag images for version 1.16.3 under a personal Docker Hub account^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]:

src/build-services.sh 1.16.3 docker.io/shamsher31

Deployment and Registry Updates

After the local build succeeds, the workflow requires pushing the images to a registry (e.g., Docker Hub) and simultaneously updating the relevant Kubernetes YAML files with the new image tags^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]. This consolidation step is handled by the build_push_update_images.sh script^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

./build_push_update_images.sh <version> --prefix=<prefix>

Cluster Validation

Once images are pushed and YAML files are updated, the changes must be validated in a Kubernetes cluster^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]. The application is deployed using the updated YAML configurations^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

[kubectl](<./kubectl.md>) apply -f samples/bookinfo/platform/kube/bookinfo.yaml

Verification involves checking that all pods reach the Running state^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md] and testing connectivity, either via curl commands from within a pod^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md] or through a browser^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

[kubectl](<./kubectl.md>) exec -it "$([kubectl](<./kubectl.md>) get [Pod](<./pod.md>) -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl productpage:9080/productpage | grep -o "<title>.*</title>"

Final Steps

If the validation tests pass successfully, the contributor may request that a reviewer build and push an official set of images^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]. A final commit containing version updates is then added to the original PR^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md]. Additionally, the istio.io repository maintains integration tests for samples like Bookinfo to ensure continued stability^[400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md].

Sources

  • 400-devops-07-monitoring-and-observability-k8s-istio-samples-bookinfo-readme.md