Canary
Initial state
In our initial situation, we have a single IstioOperator
object pegged on version 1.1.0 as follows
❯ helm template chart
---
# Source: chart/templates/main.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
annotations:
meta.helm.sh/release-name: istio-system-istio
meta.helm.sh/release-namespace: istio-system
labels:
app.kubernetes.io/managed-by: Helm
helm.toolkit.fluxcd.io/name: istio
helm.toolkit.fluxcd.io/namespace: bigbang
name: istiocontrolplane
namespace: istio-system
spec:
revision: 1.1.0
Canary Deployment
As part of our testing of upgrades, we want to deploy a new (additional) version of the IstioOperator
to test version 1.2.0 as follows:
---
# Source: chart/templates/canary.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
annotations:
meta.helm.sh/release-name: istio-system-istio
meta.helm.sh/release-namespace: istio-system
labels:
app.kubernetes.io/managed-by: Helm
helm.toolkit.fluxcd.io/name: istio
helm.toolkit.fluxcd.io/namespace: bigbang
name: istiocontrolplane-canary
namespace: istio-system
spec:
revision: 1.2
---
# Source: chart/templates/main.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
annotations:
meta.helm.sh/release-name: istio-system-istio
meta.helm.sh/release-namespace: istio-system
labels:
app.kubernetes.io/managed-by: Helm
helm.toolkit.fluxcd.io/name: istio
helm.toolkit.fluxcd.io/namespace: bigbang
name: istiocontrolplane
namespace: istio-system
spec:
revision: 1.1.0
Remove Canary
Once the canary is accepted, we can deploy the new version of the software:
❯ helm template chart --set tag=1.2
---
# Source: chart/templates/main.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
annotations:
meta.helm.sh/release-name: istio-system-istio
meta.helm.sh/release-namespace: istio-system
labels:
app.kubernetes.io/managed-by: Helm
helm.toolkit.fluxcd.io/name: istio
helm.toolkit.fluxcd.io/namespace: bigbang
name: istiocontrolplane
namespace: istio-system
spec:
revision: 1.2
which updates the initial IstioOperator object with the new version.