diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 0d4006b8..9b1d6fcc 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -16,17 +16,20 @@ jobs: kind: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: provider: + # service mesh - istio - linkerd + - osm + - kuma + # ingress controllers - contour - nginx - traefik - gloo - skipper - - osm - - kuma - kubernetes steps: - name: Checkout @@ -34,7 +37,7 @@ jobs: - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: - version: "v0.11.0" + version: "v0.11.1" image: kindest/node:v1.21.1@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad - name: Build container image run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b05a30..84982ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,29 @@ All notable changes to this project are documented in this file. +## 1.17.0 + +**Release date:** 2022-01-11 + +This release comes with support for [Kuma Service Mesh](https://kuma.io/). +For more details see the [Kuma Progressive Delivery tutorial](https://docs.flagger.app/tutorials/kuma-progressive-delivery). + +To differentiate alerts based on the cluster name, you can configure Flagger with the `-cluster-name=my-cluster` +command flag, or with Helm `--set clusterName=my-cluster`. + +#### Features + +- Add kuma support for progressive traffic shifting canaries + [#1085](https://github.com/fluxcd/flagger/pull/1085) + [#1093](https://github.com/fluxcd/flagger/pull/1093) + +#### Improvements + +- Publish a Software Bill of Materials (SBOM) + [#1094](https://github.com/fluxcd/flagger/pull/1094) +- Add cluster name to flagger cmd args for altering + [#1041](https://github.com/fluxcd/flagger/pull/1041) + ## 1.16.1 **Release date:** 2021-12-17 diff --git a/README.md b/README.md index a36f21d6..e8c24372 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ by gradually shifting traffic to the new version while measuring metrics and run ![flagger-overview](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-overview.png) Flagger implements several deployment strategies (Canary releases, A/B testing, Blue/Green mirroring) -using a service mesh (App Mesh, Istio, Linkerd, Open Service Mesh) +using a service mesh (App Mesh, Istio, Linkerd, Open Service Mesh, Kuma) or an ingress controller (Contour, Gloo, NGINX, Skipper, Traefik) for traffic routing. For release analysis, Flagger can query Prometheus, Datadog, New Relic, CloudWatch, Dynatrace, InfluxDB and Stackdriver and for alerting it uses Slack, MS Teams, Discord, Rocket and Google Chat. @@ -38,12 +38,13 @@ Flagger documentation can be found at [docs.flagger.app](https://docs.flagger.ap * [App Mesh](https://docs.flagger.app/tutorials/appmesh-progressive-delivery) * [Istio](https://docs.flagger.app/tutorials/istio-progressive-delivery) * [Linkerd](https://docs.flagger.app/tutorials/linkerd-progressive-delivery) + * [Open Service Mesh (OSM)](https://docs.flagger.app/tutorials/osm-progressive-delivery) + * [Kuma Service Mesh](https://docs.flagger.app/tutorials/kuma-progressive-delivery) * [Contour](https://docs.flagger.app/tutorials/contour-progressive-delivery) * [Gloo](https://docs.flagger.app/tutorials/gloo-progressive-delivery) * [NGINX Ingress](https://docs.flagger.app/tutorials/nginx-progressive-delivery) * [Skipper](https://docs.flagger.app/tutorials/skipper-progressive-delivery) * [Traefik](https://docs.flagger.app/tutorials/traefik-progressive-delivery) - * [Open Service Mesh (OSM)](https://docs.flagger.app/tutorials/osm-progressive-delivery) * [Kubernetes Blue/Green](https://docs.flagger.app/tutorials/kubernetes-blue-green) ### Who is using Flagger @@ -183,17 +184,17 @@ For more details on how the canary analysis and promotion works please [read the **Service Mesh** -| Feature | App Mesh | Istio | Linkerd | Open Service Mesh | SMI | Kubernetes CNI | -| ------------------------------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | -| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | -| Blue/Green deployments (traffic switch) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Blue/Green deployments (traffic mirroring) | :heavy_minus_sign: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | -| Webhooks (acceptance/load testing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Manual gating (approve/pause/resume) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Request success rate check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Feature | App Mesh | Istio | Linkerd | Kuma | OSM | SMI | Kubernetes CNI | +|--------------------------------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------|--------------------| +| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | +| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +| Blue/Green deployments (traffic switch) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Blue/Green deployments (traffic mirroring) | :heavy_minus_sign: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | :heavy_minus_sign: | +| Webhooks (acceptance/load testing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Manual gating (approve/pause/resume) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Request success rate check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | +| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | +| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | For other SMI compatible service mesh solutions like Consul Connect or Nginx Service Mesh, [Prometheus MetricTemplates](https://docs.flagger.app/usage/metrics#prometheus) can be used to implement @@ -201,16 +202,16 @@ the request success rate and request duration checks. **Ingress** -| Feature | Contour | Gloo | NGINX | Skipper | Traefik | -| ------------------------------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | -| Blue/Green deployments (traffic switch) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Webhooks (acceptance/load testing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Manual gating (approve/pause/resume) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Request success rate check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | :heavy_check_mark: | -| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | :heavy_check_mark: | -| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Feature | Contour | Gloo | NGINX | Skipper | Traefik | +|-------------------------------------------|--------------------|--------------------|--------------------|--------------------|--------------------| +| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_minus_sign: | +| Blue/Green deployments (traffic switch) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Webhooks (acceptance/load testing) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Manual gating (approve/pause/resume) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | +| Request success rate check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | :heavy_check_mark: | +| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | :heavy_check_mark: | +| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ### Roadmap diff --git a/artifacts/flagger/deployment.yaml b/artifacts/flagger/deployment.yaml index e3829452..3947aa58 100644 --- a/artifacts/flagger/deployment.yaml +++ b/artifacts/flagger/deployment.yaml @@ -22,7 +22,7 @@ spec: serviceAccountName: flagger containers: - name: flagger - image: ghcr.io/fluxcd/flagger:1.16.1 + image: ghcr.io/fluxcd/flagger:1.17.0 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/charts/flagger/Chart.yaml b/charts/flagger/Chart.yaml index 0bdeccb2..3d19654d 100644 --- a/charts/flagger/Chart.yaml +++ b/charts/flagger/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: flagger -version: 1.16.1 -appVersion: 1.16.1 +version: 1.17.0 +appVersion: 1.17.0 kubeVersion: ">=1.16.0-0" engine: gotpl description: Flagger is a progressive delivery operator for Kubernetes diff --git a/charts/flagger/README.md b/charts/flagger/README.md index 3ef10c6d..209be8bc 100644 --- a/charts/flagger/README.md +++ b/charts/flagger/README.md @@ -59,6 +59,25 @@ $ helm upgrade -i flagger flagger/flagger \ --set metricsServer=http://appmesh-prometheus:9090 ``` + +To install Flagger for **Open Service Mesh** (requires OSM to have been installed with Prometheus): + +```console +$ helm upgrade -i flagger flagger/flagger \ + --namespace=osm-system \ + --set meshProvider=osm \ + --set metricsServer=http://osm-prometheus.osm-system.svc:7070 +``` + +To install Flagger for **Kuma Service Mesh** (requires Kuma to have been installed with Prometheus): + +```console +$ helm upgrade -i flagger flagger/flagger \ + --namespace=kuma-system \ + --set meshProvider=kuma \ + --set metricsServer=http://prometheus-server.kuma-metrics:80 +``` + To install Flagger and Prometheus for **NGINX** Ingress (requires controller metrics enabled): ```console @@ -96,15 +115,6 @@ $ helm upgrade -i flagger flagger/flagger \ --set meshProvider=traefik ``` -To install Flagger for **Open Service Mesh (OSM)** (requires OSM to have been installed with Prometheus): - -```console -$ helm upgrade -i flagger flagger/flagger \ - --namespace=osm-system \ - --set meshProvider=osm \ - --set metricsServer=http://osm-prometheus.osm-system.svc:7070 -``` - The [configuration](#configuration) section lists the parameters that can be configured during installation. ## Uninstalling the Chart @@ -121,53 +131,54 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the Flagger chart and their default values. -Parameter | Description | Default ---- | --- | --- -`image.repository` | Image repository | `ghcr.io/fluxcd/flagger` -`image.tag` | Image tag | `` -`image.pullPolicy` | Image pull policy | `IfNotPresent` -`logLevel` | Log level | `info` -`metricsServer` | Prometheus URL, used when `prometheus.install` is `false` | `http://prometheus.istio-system:9090` -`prometheus.install` | If `true`, installs Prometheus configured to scrape all pods in the custer | `false` -`prometheus.retention` | Prometheus data retention | `2h` -`selectorLabels` | List of labels that Flagger uses to create pod selectors | `app,name,app.kubernetes.io/name` -`configTracking.enabled` | If `true`, flagger will track changes in Secrets and ConfigMaps referenced in the target deployment | `true` -`eventWebhook` | If set, Flagger will publish events to the given webhook | None -`slack.url` | Slack incoming webhook | None -`slack.proxyUrl` | Slack proxy url | None -`slack.channel` | Slack channel | None -`slack.user` | Slack username | `flagger` -`msteams.url` | Microsoft Teams incoming webhook | None -`msteams.proxyUrl` | Microsoft Teams proxy url | None -`podMonitor.enabled` | If `true`, create a PodMonitor for [monitoring the metrics](https://docs.flagger.app/usage/monitoring#metrics) | `false` -`podMonitor.namespace` | Namespace where the PodMonitor is created | the same namespace -`podMonitor.interval` | Interval at which metrics should be scraped | `15s` -`podMonitor.podMonitor` | Additional labels to add to the PodMonitor | `{}` -`leaderElection.enabled` | If `true`, Flagger will run in HA mode | `false` -`leaderElection.replicaCount` | Number of replicas | `1` -`serviceAccount.create` | If `true`, Flagger will create service account | `true` -`serviceAccount.name` | The name of the service account to create or use. If not set and `serviceAccount.create` is `true`, a name is generated using the Flagger fullname | `""` -`serviceAccount.annotations` | Annotations for service account | `{}` -`ingressAnnotationsPrefix` | Annotations prefix for ingresses | `custom.ingress.kubernetes.io` -`includeLabelPrefix` | List of prefixes of labels that are copied when creating primary deployments or daemonsets. Use * to include all | `""` -`rbac.create` | If `true`, create and use RBAC resources | `true` -`rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `false` -`crd.create` | If `true`, create Flagger's CRDs (should be enabled for Helm v2 only) | `false` -`resources.requests/cpu` | Pod CPU request | `10m` -`resources.requests/memory` | Pod memory request | `32Mi` -`resources.limits/cpu` | Pod CPU limit | `1000m` -`resources.limits/memory` | Pod memory limit | `512Mi` -`affinity` | Node/pod affinities | None -`nodeSelector` | Node labels for pod assignment | `{}` -`threadiness` | Number of controller workers | `2` -`tolerations` | List of node taints to tolerate | `[]` -`istio.kubeconfig.secretName` | The name of the Kubernetes secret containing the Istio shared control plane kubeconfig | None -`istio.kubeconfig.key` | The name of Kubernetes secret data key that contains the Istio control plane kubeconfig | `kubeconfig` -`ingressAnnotationsPrefix` | Annotations prefix for NGINX ingresses | None -`ingressClass` | Ingress class used for annotating HTTPProxy objects, e.g. `contour` | None -`podPriorityClassName` | PriorityClass name for pod priority configuration | "" -`podDisruptionBudget.enabled` | A PodDisruptionBudget will be created if `true` | `false` -`podDisruptionBudget.minAvailable` | The minimal number of available replicas that will be set in the PodDisruptionBudget | `1` +| Parameter | Description | Default | +|------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------| +| `image.repository` | Image repository | `ghcr.io/fluxcd/flagger` | +| `image.tag` | Image tag | `` | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | +| `logLevel` | Log level | `info` | +| `metricsServer` | Prometheus URL, used when `prometheus.install` is `false` | `http://prometheus.istio-system:9090` | +| `prometheus.install` | If `true`, installs Prometheus configured to scrape all pods in the custer | `false` | +| `prometheus.retention` | Prometheus data retention | `2h` | +| `selectorLabels` | List of labels that Flagger uses to create pod selectors | `app,name,app.kubernetes.io/name` | +| `configTracking.enabled` | If `true`, flagger will track changes in Secrets and ConfigMaps referenced in the target deployment | `true` | +| `eventWebhook` | If set, Flagger will publish events to the given webhook | None | +| `slack.url` | Slack incoming webhook | None | +| `slack.proxyUrl` | Slack proxy url | None | +| `slack.channel` | Slack channel | None | +| `slack.user` | Slack username | `flagger` | +| `msteams.url` | Microsoft Teams incoming webhook | None | +| `msteams.proxyUrl` | Microsoft Teams proxy url | None | +| `clusterName` | When specified, Flagger will add the cluster name to alerts | `""` | +| `podMonitor.enabled` | If `true`, create a PodMonitor for [monitoring the metrics](https://docs.flagger.app/usage/monitoring#metrics) | `false` | +| `podMonitor.namespace` | Namespace where the PodMonitor is created | the same namespace | +| `podMonitor.interval` | Interval at which metrics should be scraped | `15s` | +| `podMonitor.podMonitor` | Additional labels to add to the PodMonitor | `{}` | +| `leaderElection.enabled` | If `true`, Flagger will run in HA mode | `false` | +| `leaderElection.replicaCount` | Number of replicas | `1` | +| `serviceAccount.create` | If `true`, Flagger will create service account | `true` | +| `serviceAccount.name` | The name of the service account to create or use. If not set and `serviceAccount.create` is `true`, a name is generated using the Flagger fullname | `""` | +| `serviceAccount.annotations` | Annotations for service account | `{}` | +| `ingressAnnotationsPrefix` | Annotations prefix for ingresses | `custom.ingress.kubernetes.io` | +| `includeLabelPrefix` | List of prefixes of labels that are copied when creating primary deployments or daemonsets. Use * to include all | `""` | +| `rbac.create` | If `true`, create and use RBAC resources | `true` | +| `rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `false` | +| `crd.create` | If `true`, create Flagger's CRDs (should be enabled for Helm v2 only) | `false` | +| `resources.requests/cpu` | Pod CPU request | `10m` | +| `resources.requests/memory` | Pod memory request | `32Mi` | +| `resources.limits/cpu` | Pod CPU limit | `1000m` | +| `resources.limits/memory` | Pod memory limit | `512Mi` | +| `affinity` | Node/pod affinities | None | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `threadiness` | Number of controller workers | `2` | +| `tolerations` | List of node taints to tolerate | `[]` | +| `istio.kubeconfig.secretName` | The name of the Kubernetes secret containing the Istio shared control plane kubeconfig | None | +| `istio.kubeconfig.key` | The name of Kubernetes secret data key that contains the Istio control plane kubeconfig | `kubeconfig` | +| `ingressAnnotationsPrefix` | Annotations prefix for NGINX ingresses | None | +| `ingressClass` | Ingress class used for annotating HTTPProxy objects, e.g. `contour` | None | +| `podPriorityClassName` | PriorityClass name for pod priority configuration | "" | +| `podDisruptionBudget.enabled` | A PodDisruptionBudget will be created if `true` | `false` | +| `podDisruptionBudget.minAvailable` | The minimal number of available replicas that will be set in the PodDisruptionBudget | `1` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade`. For example, diff --git a/charts/flagger/templates/deployment.yaml b/charts/flagger/templates/deployment.yaml index 7da66d67..0418c011 100644 --- a/charts/flagger/templates/deployment.yaml +++ b/charts/flagger/templates/deployment.yaml @@ -138,6 +138,9 @@ spec: {{- if .Values.threadiness }} - -threadiness={{ .Values.threadiness }} {{- end }} + {{- if .Values.clusterName }} + - -cluster-name={{ .Values.clusterName }} + {{- end }} livenessProbe: exec: command: diff --git a/charts/flagger/values.yaml b/charts/flagger/values.yaml index e5e4c70e..cc885636 100644 --- a/charts/flagger/values.yaml +++ b/charts/flagger/values.yaml @@ -2,7 +2,7 @@ image: repository: ghcr.io/fluxcd/flagger - tag: 1.16.1 + tag: 1.17.0 pullPolicy: IfNotPresent pullSecret: @@ -50,6 +50,9 @@ securityContext: # when specified, flagger will publish events to the provided webhook eventWebhook: "" +# when specified, flagger will add the cluster name to alerts +clusterName: "" + slack: user: flagger channel: @@ -135,7 +138,7 @@ tolerations: [] prometheus: # to be used with ingress controllers install: false - image: docker.io/prom/prometheus:v2.23.0 + image: docker.io/prom/prometheus:v2.32.1 pullSecret: retention: 2h # when enabled, it will add a security context for the prometheus pod diff --git a/docs/gitbook/usage/alerting.md b/docs/gitbook/usage/alerting.md index 7cee7a24..0e46a4b0 100644 --- a/docs/gitbook/usage/alerting.md +++ b/docs/gitbook/usage/alerting.md @@ -20,9 +20,10 @@ Once the webhook has been generated. Flagger can be configured to send Slack not ```bash helm upgrade -i flagger flagger/flagger \ --set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ ---set slack.proxy-url=my-http-proxy.com \ # optional http/s proxy +--set slack.proxy=my-http-proxy.com \ # optional http/s proxy --set slack.channel=general \ ---set slack.user=flagger +--set slack.user=flagger \ +--set clusterName=my-cluster ``` Once configured with a Slack incoming **webhook**, @@ -127,6 +128,9 @@ Alert fields: When the severity is set to `warn`, Flagger will alert when waiting on manual confirmation or if the analysis fails. When the severity is set to `error`, Flagger will alert only if the canary analysis fails. +To differentiate alerts based on the cluster name, you can configure Flagger with the `-cluster-name=my-cluster` +command flag, or with Helm `--set clusterName=my-cluster`. + ## Prometheus Alert Manager You can use Alertmanager to trigger alerts when a canary deployment failed: diff --git a/kustomize/base/flagger/kustomization.yaml b/kustomize/base/flagger/kustomization.yaml index d0c5b432..a3795988 100644 --- a/kustomize/base/flagger/kustomization.yaml +++ b/kustomize/base/flagger/kustomization.yaml @@ -9,4 +9,4 @@ resources: images: - name: ghcr.io/fluxcd/flagger newName: ghcr.io/fluxcd/flagger - newTag: 1.16.1 + newTag: 1.17.0 diff --git a/pkg/router/ingress_test.go b/pkg/router/ingress_test.go index 803595be..f330777c 100644 --- a/pkg/router/ingress_test.go +++ b/pkg/router/ingress_test.go @@ -48,9 +48,6 @@ func TestIngressRouter_Reconcile(t *testing.T) { inCanary, err := router.kubeClient.NetworkingV1().Ingresses("default").Get(context.TODO(), canaryName, metav1.GetOptions{}) require.NoError(t, err) - annotation := inCanary.Annotations["kustomize.toolkit.fluxcd.io/checksum"] - assert.Equal(t, "", annotation) - // test initialisation assert.Equal(t, "true", inCanary.Annotations[canaryAn]) assert.Equal(t, "0", inCanary.Annotations[canaryWeightAn]) @@ -184,6 +181,5 @@ func TestIngressRouter_ABTest(t *testing.T) { // test initialisation assert.Equal(t, "true", inCanary.Annotations[canaryAn]) assert.Equal(t, "test", inCanary.Annotations[table.annotation]) - assert.Equal(t, "", inCanary.Annotations["kustomize.toolkit.fluxcd.io/checksum"]) } } diff --git a/pkg/router/util.go b/pkg/router/util.go index 5f389fb0..72e08806 100644 --- a/pkg/router/util.go +++ b/pkg/router/util.go @@ -28,16 +28,7 @@ func includeLabelsByPrefix(labels map[string]string, includeLabelPrefixes []stri } func filterMetadata(meta map[string]string) map[string]string { - res := make(map[string]string) - for k, v := range meta { - // remove Flux ownership - if strings.Contains(k, toolkitMarker) { - continue - } - res[k] = v - } - // prevent Flux from overriding Flagger managed objects - res[toolkitReconcileKey] = toolkitReconcileValue - return res + meta[toolkitReconcileKey] = toolkitReconcileValue + return meta } diff --git a/pkg/version/version.go b/pkg/version/version.go index cfac2b29..386de7d6 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -16,5 +16,5 @@ limitations under the License. package version -var VERSION = "1.16.1" +var VERSION = "1.17.0" var REVISION = "unknown"