1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-21 05:55:35 +00:00
catalog/task/istio-canary-release/0.1
PuneetPunamiya 86d844dbc6 Fixes installations instructions in readme
Signed-off-by: Puneet Punamiya ppunamiy@redhat.com
2022-08-25 08:15:56 +02: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 linux/amd64 platform annotation to the rest of the tasks 2021-10-29 17:08:38 +01:00
README.md Fixes installations instructions in readme 2022-08-25 08:15:56 +02: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://api.hub.tekton.dev/v1/resource/tekton/task/kubernetes-actions/0.1/raw
  1. For Istio Services
kubectl apply -f https://api.hub.tekton.dev/v1/resource/tekton/task/istio-canary-release/0.1/raw

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.

Platforms

The Task can be run on linux/amd64 platform.

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.