Upgrade Guide
This document describes how to upgrade Flagger.
Upgrade canaries v1alpha3 to v1beta1
Canary CRD changes in canaries.flagger.app/v1beta1
:
the
spec.canaryAnalysis
field has been deprecated and replaced withspec.analysis
the
spec.analysis.interval
andspec.analysis.threshold
fields are requiredthe
status.lastAppliedSpec
andstatus.lastPromotedSpec
hashing algorithm changed tohash/fnv
the
spec.analysis.alerts
array can referencealertproviders.flagger.app/v1beta1
resourcesthe
spec.analysis.metrics[].templateRef
can reference ametrictemplate.flagger.app/v1beta1
resourcethe
metric.threshold
field has been deprecated and replaced withmetric.thresholdRange
the
metric.query
field has been deprecated and replaced withmetric.templateRef
the
spec.ingressRef.apiVersion
acceptsnetworking.k8s.io/v1beta1
the
spec.targetRef
can referenceDaemonSet
kindthe
spec.service.meshName
field has been deprecated and no longer used forprovider: appmesh:v1beta2
Upgrade procedure:
install the
v1beta1
CRDsupdate Flagger deployment
replace
apiVersion: flagger.app/v1alpha3
withapiVersion: flagger.app/v1beta1
in all canary manifestsreplace
spec.canaryAnalysis
withspec.analysis
in all canary manifestsupdate canary manifests in cluster
Note that after upgrading Flagger, all canaries will be triggered as the hash value used for tracking changes is computed differently. You can set spec.skipAnalysis: true
in all canary manifests before upgrading Flagger, do the upgrade, wait for Flagger to finish the no-op promotions and finally set skipAnalysis
to false
.
Update builtin metrics:
replace
threshold
withthresholdRange.min
for request-success-ratereplace
threshold
withthresholdRange.max
for request-duration
Istio telemetry v2
Istio 1.5 comes with a breaking change for Flagger uses. In Istio telemetry v2 the metric istio_request_duration_seconds_bucket
has been removed and replaced with istio_request_duration_milliseconds_bucket
and this breaks the request-duration
metric check.
If are using Istio 1.4, you can create a metric template using the old duration metric like this:
In the canary manifests, replace the request-duration
metric with latency
:
Last updated