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
vinamra28 d3a2dd5a9d Add Canary Release Task using K8s and Istio
The following task can be used to do canary release using K8s and Istio.

Signed-off-by: vinamra28 <vinjain@redhat.com>
2020-08-18 08:42:08 +01: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 Add Canary Release Task using K8s and Istio 2020-08-18 08:42:08 +01:00
README.md Add Canary Release Task using K8s and Istio 2020-08-18 08:42:08 +01: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/master/task/kubernetes-actions/0.1/kubernetes-actions.yaml
  1. For Istio Services
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/task/istio-canary-release/0.1/istio-canary-release.yaml

Installing the ClusterRoleBinding

kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/master/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.