1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-22 06:02:51 +00:00
catalog/task/istio-canary-release/0.1
Vincent Demeester d93795673c Update self reference from master to main 🧙
And update references to community, pipeline, etc. too.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2021-03-19 11:09:49 +00:00
..
samples Add Canary Release Task using K8s and Istio 2020-08-18 08:42:08 +01:00
support Add Canary Release Task using K8s and Istio 2020-08-18 08:42:08 +01:00
istio-canary-release.yaml Update all images using openshift to latest stable 4.6 2021-01-05 10:15:11 +00:00
README.md Update self reference from master to main 🧙 2021-03-19 11:09:49 +00:00

Canary Release using Istio

The following task can be used to do canary deployment by doing a canary traffic routing to the deployed versions.

When the new version of application is deployed, you can start routing a few selected users to it. As you gain more confidence in the new version, you can start releasing it to more servers in your infrastructure and routing more users to it.

For more details about canary release please refer here

PRE-REQUISITE: Istio should already be installed in the same cluster.

Installing the tasks

  1. For Application Manifests deployment we can use the existing kubenetes-actions task from the catalog
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/kubernetes-actions/0.1/kubernetes-actions.yaml
  1. For Istio Services
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/istio-canary-release/0.1/istio-canary-release.yaml

Installing the ClusterRoleBinding

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/istio-canary-release/0.1/support/clusterrolebinding.yaml

Workspaces

  • deployment-manifest-dir: The workspace in which ConfigMap containing all the deployment manifests will be mounted.
  • istio-manifest-dir: The workspace in which ConfigMap containing the istio related manifests will be mounted.

Params for Canary-Istio-Deploy

  • VS_NAME: The name of the VirtualService
  • V1_WEIGHT: The traffic weight to be diverted to existing version v1
  • V2_WEIGHT: The traffic weight to be diverted to new version v2

Note: The above parameters are used in case we need to do traffic splitting using virtual service and for creating a VirtualService then use the ConfigMap as shown below.

Usage

  1. Create ConfigMap for Istio manifests
kubectl create configmap istio --from-file="./samples/application/app-gateway.yaml"
  1. Create ConfigMap for Deployment manifests
kubectl create configmap deployment --from-file="isto-canary-release/samples/application/myapp.yaml"

In case of app deployment and configuring Istio follow this example.

In case of just re-configuring the Istio follow this example.