CI Procedure for Adding an ECD Using Green/Blue or Canary Upgrade Strategy(3.0)
Perform the following steps to add an ECD using the Green/Blue or Canary Upgrade strategy:
- Perform all steps mentioned under section CI Procedure for Adding a New Workflow Configuration.
Edit the
values.yaml
file to include at least these fields:name: <name of your ECD> productionDeployment: #The weight is only needed when using Canary deployment with istio weight: 100 #This packageImage field is replaced by the install.sh packageImage: THIS_IS_A_NEW_INSTALLATION #The extensionName needs to be different from the one under canaryDeployment extensionName: canaryDeployment: #The weight is only needed when using Canary deployment with istio weight: 0 #This packageImage field should always have the replace text packageImage: REPLACE_ME_WITH_PACKAGE_IMAGE extensionName: -canary
- Copy the ECD YAML file so you have two identical YAML files but with different file names.
Edit the file intended for production deployment to include this in the metadata section:
metadata: name: "{{ .Values.name }}{{ .Values.productionDeployment.extensionName }}" labels: group: "{{ .Values.name }}" canary: "false"
In the spec section change ecGroups and add packageImage like below:
spec: ecGroups: "{{ .Values.name }}{{ .Values.productionDeployment.extensionName }}" packageImage: "{{ .Values.productionDeployment.packageImage }}"
Edit the file intended for Canary deployment to include this in the metadata section:
metadata: name: "{{ .Values.name }}{{ .Values.canaryDeployment.extensionName }}" labels: group: "{{ .Values.name }}" canary: "true"
In the spec section change ecGroups and add packageImage like below:
spec: ecGroups: "{{ .Values.name }}{{ .Values.canaryDeployment.extensionName }}" packageImage: "{{ .Values.canaryDeploymentt.packageImage }}"
- Optional step: When using Istio for the Canary deployment you also need to add a rules.yaml, including services and gateways for Istio. See the example in the httpDemo Helm chart in the Helm folder in the downloaded CI/CD pipeline example.
- Commit and push all changes to Git.