Compare commits

..

774 Commits

Author SHA1 Message Date
Stefan Prodan
381c19b952 Merge pull request #1301 from fluxcd/release-v1.24.1
Release v1.24.1
2022-10-26 17:09:26 +03:00
Stefan Prodan
50f9255af2 Release v1.24.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-26 16:44:26 +03:00
Stefan Prodan
a7df3457ad Merge pull request #1300 from mdolinin/fix/gloo-non-default-service-name-corretly-get-routes
fix(gloo): Use correct route table name in case service name was overwritten
2022-10-26 15:32:32 +03:00
mdolinin
647f624554 fix(gloo): Update tests to not check gateway deployment. Was removed from >1.12.x
Signed-off-by: mdolinin <dmo.builder@gmail.com>
2022-10-25 11:18:26 -04:00
mdolinin
3d3e051f03 fix(gloo): Update Gloo to the latest stable version
Signed-off-by: mdolinin <dmo.builder@gmail.com>
2022-10-25 07:52:15 -04:00
mdolinin
4c0b2beb63 fix(gloo): Use correct route table name in case service name was overwritten
Signed-off-by: mdolinin <dmo.builder@gmail.com>
2022-10-24 21:38:08 -04:00
Stefan Prodan
ec44f64465 Merge pull request #1298 from fluxcd/dependabot/github_actions/goreleaser/goreleaser-action-3
Bump goreleaser/goreleaser-action from 2 to 3
2022-10-24 17:25:52 +03:00
Stefan Prodan
19d4e521a3 Merge pull request #1297 from fluxcd/dependabot/github_actions/docker/login-action-2
Bump docker/login-action from 1 to 2
2022-10-24 17:25:34 +03:00
Stefan Prodan
85a3b7c388 Merge pull request #1296 from fluxcd/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-10-24 17:25:15 +03:00
Stefan Prodan
26ec719c67 Merge pull request #1295 from fluxcd/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-10-24 17:24:57 +03:00
Stefan Prodan
66364bb2c9 Merge pull request #1299 from fluxcd/dependabot/github_actions/docker/build-push-action-3
Bump docker/build-push-action from 2 to 3
2022-10-24 17:24:34 +03:00
dependabot[bot]
f9f8d7e71e Bump docker/build-push-action from 2 to 3
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:36:21 +00:00
dependabot[bot]
bdbd1fb1f0 Bump goreleaser/goreleaser-action from 2 to 3
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:36:16 +00:00
dependabot[bot]
b3112a53f1 Bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:36:13 +00:00
dependabot[bot]
f1f4e68673 Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:36:10 +00:00
dependabot[bot]
9b56445621 Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-24 11:36:04 +00:00
Stefan Prodan
f5f3d92d3d ci: Pin Helm and Cosign action version
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-23 15:38:36 +03:00
Stefan Prodan
4d074799ca ci: Use Helm action from fluxcd org
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-23 13:36:32 +03:00
Stefan Prodan
d38a2406a7 Release v1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-23 13:07:10 +03:00
Stefan Prodan
25ccfca835 Merge pull request #1294 from fluxcd/install-with-flux-oci
docs: Add guide on how to install Flagger with Flux OCI
2022-10-23 12:43:40 +03:00
Stefan Prodan
487b6566ee docs: Add guide on how to install Flagger with Flux OCI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-23 12:15:57 +03:00
Stefan Prodan
14caeb12ad Merge pull request #1293 from fluxcd/push-flux-oci
ci: Publish signed Helm charts and manifests to GHCR
2022-10-22 15:45:16 +03:00
Stefan Prodan
cf8fcd0539 ci: Publish signed Helm charts and manifests to GHCR
- Push Flagger Helm chart to `ghcr.io/fluxcd/charts/flagger`
- Sign Flagger Helm chart with Cosign and GitHub OIDC
- Push install manifests and overlays from `./kustomize` with Flux CLI to `ghcr.io/fluxcd/flagger-manifests`
- Sign Flagger manifests with Cosign and GitHub OIDC

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-22 14:46:20 +03:00
Stefan Prodan
d8387a351e Merge pull request #1292 from fluxcd/cosign-keyless
ci: Sign release and containers with Cosign and GitHub OIDC
2022-10-22 14:33:59 +03:00
Stefan Prodan
300cd24493 ci: Sign release and containers with Cosign and GitHub OIDC
- Replace the Cosign static key with GitHub Actions OIDC when signing the flagger container image
- Sign the GitHub release assets checksums with Cosign keyless
- Sign the load-tester container image with Cosign keyless

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 16:39:29 +03:00
Stefan Prodan
fb66d24f89 Merge pull request #1288 from fluxcd/dependabot/github_actions/stefanprodan/helm-gh-pages-1.6.0
Bump stefanprodan/helm-gh-pages from 1.3.0 to 1.6.0
2022-10-21 12:33:36 +03:00
Stefan Prodan
f1fc8c067e Merge pull request #1287 from fluxcd/dependabot/github_actions/actions/cache-3.0.11
Bump actions/cache from 1 to 3.0.11
2022-10-21 12:33:16 +03:00
Stefan Prodan
da1ee05c0a Merge pull request #1290 from fluxcd/dependabot/github_actions/docker/metadata-action-4
Bump docker/metadata-action from 3 to 4
2022-10-21 12:32:53 +03:00
Stefan Prodan
57099ecd43 Merge pull request #1291 from fluxcd/dependabot/github_actions/codecov/codecov-action-3
Bump codecov/codecov-action from 1 to 3
2022-10-21 12:32:30 +03:00
Stefan Prodan
8c5b41bbe6 Merge pull request #1289 from fluxcd/dependabot/github_actions/actions/setup-go-3
Bump actions/setup-go from 2 to 3
2022-10-21 12:32:07 +03:00
dependabot[bot]
7bc716508c Bump codecov/codecov-action from 1 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 09:30:38 +00:00
dependabot[bot]
d82d9765e1 Bump docker/metadata-action from 3 to 4
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3 to 4.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 09:30:33 +00:00
dependabot[bot]
74e570c198 Bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 09:30:27 +00:00
dependabot[bot]
6adf51083e Bump stefanprodan/helm-gh-pages from 1.3.0 to 1.6.0
Bumps [stefanprodan/helm-gh-pages](https://github.com/stefanprodan/helm-gh-pages) from 1.3.0 to 1.6.0.
- [Release notes](https://github.com/stefanprodan/helm-gh-pages/releases)
- [Commits](https://github.com/stefanprodan/helm-gh-pages/compare/v1.3.0...v1.6.0)

---
updated-dependencies:
- dependency-name: stefanprodan/helm-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 09:30:22 +00:00
dependabot[bot]
a5be82a7d3 Bump actions/cache from 1 to 3.0.11
Bumps [actions/cache](https://github.com/actions/cache) from 1 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v1...v3.0.11)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 09:30:16 +00:00
Stefan Prodan
83693668ed Merge pull request #1286 from fluxcd/ci-perms
ci: Adjust GitHub workflow permissions
2022-10-21 12:29:33 +03:00
Stefan Prodan
c2929694a6 ci: Enable Dependabot for GH Actions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 12:11:33 +03:00
Stefan Prodan
82db9ff213 ci: Adjust GitHub workflow permissions
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 11:55:37 +03:00
Stefan Prodan
5e853bb589 Merge pull request #1285 from fluxcd/governance-doc
Add link to Flux governance document
2022-10-21 11:26:46 +03:00
Stefan Prodan
9e1fad3947 Add link to Flux governance document
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-21 11:24:09 +03:00
Stefan Prodan
a4f5a983ba Merge pull request #1284 from fluxcd/release-1.23.0
Release v1.23.0
2022-10-20 14:05:25 +03:00
Stefan Prodan
08d7520458 Release v1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-20 12:59:54 +03:00
Stefan Prodan
283de16660 Merge pull request #1283 from fluxcd/kubernetes-1.25.3
Update Kubernetes packages to v1.25.3
2022-10-20 12:46:36 +03:00
Stefan Prodan
5e47ae287b Update Kubernetes packages to v1.25.3
Update dependencies and fix CVE-2022-32149 of `golang.org/x/text`

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-20 12:20:32 +03:00
Stefan Prodan
e7e155048d Merge pull request #1265 from ebar0n/patch-1
Use Helm to install loadtester in kubernetes-blue-green docs
2022-10-18 17:49:44 +03:00
Stefan Prodan
8197073cf0 Merge pull request #1270 from RicardoLorenzo/slack_bot_token_authentication
Slack bot token authentication
2022-10-18 17:48:00 +03:00
Stefan Prodan
310111bb8d Merge pull request #1282 from fluxcd/contour-1.22
Bump Contour to v1.22 in e2e tests
2022-10-18 17:28:06 +03:00
Ricardo Lorenzo
3dd667f3b3 Slack bot token authentication
Signed-off-by: Ricardo Lorenzo <rlorenzo@payfone.com>
2022-10-18 14:56:08 +01:00
Stefan Prodan
e06334cd12 Bump Contour to v1.22 in e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-10-18 16:46:01 +03:00
Sanskar Jaiswal
8d8b99dc78 Merge pull request #1279 from aryan9600/go-1.19
update Go to 1.19
2022-10-12 14:03:12 +05:30
Sanskar Jaiswal
3418488902 update Go to 1.19
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-10-12 12:40:15 +05:30
Sanskar Jaiswal
b96f6f0920 Merge pull request #1276 from aryan9600/fix-hostnames
gatewayapi: fix reconcilation of nil hostnames
2022-10-10 17:00:10 +05:30
Sanskar Jaiswal
e593f2e258 gatewayapi: fix reconcilation of nil hostnames
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-10-10 16:29:21 +05:30
Stefan Prodan
7b6c37ea1f Merge pull request #1275 from ashokhein/include-cluster-name
Include cluster name in all alerts
2022-10-06 15:31:56 +02:00
ashokhein
4dbeec02c8 Include cluster name in all alerts
Signed-off-by: ashokhein <ashokhein@gmail.com>
2022-10-05 12:16:57 +00:00
Sanskar Jaiswal
1b2df99799 Merge pull request #1267 from oistein/log-cmd-output-to-log
logCmdOutput to logger instead of stdout
2022-09-27 14:39:21 +05:30
Øistein Sletten Løvik
6d72050e81 logCmdOutput to logger instead of stdout
Signed-off-by: Øistein Sletten Løvik <oistein@oistein.org>
2022-09-26 13:52:59 +02:00
Edwar Baron
b97a87a1b4 Update kubernetes-blue-green.md
Signed-off-by: Edwar Baron <edwar.baron@gmail.com>
2022-09-02 10:10:06 -05:00
Sanskar Jaiswal
89b0487376 Merge pull request #1264 from glindstedt/patch-1
Add `app.kubernetes.io/version` label to chart
2022-09-01 15:41:59 +05:30
Gustaf Lindstedt
0ae53e415c Add app.kubernetes.io/version label to chart
Add `app.kubernetes.io/version` label as described in https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

This is useful if you have many deployments in different clusters and want to be able to monitor what versions you have deployed using something like `kube_pod_labels` from kube-state-metrics.

Signed-off-by: Gustaf Lindstedt <gustaf.lindstedt@embark-studios.com>
2022-08-30 14:22:32 +02:00
Sanskar Jaiswal
915c200c7b Merge pull request #1262 from fluxcd/release-v1.22.2
Release v1.22.2
2022-08-29 20:18:23 +05:30
Sanskar Jaiswal
a4941bd764 Release v1.22.2
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-29 18:37:38 +05:30
Sanskar Jaiswal
5123cbae00 Merge pull request #1261 from fluxcd/release-ld-0.24.0
Release loadtester v0.24.0
2022-08-29 17:55:02 +05:30
Sanskar Jaiswal
135f96d507 Release loadtester v0.24.0
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-29 15:27:01 +05:30
Sanskar Jaiswal
aa08ea9160 Merge pull request #1259 from aryan9600/update-deps
Update dependencies
2022-08-29 15:07:38 +05:30
Sanskar Jaiswal
fb80eea144 update helm and grpc-health-probe for loadtester
Update Helm to v3.9.4
Update grpc-health-probe to v0.4.12

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-26 22:35:08 +05:30
Sanskar Jaiswal
bebcf1c7d4 update go.mod deps
Update Kubernetes packages to v0.25.0
Update github.com/emicklei/go-restful to fix CVE-2022-1996

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-26 22:32:58 +05:30
Sanskar Jaiswal
f39f0ef101 Merge pull request #1258 from aryan9600/knative-roadmap
docs: add knative support to roadmap
2022-08-26 12:51:54 +05:30
Sanskar Jaiswal
f2f4c8397d docs: add knative support to roadmap
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-26 12:47:43 +05:30
Sanskar Jaiswal
ae4613fa76 Merge pull request #1253 from andylibrian/scale-from-zero-use-hpa-minreplicas
If HPA is set, it uses HPA minReplicas when scaling up the canary
2022-08-24 13:51:22 +05:30
Andy Librian
8b1155123d use min replicas set by autoscaler in ScaleFromZero if autoscaler is specified
Without this, the canary replicas are updated twice:
to 1 replica then after a few seconds to the value of HPA minReplicas.

In some cases, when updated to 1 replica (before updated by HPA
controller to the minReplicas), it's considered ready: 1 of 1 (readyThreshold 100%),
and the canary weight is advanced to receive traffic with less capacity
than expected.

Co-Authored-By: Joshua Gibeon <joshuagibeon7719@gmail.com>
Co-authored-by: Sanskar Jaiswal <hey@aryan.lol>

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2022-08-18 13:23:46 +07:00
Sanskar Jaiswal
e65dfbb659 Merge pull request #1254 from aryan9600/verify-crds
Add target and script to keep crds in sync
2022-08-11 15:27:13 +05:30
Sanskar Jaiswal
fe37bdd9c7 add target and script to keep crds in sync
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-11 14:23:32 +05:30
Stefan Prodan
f449ee1878 Merge pull request #1246 from fluxcd/loadtester-0.23.0
Release loadtester v0.23.0
2022-08-01 16:31:44 +03:00
Stefan Prodan
47b6807471 Release loadtester v0.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-01 13:49:24 +03:00
Stefan Prodan
f93708e90f Merge pull request #1244 from aryan9600/release-v1.22.1
Release v1.22.1
2022-08-01 13:04:52 +03:00
Sanskar Jaiswal
5285b76746 Release v1.22.1
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-08-01 15:03:33 +05:30
Stefan Prodan
1a4d8b965a Merge pull request #1243 from fluxcd/update-go-alpine
Update Go to 1.18 and Alpine to 3.16
2022-07-29 16:22:36 +03:00
Stefan Prodan
11209fe05d Update Go to 1.18 and Alpine to 3.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-07-29 15:36:25 +03:00
Stefan Prodan
09c1eec8f3 Merge pull request #1233 from ImOwly/main
Update README
2022-07-29 15:20:54 +03:00
Stefan Prodan
d3373447c3 Merge pull request #1239 from sympatheticmoose/patch-1
Clarify HPA API requirement
2022-07-29 15:19:57 +03:00
Stefan Prodan
d4e54fe966 Merge pull request #1242 from aryan9600/fix-hpa-fallback
Fix fallback logic for HPAv2 to v2beta2
2022-07-29 15:19:06 +03:00
Sanskar Jaiswal
a5c284cabb fix fallback logic for HPAv2 to v2beta2
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-07-29 16:33:30 +05:30
Sanskar Jaiswal
80bae41df4 Merge pull request #1241 from vidhartbhatia/fixKEDASO
Update KEDA ScaledObject API to include MetricType for Triggers
2022-07-29 16:33:06 +05:30
Sanskar Jaiswal
f5c267144e fix KEDA version typo in tutorial
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-07-29 16:03:10 +05:30
Vidhart Bhatia
25a33fe58f Update ScaledObject API to KEDA 2.7.1
Signed-off-by: Vidhart Bhatia <vidhartbhatia@hotmail.com>
Co-authored-by: Sanskar Jaiswal <sanskar.jaiswal@weave.worksl>
2022-07-29 14:50:29 +05:30
David Harris
bab12dc99b clarify HPA API requirement
Signed-off-by: David Harris <david.harris@weave.works>
2022-07-20 17:25:08 +01:00
Owly
1abb1f16d4 Update README
Signed-off-by: Owly <59724243+ImOwly@users.noreply.github.com>
2022-07-12 18:14:33 -07:00
Stefan Prodan
7cf843d6f4 Merge pull request #1228 from fluxcd/release-v1.22.0
Release v1.22.0
2022-07-12 14:01:38 +03:00
Sanskar Jaiswal
a8444a6328 Release v1.22.0
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-07-11 17:34:25 +05:30
Sanskar Jaiswal
ca044d3577 Merge pull request #1223 from Mpluya/patch-1
include Contour retryOn in the sample canary
2022-07-11 15:26:04 +05:30
Sanskar Jaiswal
76bac5d971 Merge pull request #1216 from aryan9600/keda-scaled-objects
Add support for KEDA ScaledObjects as an auto scaler
2022-07-08 19:21:22 +05:30
Sanskar Jaiswal
f68f291b3d update rbac for helm chart
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-07-01 10:17:37 +05:30
Sanskar Jaiswal
b108672fad use a better query to test primary scaledobject reconciliation
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-07-01 09:43:46 +05:30
Sanskar Jaiswal
377a8f48e2 add tutorial for scaledobjects
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-30 17:15:15 +05:30
Sanskar Jaiswal
a098d04d64 update primary scaler query handling to consider mutliple triggers
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-30 17:06:45 +05:30
Sanskar Jaiswal
5e4b70bd51 Merge pull request #1222 from yokoyang/doc-update-for-flagger-install-on-asm
update guide for flagger on aliyun ASM
2022-06-23 12:34:44 +05:30
Sanskar Jaiswal
9ce931abb4 Merge pull request #1224 from Freydal/fix-optional-metric-template-namespace
Reintroducing empty check for metric template references.
2022-06-23 12:31:51 +05:30
Nick Freyaldenhoven
072d9b9850 Removing stray blank line.
Signed-off-by: Nick Freyaldenhoven <freyaldenhovennc@gmail.com>
2022-06-22 08:41:45 -05:00
Mae Large
1bb4afaeac updated retryOn supported values link to point to contour's api doc
Signed-off-by: Mae Large <mlarge@vmware.com>
2022-06-22 06:10:42 -05:00
Mae Anne Large
4dd6102a0f include Contour retryOn in the sample canary
without this change the HTTPProxy - podinfo.test was not getting created due to the following warning:
```
test               4m11s       Warning   Synced                         canary/podinfo                               HTTPProxy podinfo.test create error: HTTPProxy.projectcontour.io "podinfo" is invalid: spec.routes.retryPolicy.retryOn: Unsupported value: "": supported values: "5xx", "gateway-error", "reset", "connect-failure", "retriable-4xx", "refused-stream", "retriable-status-codes", "retriable-headers", "cancelled", "deadline-exceeded", "internal", "resource-exhausted", "unavailable"
```

Signed-off-by: Mae Anne Large <Mpluya@users.noreply.github.com>
Signed-off-by: Mae Large <mlarge@vmware.com>
2022-06-22 06:10:42 -05:00
奇方
4f64377480 update install guide on alibaba service mesh
Signed-off-by: 奇方 <qifang.ly@alibaba-inc.com>
2022-06-22 17:56:27 +08:00
Nick Freyaldenhoven
31856a2f46 Reintroducing the old empty check for metric template references. Reverting removal in commit 7df1beef85 to support the optianl namespace. Adding test for future valdiation.
Signed-off-by: Nick Freyaldenhoven <freyaldenhovennc@gmail.com>
2022-06-21 10:28:54 -05:00
Sanskar Jaiswal
358391bfde Merge pull request #1204 from shipt/contour-service-metric-fix
fix contour prom query for when service name is overwritten
2022-06-21 14:54:15 +05:30
Sanskar Jaiswal
7b2c005d9b Merge pull request #1205 from shipt/bugfix-contour-annotation-override
fix contour httproxy annotations overwrite
2022-06-21 13:51:40 +05:30
Stefan Prodan
c31ef8a788 Merge pull request #1221 from sympatheticmoose/patch-1
typo: controller
2022-06-17 17:55:04 +01:00
brandoncate
e1bd004683 fix contour prom query when service name is specified
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-06-17 10:07:00 -05:00
brandoncate
0cecab530f fix contour httproxy annotations overwrite
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-06-17 10:02:02 -05:00
David Harris
844090f842 typo: controller
Signed-off-by: David Harris <david.harris@weave.works>
2022-06-17 10:23:50 +01:00
Stefan Prodan
aa48ad45b7 Merge pull request #1219 from vbelouso/canaries-finalizers
fix: add finalizers to canaries
2022-06-14 16:20:52 +03:00
Daniel Holbach
1967e4857b Merge pull request #1220 from dholbach/fix-typo
typo: boostrap -> bootstrap
2022-06-14 14:22:43 +02:00
Vladimir Belousov
21923d6f87 fix: add finalizers to canaries
Signed-off-by: Vladimir Belousov <vbelouso@redhat.com>
2022-06-14 15:18:38 +03:00
Daniel Holbach
a5912ccd89 typo: boostrap -> bootstrap
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-06-14 13:57:33 +02:00
Sanskar Jaiswal
e4252d8cbd Merge pull request #1210 from aufarg/add-namespace-to-table
charts: Add namespace parameter to parameters table
2022-06-10 18:44:38 +05:30
Sanskar Jaiswal
b01e4cf9ec add e2e tests for KEDA ScaledObjects
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-10 15:32:04 +05:30
Aufar Gilbran
703cfd50b2 charts: Add namespace parameter to parameters table
Signed-off-by: Aufar Gilbran <aufargilbran@gmail.com>
2022-06-10 15:15:25 +05:30
Sanskar Jaiswal
6a1b765a77 add unit tests for ScaledObjectReconciler
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-09 21:38:10 +05:30
Sanskar Jaiswal
b2dc762937 add support for KEDA ScaledObjects via ScaledObjectReconciler
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-09 21:36:57 +05:30
Stefan Prodan
498f065dea Merge pull request #1215 from aryan9600/scaler-reconciler
Fix primary HPA label reconciliation
2022-06-09 19:04:12 +03:00
Sanskar Jaiswal
9d8941176b fix primary hpa label reconciliation
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-09 20:30:53 +05:30
Stefan Prodan
4d2a03c0b2 Merge pull request #1211 from aryan9600/scaler-reconciler
Introduce `ScalerReconciler` and refactor HPA reconciliation
2022-06-08 10:21:02 +03:00
Sanskar Jaiswal
e0e2d5c0e6 refactor hpa reconcile logic to be generic for both versions
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>

for objectmeta as well
2022-06-08 12:25:35 +05:30
Sanskar Jaiswal
9b97bff7b1 add e2e tests for hpa reconciler
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-07 13:43:11 +05:30
Sanskar Jaiswal
f23be1d0ec add unit tests for hpa reconciler
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-07 13:43:11 +05:30
Sanskar Jaiswal
fa595e160c add ScalerReconciler to canary and refactor hpa out of deployment controller
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-07 13:43:11 +05:30
Stefan Prodan
4ea5a48f43 Merge pull request #1212 from aryan9600/update-e2e
e2e: Update providers and Kubernetes to v1.23
2022-06-07 10:58:55 +03:00
Sanskar Jaiswal
6dd8a755c8 bump provider versions in e2e tests
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-07 12:09:19 +05:30
Sanskar Jaiswal
063d38dbd2 upgrade k8s in CI to 1.23
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-06-06 12:06:38 +05:30
Stefan Prodan
165c953239 Merge pull request #1208 from fluxcd/kubernetes-v1.24.1
Update Kubernetes packages to v1.24.1
2022-05-31 14:01:16 +03:00
Stefan Prodan
a0fae153cf Use leases for leader election
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-31 13:01:01 +03:00
Stefan Prodan
bfcf288561 Update Kubernetes packages to v1.24.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-31 13:00:16 +03:00
Sanskar Jaiswal
560f884cc0 Merge pull request #1185 from philnichol/adding-appprotocol
feat: Add an optional `appProtocol` field to `spec.service`
2022-05-19 19:26:49 +05:30
Phil Nichol
d79898848e feat: Added the optional appProtocol field to Canary.Service
Signed-off-by: Phil Nichol <35630607+philnichol@users.noreply.github.com>
2022-05-15 19:07:18 +01:00
Stefan Prodan
c03d138cd0 Merge pull request #1191 from aryan9600/maintainer-request
Add Sanskar Jaiswal (@aryan9600) as a maintainer
2022-05-10 16:19:50 +03:00
Sanskar Jaiswal
22d192e7e3 add Sanskar Jaiswal (@aryan9600) to MAINTAINERS
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-09 15:21:12 +05:30
Stefan Prodan
a4babd6fc4 Merge pull request #1189 from fluxcd/release-1.21.0
Release v1.21.0
2022-05-06 19:15:41 +03:00
Stefan Prodan
edd5515bd7 Release v1.21.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-06 18:25:07 +03:00
Stefan Prodan
00dde2358a Merge pull request #1188 from fluxcd/helm-kubeconfig
Rename kubeconfig section in helm values
2022-05-06 18:04:02 +03:00
Stefan Prodan
8e84262a32 Update the Helm chart kubeVersion to 1.19
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-06 17:02:12 +03:00
Stefan Prodan
541696f3f7 Rename kubeconfig section in helm values
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-06 17:01:07 +03:00
Stefan Prodan
8051d03f08 Merge pull request #1187 from fluxcd/update-digram
Update Flagger overview diagram
2022-05-06 16:48:27 +03:00
Stefan Prodan
a78d273aeb Update Flagger overview diagram
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-05-06 16:25:08 +03:00
Stefan Prodan
07bd3563cd Merge pull request #1183 from aryan9600/multi-cluster
Avoid setting owner refs if the service mesh/ingress is on a different cluster
2022-05-06 08:50:06 +03:00
Sanskar Jaiswal
8c690d1b21 avoid setting owner refs if the service mesh cluster is different
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-05-06 01:06:03 +05:30
Stefan Prodan
a8b4e9cc6d Merge pull request #1181 from aryan9600/no-cross-ns-refs
Add flag to disable cross namespace refs to Custom Resources
2022-05-03 11:53:38 +03:00
Sanskar Jaiswal
30ed9fb75c verify canary spec before syncing
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-29 13:53:14 +05:30
Sanskar Jaiswal
0382d9c1ca Add no cross-namespace refs to FAQ and helm chart
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-29 13:50:01 +05:30
Stefan Prodan
95381e1892 Merge pull request #1150 from cdlliuy/be_honor_to_skip_analysis_new
ignore FailedCheck result when skipAnalysis defined and be honor to skipAnalysis when internal error happens
2022-04-28 11:19:05 +03:00
Sanskar Jaiswal
7df1beef85 Add flag to disable cross namespace refs to AlertProviders and MetricTemplates
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-27 17:09:07 +05:30
Stefan Prodan
a1e519b352 Merge pull request #1172 from fluxcd/release-1.20.0
Release v1.20.0
2022-04-15 13:24:01 +03:00
Stefan Prodan
e7f16a8c06 Release v1.20.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-04-15 12:49:17 +03:00
Stefan Prodan
a3adae4af0 Merge pull request #1171 from aryan9600/fix-primary-restart
Fix canary rollback behaviour
2022-04-15 12:18:51 +03:00
Sanskar Jaiswal
c7c0c76bd3 fix canary rollback behaviour
Prevents the canary from getting triggered, when a canary deploy is
updated to match the primary deploy after an analysis fails.

Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-04-15 13:49:05 +05:30
Stefan Prodan
67cc965d31 Merge pull request #1164 from shipt/contour-retryon-support
Contour: Update the httproxy API and enable RetryOn
2022-04-12 10:32:53 +03:00
brandoncate
d09969e3b4 update httpproxy
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-04-08 09:58:23 -05:00
brandoncate
41904b42f8 add assertion to retryOn field
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-04-08 09:58:23 -05:00
brandoncate
f638410782 remove custom.sh test file
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-04-08 09:58:23 -05:00
brandoncate
48cc7995d7 adding retryon support
Signed-off-by: brandoncate <brandon.cate@shipt.com>
2022-04-08 09:58:23 -05:00
Stefan Prodan
793b93c665 Merge pull request #1148 from cdlliuy/add_canary_analysis_result_as_metric
Add canary analysis result as Prometheus metrics
2022-04-06 07:57:23 +03:00
Ying Liu
e0186cbe2a update docs for metrics part
Signed-off-by: Ying Liu <ying.liu.lying@gmail.com>
2022-04-06 09:57:46 +08:00
Stefan Prodan
2cc2b5dce8 Merge pull request #1162 from denvernyaw/wrong_unit_of_time_for_duration_panels_in_grafana_dashboard
Fix unit of time in the Istio Grafana dashboard
2022-04-05 16:39:21 +03:00
Mikita Reshatko
ccdbbdb0ec adapt Prometheus queries results for request duration metrics to Grafana dashboard
Signed-off-by: Mikita Reshatko <mikita.reshatko@gmail.com>
2022-04-05 14:14:09 +03:00
ying
13483321ac Update pkg/metrics/recorder.go
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Ying Liu <ying.liu.lying@gmail.com>
2022-03-25 23:10:03 +08:00
Ying Liu
5547533197 add canary analysis result as prometheus metrics
Signed-off-by: Ying Liu <ying.liu.lying@gmail.com>
2022-03-25 23:10:03 +08:00
Stefan Prodan
c68998d75e Merge pull request #1156 from aryan9600/appmesh-log
AppMesh: Add annotation to enable Envoy access logs
2022-03-22 16:13:37 +02:00
Sanskar Jaiswal
20f2d3f2f9 add annotation to enable appmesh logs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
Co-authored-by: wucg <wucg@trip.com>
2022-03-22 15:45:02 +05:30
Stefan Prodan
cc7b35b44a Merge pull request #1146 from canidam/fix-podinfo-service-when-canary-enabled
Fix the service toggle condition in the podinfo helm chart
2022-03-18 11:35:06 +02:00
Stefan Prodan
67a2cd6a48 Merge pull request #1139 from cdlliuy/ying_short_metric_analysis_waiting_promption
shorten the metric analysis cycle after confirm promotion gate is open
2022-03-18 11:34:21 +02:00
Stefan Prodan
08deddc4fe Merge pull request #1145 from anovateam/route_port_on_delegation
istio: Add destination port when port discovery and delegation are true
2022-03-18 10:10:54 +02:00
Ying Liu
77b2eb36a5 ignore FailedCheck result when skipAnalysis defined and be honor to skipAnalysi when internal error happens
Signed-off-by: Ying Liu <ying.liu.lying@gmail.com>
2022-03-17 10:49:30 +08:00
Ying Liu
ab84ac207a shorten the metric analysis cycle after confirmpromption gate is open and make the analysis check still works during waitingpromption status
Signed-off-by: Ying Liu <ying.liu.lying@gmail.com>
2022-03-17 10:32:01 +08:00
Chen Anidam
8957d91e01 Fix podinfo service toggle condition
Signed-off-by: Chen Anidam <canidam@gmail.com>
2022-03-17 00:34:51 +02:00
Marco Amador
c7cbb729b7 add destination port when port discovery is active and delegation is true
Signed-off-by: Marco Amador <amador.marco@gmail.com>
2022-03-16 18:57:02 +00:00
Stefan Prodan
eca6fa7958 Merge pull request #1144 from aryan9600/aryan9600/gateway-api
Remove unnecessary log statement
2022-03-15 15:03:16 +02:00
Sanskar Jaiswal
ee535afcb9 remove unnecessary log statement
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-15 18:07:23 +05:30
Stefan Prodan
18b64910d7 Merge pull request #1143 from aryan9600/aryan9600/gateway-api
Fix Gateway API docs
2022-03-15 14:34:57 +02:00
Sanskar Jaiswal
3ca75140d0 fix gateway api docs
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-15 17:38:55 +05:30
Stefan Prodan
960f924448 Merge pull request #1142 from aryan9600/aryan9600/gateway-api
Change debug level to info for gateway API
2022-03-15 14:07:26 +02:00
Sanskar Jaiswal
eed128a8b4 change debug level to info
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-15 16:21:39 +05:30
Stefan Prodan
210e21176b Merge pull request #1138 from fluxcd/release-1.19.0
Release v1.19.0
2022-03-14 14:47:33 +02:00
Stefan Prodan
0a0c3835d6 Release v1.19.0
This release comes with support for Kubernetes Gateway API v1alpha2.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-03-14 12:09:01 +02:00
Stefan Prodan
531893b279 Merge pull request #1110 from Moscagus/canary-replicas
Use the primary replicas when scaling up the canary (no hpa)
2022-03-14 12:02:27 +02:00
Stefan Prodan
e6bb47f920 Merge pull request #1108 from aryan9600/aryan9600/gateway-api
Add Gateway API as a provider
2022-03-14 11:14:01 +02:00
Stefan Prodan
307813a628 Merge pull request #1117 from johnzheng1975/patch-01
Update istio-progressive-delivery.md
2022-03-11 11:53:27 +02:00
Sanskar Jaiswal
38fc6b567f merge a/b and progressive tutorial
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-11 15:19:46 +05:30
Stefan Prodan
17015b23bf Merge pull request #1131 from aryan9600/bump-podinfo
Bump podinfo to 6.0.x and loadtester to 0.22.0
2022-03-11 10:07:46 +02:00
Sanskar Jaiswal
c9e53dd069 remove gateway types, fix rbac and add istio faq
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-10 18:16:44 +05:30
Sanskar Jaiswal
e26a10b481 update README
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
281d869f54 add a/b test docs and update progressive docs
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
91126d102d fix a/b testing logic and update e2e tests
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
ba4646cddb fix docs and e2e install.sh
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
438877674a add docs
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
da451a0cf4 add metric templates to tests
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
5e1d00d4d2 add router_test and make test install script platform agnostic
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
00d54d268c add gateway tests and change provider aname
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Sanskar Jaiswal
174e9fdc93 Add support for Gateway API as a provider.
Adds Gateway API as a provider for progressive traffic shifting, A/B
testing and Blue-Green testing. Adds a new field in the Canary
`spec.service.gatewayRefs` which specifies the Gateway that Flagger
should use.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-10 16:54:36 +05:30
Moscagus
f7fd6cce8c If HPA isn't set and replicas are not specified, it uses the primary replicas when scaling up the canary
Signed-off-by: Moscagus <gustavo.varisco@gmail.com>
2022-03-09 22:16:47 -03:00
Sanskar Jaiswal
5dc336d609 bump podinfo to 6.0.x and loadtester to 0.22.0
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-09 20:19:39 +05:30
Stefan Prodan
ae6a683f23 Merge pull request #1130 from aryan9600/remove-helm2
Remove support for helmv2 in loadtester
2022-03-09 10:18:58 +02:00
Sanskar Jaiswal
5acf189fbe remove support for helmv2 in loadtester
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-08 22:14:32 +05:30
Stefan Prodan
090329d0c9 Merge pull request #1119 from connesc/authorizer
Restrict source namespaces in flagger-loadtester
2022-03-08 14:41:11 +02:00
Cédric Connes
96fd359b99 Add cmd.namespaceRegexp to loadtester Helm chart
Signed-off-by: Cédric Connes <cedric.connes@gmail.com>
2022-03-08 12:38:19 +01:00
Stefan Prodan
519f343fcc Merge pull request #1125 from aryan9600/fix-finalizer-dupl
Fix potential canary finalizer duplication
2022-03-08 11:10:39 +02:00
Stefan Prodan
5d2a7ba9e7 Merge pull request #1128 from aryan9600/ld-multiarch
Add arm64 support for loadtester
2022-03-07 16:33:26 +02:00
Sanskar Jaiswal
1664ca436e add arm64 support for loadtester
Signed-off-by: Sanskar Jaiswal <sanskar.jaiswal@weave.works>
2022-03-07 17:34:24 +05:30
Sanskar Jaiswal
84ae65c763 fix potential canary finalizer duplication
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-03-04 21:11:31 +05:30
Cédric Connes
6085753d84 Only allow namespaces matching -namespace-regexp
This allows to forbid access from canaries in non-whitelisted
namespaces.
In a multi-tenant context, this can be combined with network policies to
maintain isolation between namespaces.

Signed-off-by: Cédric Connes <cedric.connes@gmail.com>
2022-02-24 18:24:03 +01:00
John Zheng
da706be4aa Update istio-progressive-delivery.md
Signed-off-by: Author Name <johnzhengaz@gmail.com>
It is easy tp raise: Halt advancement no values found for istio metric request-success-rate probably podinfo.test is not receiving traffic: running query failed: no values found
If it is inconsistence between the prometheus version and istio version.
Signed-off-by: John Zheng <john.zheng@hp.com>
2022-02-18 20:04:57 +08:00
Stefan Prodan
65e3bcb1d8 Merge pull request #1116 from pjbgf/patch-180222
Update Kubernetes dependencies to v1.23.3
2022-02-18 12:24:44 +02:00
Paulo Gomes
582f6eec77 Update Kubernetes dependecies to v0.23.3
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-18 09:56:43 +00:00
Paulo Gomes
4200c0159d Update github.com/prometheus/client_golang to v1.11.1 (CVE fix)
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
2022-02-18 08:44:48 +00:00
Stefan Prodan
cf8fe94fca Merge pull request #1107 from fluxcd/release-1.18.0
Release v1.18.0
2022-02-14 15:27:57 +02:00
Stefan Prodan
30d553c6f3 Release v1.18.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-02-14 12:44:23 +02:00
Stefan Prodan
f8f6a994dd Merge pull request #1106 from SomtochiAma/set-replica
Set primary deployment replicas when autoscaler isn't used
2022-02-14 12:33:10 +02:00
Somtochi Onyekwere
085639bbde Set primary deployment replicas when autoscaler isn't used
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-14 10:54:24 +01:00
Stefan Prodan
3bfa7c974d Merge pull request #1102 from SomtochiAma/topology-spread
Add field `spec.analysis.canaryReadyThreshold` for configuring canary threshold
2022-02-10 11:11:37 +02:00
Stefan Prodan
d29e475277 Merge pull request #1103 from chlunde/patch-2
docs: Fix typo ExternalDNS
2022-02-10 11:10:27 +02:00
Stefan Prodan
b7ba3ab063 Merge pull request #1105 from SomtochiAma/error-msg
Send warning and error alerts correctly
2022-02-09 09:31:12 +02:00
Somtochi Onyekwere
9796903c78 Send warning and error alerts correctly
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-08 21:48:46 +01:00
Carl Henrik Lunde
2f25fab560 docs: Fix typo ExternalDNS
Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
2022-02-08 18:26:17 +01:00
Somtochi Onyekwere
215c859619 add field for configuring canary threshold
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-08 13:52:28 +01:00
Stefan Prodan
7071d42152 Merge pull request #1100 from SomtochiAma/topology-spread
Update matchLabels for TopologySpreadContstraints in Deployments
2022-02-07 15:13:52 +02:00
Somtochi Onyekwere
08b1e52278 Add extra check for name
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-07 13:00:43 +01:00
Stefan Prodan
801f801e02 Merge pull request #1095 from ashokhein/main
Fix for when Prometheus returns NaN
2022-02-07 13:53:32 +02:00
Stefan Prodan
af5634962f Merge pull request #1092 from northwesternmutual/main
Update metadata during subsequent promote
2022-02-07 13:45:26 +02:00
Somtochi Onyekwere
fe7615afb4 Update matchLabels in LabelSelectors
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-02-07 11:30:21 +01:00
ASHOK KUMAR KS
fc6bedda23 Merge branch 'fluxcd:main' into main 2022-01-25 10:41:13 +00:00
Stefan Prodan
a7f997c092 Merge pull request #1091 from fluxcd/release-0.17.0
Release v1.17.0
2022-01-25 10:48:03 +02:00
Karl Heins
121eb767cb Update metadata during subsequent promote
Signed-off-by: Karl Heins <karlheins@northwesternmutual.com>

Support updating primary Deployment/DaemonSet/HPA/Service labels and annotations after first-time rollout
2022-01-24 14:41:24 -06:00
ashokhein
cd3a1d8478 fixed bug when Prometheus returns NaN
Signed-off-by: ashokhein <ashokhein@gmail.com>
2022-01-24 12:58:57 +00:00
Stefan Prodan
6f6af25467 chart: Update Prometheus to v2.32.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-21 15:13:12 +02:00
Stefan Prodan
a0f1638f6c Remove Flux deprecated marker
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-21 15:11:42 +02:00
Stefan Prodan
fc13276f0e Release v1.17.0
Adds support for Kuma service mesh

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-21 15:11:41 +02:00
Stefan Prodan
8a0b92db19 Merge pull request #1094 from fluxcd/sbom
Publish a Software Bill of Materials (SBOM)
2022-01-21 15:11:11 +02:00
Stefan Prodan
2f0d34adb2 Publish a Software Bill of Materials (SBOM)
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-01-21 14:20:48 +02:00
Stefan Prodan
617f416291 Merge pull request #1093 from aryan9600/aryan9600/fix-kuma-e2e
Fix failing kuma e2e tests
2022-01-20 10:47:32 +02:00
Sanskar Jaiswal
7a438ad323 fix failing kuma e2e tests
Kuma e2e tests were failing in CI(https://github.com/fluxcd/flagger/runs/4826617915?check_suite_focus=true)
due to prom server installed in the kuma-metrics ns not being able to
contact the kubernetes api server. Fixed by switching to flagger
prometheus and a custom kustomize build for kuma tests.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-01-20 08:20:16 +00:00
Stefan Prodan
5776f0b64b Merge pull request #1041 from baldey-nz/baldey-nz/notification-change
Add cluster name to flagger cmd args for altering
2022-01-11 11:14:47 +02:00
Stefan Prodan
96d190a789 Merge pull request #1085 from johnharris85/add-kuma-support
Add kuma support for progressive traffic shifting canaries
2022-01-11 11:01:14 +02:00
John Harris
d2038699c0 Fix newlines
Signed-off-by: John Harris <john.harris@konghq.com>
2022-01-05 07:46:56 -08:00
John Harris
cb3b5cba90 Remove Prometheus from default install
Signed-off-by: John Harris <john.harris@konghq.com>
2022-01-05 07:18:41 -08:00
baldey-nz
8c881ab758 as suggested changing cluster-name to flag
Signed-off-by: baldey-nz <baldey@gmail.com>
2021-12-21 14:11:49 +13:00
John Harris
caefaf73aa Add additional docs references
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-20 09:21:42 -08:00
John Harris
e8d7001f5e Add RO FS back to deployment
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:51:57 -08:00
John Harris
ae0f20a445 Add Kuma docs
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:45:23 -08:00
John Harris
4ddc12185f Add prometheus support
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:18:56 -08:00
John Harris
e81627a96d Add tests
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:09:39 -08:00
John Harris
47be2a25f2 Add Kuma routing and metrics
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:07:59 -08:00
John Harris
6832a4ffde Add/update Kustomize configurations
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:07:05 -08:00
John Harris
bd58a47862 Add/update API types
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-18 14:05:54 -08:00
Stefan Prodan
613fb92a25 Merge pull request #1084 from fluxcd/release-1.16.1
Release v1.16.1
2021-12-17 17:37:56 +02:00
Stefan Prodan
250d9f2836 Release v1.16.1
Contains flagger-loadtester v0.21.0

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-17 16:51:53 +02:00
Stefan Prodan
0cab25e44c Merge pull request #1083 from fluxcd/loadtester-v0.21.0
Release loadtester v0.21.0
2021-12-16 14:43:01 +02:00
Stefan Prodan
cbf6b462e4 Release loadtester v0.21.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-16 13:41:20 +02:00
Stefan Prodan
8695660c58 Merge pull request #1082 from fluxcd/fix-loadtester-workflow
Fix loadtester CI workflow
2021-12-16 13:33:38 +02:00
Stefan Prodan
1216990f52 Fix loadtester CI workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-16 13:33:06 +02:00
John Harris
204228bc8f Add API types.
Signed-off-by: John Harris <john.harris@konghq.com>
2021-12-15 15:13:47 -08:00
Stefan Prodan
ebc26e9ea0 Merge pull request #1081 from fluxcd/alpine-3.15
Update Alpine to 3.15
2021-12-15 12:16:40 +02:00
Stefan Prodan
3c03119d2d Merge pull request #1080 from fluxcd/lt-helm
loadtester: Update the Helm CLI
2021-12-15 12:16:31 +02:00
Stefan Prodan
644049092f Update Alpine to 3.15
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-15 10:49:16 +02:00
Stefan Prodan
578f447728 loadtester: Update the Helm CLI
- helm 2.17.0
- helmv3 3.7.2

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-15 10:47:53 +02:00
Stefan Prodan
3bf926e419 Merge pull request #1079 from fluxcd/push-ld
Add workflow for pushing loadtester image
2021-12-14 19:18:07 +02:00
Stefan Prodan
48ee4f8bd2 Add workflow for pushing loadtester image
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-14 18:53:29 +02:00
Stefan Prodan
b4964a0535 Merge pull request #1078 from fluxcd/k8s.io/v0.23.0
Update Kubernetes packages to v1.23.0
2021-12-14 18:31:16 +02:00
Stefan Prodan
47ff00e9b9 Update Kubernetes packages to v1.23.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-14 17:56:59 +02:00
Stefan Prodan
6ca99a5ddb Merge pull request #1077 from fluxcd/go-1.17
Update Go to v1.17
2021-12-14 17:49:54 +02:00
Stefan Prodan
30b5054692 Update Go to v1.17
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-12-14 17:26:13 +02:00
Stefan Prodan
edf7b90c11 Merge pull request #1076 from makaronak/loadtester-secrets
feat: allow loadtester pull secrets
2021-12-14 16:15:58 +02:00
Stefan Prodan
7f0f97d14d Merge pull request #1071 from longkai/fix-code-gen
fix: code gen sometimes fail issue
2021-12-14 15:04:32 +02:00
Maksim Makaronak
b03b75cd7e feat: allow loadtester pull secrets
Signed-off-by: Maksim Makaronak <maksim.makaronak@ihsmarkit.com>
2021-12-14 14:19:47 +03:00
Stefan Prodan
f0d2e60a9a Merge pull request #1075 from dholbach/update-maintainer-file
Update MAINTAINERS file (Takeshi is at Tetrate now)
2021-12-14 10:14:49 +02:00
Daniel Holbach
328f1d9ea2 Update MAINTAINERS file (Takeshi is at Tetrate now)
Also bring it up to same format as all the other
	MAINTAINERS files (needed for fluxcd/community#155).

Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-12-13 17:46:47 +01:00
longkai
a14013f393 fix: code gen sometimes fail issue
In my self project I reference this nice script, the go.sum look like this(after run go mod tidy and
download):

```
k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0=
k8s.io/apiserver v0.22.1/go.mod h1:2mcM6dzSt+XndzVQJX21Gx0/Klo7Aen7i0Ai6tIa400=
k8s.io/client-go v0.22.1 h1:jW0ZSHi8wW260FvcXHkIa0NLxFBQszTlhiAVsU5mopw=
k8s.io/client-go v0.22.1/go.mod h1:BquC5A4UOo4qVDUtoc04/+Nxp1MeHcVc1HJm1KmG8kk=
k8s.io/code-generator v0.22.1/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o=
k8s.io/component-base v0.22.1 h1:SFqIXsEN3v3Kkr1bS6rstrs1wd45StJqbtgbQ4nRQdo=
```

as you can see the, sometimes the go.sum only has `version/go.mod` line,
if we run the scripts, it will fail like this:

chmod: cannot access '/home/longkai/pkg/mod/k8s.io/code-generator@v0.22.1/go.mod/generate-groups.sh': Not a directory

so this pr fix this.

Finally, the list is sort by version ast, we want to choose the newer one.

Signed-off-by: longkai <im.longkai@gmail.com>
2021-12-07 14:32:34 +08:00
Stefan Prodan
aef1d7904d Merge pull request #1063 from rajatvig/UpdateLoadTester
Update libraries included in the load tester to newer versions
2021-12-01 09:20:26 +02:00
Rajat Vig
dc478188c1 Update loadtester version
Signed-off-by: Rajat Vig <rvig@etsy.com>
2021-12-01 00:13:35 +00:00
Rajat Vig
9fa6e775c0 Fix ghz URI and install wrk from alpine vs compiling it
Signed-off-by: Rajat Vig <rvig@etsy.com>
2021-12-01 00:08:55 +00:00
Rajat Vig
584350623b Update libraries included in the load tester to newer versions
Signed-off-by: Rajat Vig <rvig@etsy.com>
2021-11-29 11:07:41 +00:00
Stefan Prodan
919959b32c Merge pull request #1062 from rajatvig/patch-1
Update content for changes in autoscaler behaviour
2021-11-29 12:50:03 +02:00
Rajat Vig
ec54eedf93 Update content for changes in autoscaler behaviour
Signed-off-by: Rajat Vig <rvig@etsy.com>
2021-11-29 10:26:48 +00:00
Stefan Prodan
f311797215 Merge pull request #1061 from SanyaKochhar/osm-docs
Update OSM docs for managed/non-default instances
2021-11-24 17:14:58 +02:00
Stefan Prodan
059b5d0f89 Merge pull request #1059 from julienduchesne/patch-1
Add section about the k6 load tester
2021-11-24 17:14:43 +02:00
Sanya Kochhar
7542640494 update osm docs for managed/non-default osm instances
Signed-off-by: Sanya Kochhar <kochhars@microsoft.com>
2021-11-23 14:10:46 -05:00
Julien Duchesne
52493f181a Add section about the k6 load tester
As suggested here: https://cloud-native.slack.com/archives/C01JR4YUG4B/p1637598108108000

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
2021-11-22 11:52:27 -05:00
Stefan Prodan
5d95143536 Merge pull request #1058 from fluxcd/release-1.16.0
Release v1.16.0
2021-11-22 15:40:25 +02:00
Stefan Prodan
a2c5861ca5 Release v1.16.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 14:53:54 +02:00
Stefan Prodan
fcc07f02b0 Merge pull request #1049 from fluxcd/prevent-flux-overrides
Prevent Flux from overriding Flagger managed objects
2021-11-22 14:38:27 +02:00
Stefan Prodan
3f43526aac Merge pull request #1057 from fluxcd/update-diagram-osm
Update Flagger diagram to include OpenServiceMesh
2021-11-22 14:38:13 +02:00
Stefan Prodan
cd07da9137 Update Flagger diagram to include OpenServiceMesh
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-22 12:05:17 +02:00
Stefan Prodan
30ab182b2e Merge pull request #1052 from zeot/append-ownerreferences-configmaps-and-secrets
Append to list of ownerReferences for primary configmaps and secrets
2021-11-18 10:51:36 +02:00
Stefan Prodan
2ddd9587f7 Merge pull request #1048 from personio/primary-ready-threshold
[feat] primaryReadyThreshold: allow configuring threshold for primary
2021-11-17 10:30:37 +02:00
Zacharias Taubert
50800857b6 Append to list of ownerReferences for cm and secrets
If a "primary" ConfigMap or Secret already exists, keep the list of
ownerReferences and append the updating Canary as ownerReference if it's
not already in the list. This will prevent the GC from deleting primary
ConfigMaps and Secrets used by multiple primary deployments when one is
deleted.

Signed-off-by: Zacharias Taubert <zacharias.taubert@gmail.com>
2021-11-14 23:30:30 +01:00
Mahdi Dibaiee
8f50521435 [feat] primaryReadyThreshold: allow configuring threshold for primary
see #639

Signed-off-by: Mahdi Dibaiee <mdibaiee@pm.me>
2021-11-11 14:44:52 +00:00
Stefan Prodan
45ecaa9084 Prevent Flux from overriding Flagger managed objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-11-10 18:19:04 +02:00
Stefan Prodan
9c7db58d87 Merge pull request #1044 from Misteur-Z/external-dns-docs
Add warning in docs about ExternalDNS + Istio configuration
2021-11-09 19:56:21 +02:00
Stefan Prodan
6b11e9714b Merge pull request #1045 from DiptoChakrabarty/replaceioutil
Replace ioutil in testing of gchat
2021-11-09 19:22:30 +02:00
Stefan Prodan
7f5a9ed34a Merge pull request #1047 from ecordell/patch-1
Mark CanaryMetric.Threshold as omitempty
2021-11-09 19:22:09 +02:00
Evan Cordell
bc9a231d26 Mark CanaryMetric.Threshold as omitempty
Signed-off-by: Evan Cordell <cordell.evan@gmail.com>
2021-11-09 09:27:20 -05:00
Dipto Chakrabarty
0bb3815f73 replace ioutil in testing of gchat
Signed-off-by: DiptoChakrabarty <diptochuck123@gmail.com>
2021-11-01 15:17:44 +05:30
Misteur-Z
944cc8ef62 Remove emoji
Signed-off-by: Misteur-Z <22374424+Misteur-Z@users.noreply.github.com>
2021-10-29 15:43:13 +02:00
Misteur-Z
e97334d7c1 Warning
Signed-off-by: Misteur-Z <22374424+Misteur-Z@users.noreply.github.com>
2021-10-29 14:41:24 +02:00
Stefan Prodan
2dacf08c30 Merge pull request #1043 from fluxcd/release-1.15.0
Release v1.15.0
2021-10-29 09:52:55 +03:00
Stefan Prodan
6f6590774e Add a note to docs for external-dns annotations
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-28 16:41:33 +03:00
Stefan Prodan
fe5bb3fd26 Release v1.15.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-10-28 16:24:43 +03:00
baldey-nz
c638edd346 If applied, this commit will add an optional canary spec field named summary for notification purposes
Signed-off-by: baldey-nz <baldey@gmail.com>
2021-10-28 07:14:24 +13:00
Stefan Prodan
c02477a245 Merge pull request #1036 from sa-spag/loadtester-chart
Add `podLabels` to loadtester chart
2021-10-27 08:56:21 +03:00
Stefan Prodan
da6da9c839 Merge pull request #1038 from bseenu/loadtester-security
Update load tester binaries (CVEs fix)
2021-10-27 08:53:56 +03:00
Stefan Prodan
d83293776d Merge pull request #1034 from jonnylangefeld/jlf/add-metadata-to-istio-vs
Add metadata annotations to generated apex objects
2021-10-27 08:52:34 +03:00
Jonny Langefeld
d5994ac127 Add metadata to istio VirtualService
Some third party software relies on annotations and labels on istios VirtualServices. For instance external-dns makes use of the `external-dns.alpha.kubernetes.io/controller` annotation. Currently there is no way to set labels and annotations on the VirtualService resource.

This change takes the metadata from the `canary.Spec.Service.Apex` property to replicate exactly what is already possible for a traefik resource:
c36a13ccff/pkg/router/traefik.go (L59-L68)

Fix #854

Signed-off-by: Jonny Langefeld <jonny.langefeld@gmail.com>
2021-10-26 10:59:34 -07:00
Stefan Prodan
36584826bb Merge pull request #1022 from menglingwei/main
Fix tyops in code comments
2021-10-26 12:52:29 +03:00
Srinivas
7a6fccb70d Security Fixes
Signed-off-by: Srinivas <sboga@roku.com>
2021-10-22 18:12:23 -07:00
Alexis Gauthiez
ca1971c085 Bump loadtester chart version
Signed-off-by: Alexis Gauthiez <alexis.gauthiez@blablacar.com>
2021-10-19 16:42:52 +02:00
Alexis Gauthiez
97eaecec48 Add podLabels to loadtester chart
Signed-off-by: Alexis Gauthiez <alexis.gauthiez@blablacar.com>
2021-10-19 16:42:52 +02:00
Stefan Prodan
01d47808a7 Merge pull request #1023 from Infomaniak/hotfix/use-nginx-controller-canary-metrics
Use nginx controller canary metrics
2021-09-30 14:45:54 +03:00
Léopold Jacquot
7d2f3dea7a Use nginx controller canary metrics
Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
2021-09-30 11:12:37 +02:00
Stefan Prodan
bce1d02b3b Merge pull request #1025 from fluxcd/gloo-1.9
Update Gloo to 1.9.0
2021-09-30 12:02:49 +03:00
Stefan Prodan
9a993b131d Update Gloo to 1.9.0
Fix for deprecated CRDs

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-30 11:39:59 +03:00
Stefan Prodan
636a1d7576 Merge pull request #1020 from SomtochiAma/test-fieldIsMandatory
Add test for checking if configmap is optional
2021-09-30 11:25:34 +03:00
xiaobing.meng
fb621ec465 fix comments
Signed-off-by: xiaobing.meng <xiaobing.meng@alibaba-inc.com>
2021-09-26 15:14:47 +08:00
Somtochi Onyekwere
00e993c686 Add test for fieldIsMandatory
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-09-20 23:17:27 +01:00
Stefan Prodan
374a55d8f5 Merge pull request #1001 from kyanagimoto/main
fix: 🐛 trigger unexpected canary deployment.
2021-09-20 18:36:09 +03:00
Stefan Prodan
1e88e2fa72 Merge pull request #1019 from fluxcd/release-v1.14.0
Release v1.14.0
2021-09-20 11:41:39 +03:00
Stefan Prodan
a2326198f6 Release v1.14.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-09-20 11:07:43 +03:00
Stefan Prodan
a0031d626a Merge pull request #1018 from funkypenguin/patch-1
[docs] update promql query for istio request duration
2021-09-20 10:10:30 +03:00
David Young
a2b58d59ab [docs] update promql query for istio request duration
A minor issue I stumbled across while learning how to drive Flagger, is that the docs still use `istio_request_duration_seconds_bucket` to illustrate the query behind the `request-duration` metric. I understand that this changed with Istio 1.5 (https://github.com/fluxcd/flagger/issues/478), but it seems that in the current version of flagger, the correct metric must already be used, since I'm getting duration metrics out of Istio 1.10 :)

This change simply makes the docs clearer for those of us trying to understand exactly what `request-duration` entails!

Signed-off-by: David Young <davidy@funkypenguin.co.nz>
2021-09-20 10:54:43 +12:00
Stefan Prodan
e8b17406b7 Merge pull request #1016 from SomtochiAma/istio-crds
Add support for Istio load balancer settings
2021-09-17 12:18:22 +03:00
Somtochi Onyekwere
5245045d84 Update localbalancer settings
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-09-17 09:31:00 +01:00
Stefan Prodan
b57d39369b Merge pull request #1015 from SomtochiAma/influxdb
Render inline promql query
2021-09-17 09:24:34 +03:00
Stefan Prodan
db72fe3d97 Merge pull request #1013 from GregoireW/testing
Add dynatrace metric provider
2021-09-17 09:23:36 +03:00
Somtochi Onyekwere
3a2f688c56 Render inline promql query
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-09-16 13:02:58 +01:00
GregoireW
13a2a5073f Add dynatrace provider
Signed-off-by: GregoireW <24318548+GregoireW@users.noreply.github.com>
2021-09-16 10:48:51 +02:00
Stefan Prodan
418853fd0c Merge pull request #1012 from SomtochiAma/influxdb
Add Influxdb metric provider
2021-09-16 11:21:24 +03:00
Somtochi Onyekwere
cfb68a6e56 Add Influxdb provider
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-09-16 08:55:40 +01:00
Stefan Prodan
88b13274d7 Merge pull request #991 from SomtochiAma/stackdriver-analysis
Add stackdriver metrics analysis
2021-09-02 17:40:47 +03:00
Somtochi Onyekwere
056ba675a7 Add stackdriver metrics analysis
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-09-01 18:25:59 +01:00
kyanagimoto
873b74561c fix: 🐛 trigger unexpected canary deployment.
https://github.com/fluxcd/flagger/issues/989

Signed-off-by: kyanagimoto <koichiyanagimoto@gmail.com>
2021-09-01 19:17:17 +09:00
Stefan Prodan
8b42ce374d Merge pull request #990 from fluxcd/chart-publish
ci: Add on-demand Helm publish workflow
2021-08-27 09:40:54 +03:00
Stefan Prodan
4871003ff1 ci: Add on-demand Helm publish workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-27 09:40:30 +03:00
Stefan Prodan
b4e7ad5575 Merge pull request #987 from SomtochiAma/k8s-provider-docs
Clarify that traffic routing with doesn't happen kubernetes blue/green deployment
2021-08-27 09:37:36 +03:00
Stefan Prodan
1a246060e2 Merge pull request #986 from andylibrian/fix-broken-loadtester-chart
Fix broken loadtester chart due to extra end
2021-08-27 09:32:34 +03:00
Somtochi Onyekwere
6a3d74c645 Clarify traffic routing with kubernetes
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2021-08-26 11:16:31 +01:00
Andy Librian
2073bd2027 Fix broken loadtester chart due to extra end
Signed-off-by: Andy Librian <andylibrian@gmail.com>
2021-08-26 14:15:35 +07:00
Stefan Prodan
c63554c534 Merge pull request #985 from fluxcd/cosign-fix
Fix cosign workflow
2021-08-25 12:16:24 +03:00
Stefan Prodan
be8ed8a696 Fix cosign workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-25 12:16:06 +03:00
Stefan Prodan
98530d9968 Merge pull request #984 from fluxcd/release-v1.13.0
Release v1.13.0
2021-08-25 12:08:14 +03:00
Stefan Prodan
38adc513a6 Release v1.13.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-25 11:46:30 +03:00
Stefan Prodan
eb12e3bde1 Merge pull request #983 from fluxcd/cosign
Sign Flagger container images with cosign
2021-08-25 10:00:59 +03:00
Stefan Prodan
8b2839d36e Add docs on how to verify Flagger containers with cosign
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-24 17:59:32 +03:00
Stefan Prodan
f0fa2aa6bb Sign Flagger container images with cosign
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-24 17:58:54 +03:00
Stefan Prodan
33528b073f Add cosign keys
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-24 15:25:02 +03:00
Fabio Pinna
cf8783ea37 Add support for Google Chat alerts (#953)
Add gchat alerting support

Signed-off-by: fpinna <fplkid@gmail.com>
2021-08-24 11:26:00 +03:00
Stefan Prodan
00355635f8 Merge pull request #982 from saiskee/fix-gloo-edge-flagger
Update Gloo APIs to v1.8
2021-08-23 19:47:18 +03:00
Keerthan Ekbote
aa485f4bf1 Update gloo apis to replace snake case with camel case
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-08-23 12:16:43 -04:00
Stefan Prodan
273b05fb24 Merge pull request #980 from fluxcd/istio-e2e
Update virtual service delegation e2e tests for Istio v1.11
2021-08-23 18:10:51 +03:00
Stefan Prodan
e470474d6f Update Istio delegation e2e for 1.11
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-23 17:48:40 +03:00
Stefan Prodan
ddfd2fe2ec Merge pull request #979 from fluxcd/update-e2e-vers
Update providers in e2e tests
2021-08-23 15:15:32 +03:00
Stefan Prodan
7533d0ae99 e2e: Update Ingress NGINX to v0.49.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-23 14:26:27 +03:00
Stefan Prodan
04ec7f0388 Merge pull request #966 from eduardobarbosa/eduardobarbosa/add-podlabels-helmchart
Add extra podLabels options to Flagger Helm Chart
2021-08-23 13:02:13 +03:00
Stefan Prodan
419000cc13 e2e: Update Istio to v1.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-23 12:58:35 +03:00
Stefan Prodan
0dc8edb437 Merge pull request #975 from hobbsh/support-volumes-loadtester
support volumes/volumeMounts in loadtester chart
2021-08-23 12:48:17 +03:00
Stefan Prodan
0759b6531b e2e: Update Contour to v1.18
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-23 12:34:32 +03:00
Stefan Prodan
d8f984de7d Merge pull request #977 from johnsonshi/osm-flagger-docs
Add OSM tutorial and docs
2021-08-23 12:33:16 +03:00
Johnson Shi
82e490a875 Add osm tutorial and docs
Signed-off-by: Johnson Shi <Johnson.Shi@microsoft.com>
2021-08-20 14:25:47 -07:00
Stefan Prodan
c6dffd9d3e e2e: Update Linkerd to v2.10.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-08-20 17:17:59 +03:00
Stefan Prodan
8ee3d5835a Merge pull request #978 from fluxcd/update-calendar
Update links to calendar and resources
2021-08-17 13:33:13 +03:00
Daniel Holbach
1209d7e42b update links to calendar and resources
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-08-17 10:22:48 +02:00
Wylie Hobbs
cdc05ba506 support volumes/volumeMounts in loadtester chart
Signed-off-by: Wylie Hobbs <wylie@wyliehobbs.com>
2021-08-12 10:44:12 -06:00
Stefan Prodan
a6fae0195f Merge pull request #955 from johnsonshi/support-osm-in-flagger
Support OSM progressive traffic shifting in Flagger
2021-08-12 15:04:09 +03:00
Johnson Shi
11375b6890 Support OSM progressive traffic shifting
Signed-off-by: Johnson Shi <Johnson.Shi@microsoft.com>
2021-08-11 17:43:00 -07:00
eduardobarbosa
3811470ebf Add extra podLabels options to Flagger Helm Chart
Signed-off-by: eduardobarbosa <eduardobarbosadacosta@gmail.com>
2021-08-04 15:10:00 -03:00
Stefan Prodan
e2b08eb4dc Merge pull request #964 from shuheiktgw/drop_ioutil
chore: Drop deprecated io/ioutil
2021-07-31 10:16:11 +03:00
shuheiktgw
38d3ca1022 chore: Drop deprecated io/ioutil
Signed-off-by: shuheiktgw <shuheiktgw@users.noreply.github.com>
2021-07-31 08:25:46 +09:00
Stefan Prodan
df459c5fe6 Merge pull request #960 from fluxcd/traefik-2.4
e2e: Update Traefik to 2.4.9
2021-07-27 12:56:41 +03:00
Stefan Prodan
d1d9c0e2a9 Update Traefik docs with Prometheus annotations
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-27 12:34:27 +03:00
Stefan Prodan
c1b1d7d448 e2e: Update Traefik to 2.4.9
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-07-27 12:17:40 +03:00
Stefan Prodan
e6b5ee2042 Merge pull request #958 from GregoryVds/fix-typo
pkg:canary: fix typos in logs
2021-07-26 18:37:20 +03:00
Stefan Prodan
0170fc6166 Merge pull request #959 from HBOCodeLabs/mdb/typo-fixes
correct spelling of 'Secrets' in code comments
2021-07-26 17:02:58 +03:00
Mike Ball
4cc2ada2a2 correct spelling of 'Secrets' in code comments
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-07-23 06:54:26 -04:00
Gregory Vander Schueren
a5d3e4f6a6 pkg:canary: fix typos in logs
Signed-off-by: Gregory Vander Schueren <gregory.vanderschueren@sortlist.com>
2021-07-21 15:44:56 +02:00
Stefan Prodan
7c92b33886 Merge pull request #952 from bellkev/fix-grafana-dashboard
Remove problematic nulls from Grafana dashboard
2021-07-09 17:21:46 +03:00
Kevin Bell
0f0b9414ae Remove problematic nulls from Grafana dashboard
Newer versions of Grafana complain when loading
dashboard JSON with nulls in these "current" fields.

Signed-off-by: Kevin Bell <kebel@amazon.com>
2021-07-08 18:01:47 -07:00
Stefan Prodan
6fbb67ee8c Merge pull request #943 from L3o-pold/hotfix/fix-alerting-http-proxy
Fix for the http client proxy overriding the default client
2021-06-24 17:14:52 +03:00
Léopold Jacquot
6634f1a9ae don't override DefaultClient
bug introduced by https://github.com/fluxcd/flagger/pull/872

Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
2021-06-24 15:04:41 +02:00
Stefan Prodan
8da8138f77 Merge pull request #941 from fluxcd/release-v1.12.1
Release v1.12.1
2021-06-17 19:33:36 +03:00
Stefan Prodan
588f4c477b Release v1.12.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 19:12:06 +03:00
Stefan Prodan
fda1775d3a Merge pull request #940 from fluxcd/k8s.io/api-v0.21.1
Update Go to v1.16 and Kubernetes packages to v1.21.1
2021-06-17 19:03:24 +03:00
Stefan Prodan
fc71d53c71 Update Go to v1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 18:44:23 +03:00
Stefan Prodan
ab2a320659 Update Kubernetes packages to v1.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 18:35:42 +03:00
Stefan Prodan
7f50f81ac7 Merge pull request #939 from fluxcd/remove-toolkit-markers
Remove the GitOps Toolkit metadata from generated objects
2021-06-17 18:12:21 +03:00
Stefan Prodan
c36a13ccff Remove the GitOps Toolkit metadata from generated objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-17 17:49:22 +03:00
Stefan Prodan
47de726345 Merge pull request #937 from fluxcd/release-v1.12.0
Release v1.12.0
2021-06-16 13:16:19 +03:00
Stefan Prodan
7a4fdbddc0 Release v1.12.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-16 12:18:40 +03:00
Joakim Ahrlin
0dc6f33550 Add insecureSkipVerify option for Prometheus and Graphite
Add insecureSkipVerify option for Prometheus and Graphite

Signed-off-by: Joakim Ahrlin <joakim.ahrlin@embark-studios.com>
2021-06-15 19:28:25 +03:00
Stefan Prodan
b2436eb0df Merge pull request #936 from fluxcd/flux-gc-skip
Remove Flux GC markers from generated objects
2021-06-15 18:08:32 +03:00
Stefan Prodan
cc673159d7 Remove Flux GC markers from generated objects
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-15 17:45:33 +03:00
Stefan Prodan
17c310d66d Merge pull request #932 from KnechtionsCoding/feat/gloo-label-copy
gloo: copy labels from upstream
2021-06-15 12:36:37 +03:00
Hans Knecht
e7357c4e07 fix: updating to use include-label-prefix
fix: remove copy of labels

Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
2021-06-14 11:39:55 -04:00
Stefan Prodan
c44de2d7c3 Merge pull request #934 from johnsonshi/fix-smi-trafficsplit-v1alpha2-omitempty
fix: Require SMI TrafficSplit Service and Weight
2021-06-14 18:07:42 +03:00
Johnson Shi
d82b2c219a fix: Require SMI TrafficSplit Service and Weight
In the SMI TrafficSplit spec, Weight and Service are
required values for TrafficSplit Backend.
In flagger's SMI v1alpha2 implementation,
Service and Weight have the omitempty json option.

During canary analysis, flagger initially creates
a SMI TrafficSplit custom resource in which the
canary backend service has a Weight of 0.
The omitempty option causes Go to omit Weight
when it sends the custom resource to Kubernetes.
This throws an error during canary analysis.

Signed-off-by: Johnson Shi <Johnson.Shi@microsoft.com>
2021-06-14 06:55:59 -07:00
Hans Knecht
35c8957a55 chore: lowercase labels
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
2021-06-12 21:57:45 -04:00
Hans Knecht
8555f8250a feat: copy labels from upstream
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
2021-06-11 16:18:29 -04:00
Mike Ball
8137a25b13 Improve language and correct typos in FAQs docs (#925)
Improve language and correct typos in FAQs docs

Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-06-03 11:09:42 +03:00
Stefan Prodan
2db5573c0e Merge pull request #924 from fluxcd/release-1.11.0
Release v1.11.0
2021-06-01 13:59:04 +03:00
Stefan Prodan
1e382203b8 Release v1.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-06-01 13:37:51 +03:00
Stefan Prodan
873903a4cb Merge pull request #920 from fluxcd/rbac-v1
Update Kubernetes manifests to rbac.authorization.k8s.io/v1
2021-06-01 12:37:37 +03:00
Stefan Prodan
e5b8afc085 Merge pull request #917 from fluxcd/ingress-v1
Upgrade Ingress to networking.k8s.io/v1
2021-06-01 12:37:26 +03:00
Stefan Prodan
ded658fed9 Merge pull request #922 from HBOCodeLabs/mdb/docs-typo-fixes
Improve the Flagger documentation
2021-05-29 11:54:21 +03:00
Stefan Prodan
88d8858900 Merge pull request #921 from HBOCodeLabs/mdb/add-graphite-info-to-docs
add Graphite info to docs
2021-05-29 11:53:30 +03:00
Mike Ball
737c185aa6 insert comma in dev guide e2e test explanation
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:24:08 -04:00
Mike Ball
0006a68740 correct spelling/tense of 'choose' in dev guide
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:22:07 -04:00
Mike Ball
4db91f7062 improve readability of service exposure FAQ
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:14:30 -04:00
Mike Ball
b8c23967b7 insert comma in FAQ selectors explanation
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:13:45 -04:00
Mike Ball
2019d048a4 separate FAQ about multiple ports into 2 sentences
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:12:42 -04:00
Mike Ball
fe0a4eb20c fine-tune FAQ explanation pertaining to downtime
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:11:30 -04:00
Mike Ball
a35b0e8639 fine-tune language of FAQ pertaining to downtime
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:10:14 -04:00
Mike Ball
4c0843f92a use nonplural 'cookie' in FAQ A/B test explanation
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:08:22 -04:00
Mike Ball
867c1af897 insert comma in FAQ A/B testing explanation
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:07:19 -04:00
Mike Ball
100308289f correct 'install' to 'installing' on docs homepage
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:05:00 -04:00
Mike Ball
3d4739760d correct 'choose' spelling/tense on docs homepage
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 12:04:15 -04:00
Mike Ball
9f321dd685 add New Relic & Graphite to FAQ metrics providers
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 11:57:46 -04:00
Mike Ball
ba6078f235 add Graphite to docs homepage metrics providers
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
2021-05-28 11:53:17 -04:00
Stefan Prodan
cd2f1a24bd Update Kubernetes manifests to rbac.authorization.k8s.io/v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-28 09:37:51 +03:00
Stefan Prodan
b87a81b798 Merge pull request #919 from fluxcd/release-1.10.0
Release v1.10.0
2021-05-28 09:32:23 +03:00
Stefan Prodan
0f9dd61786 Release v1.10.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-28 09:06:46 +03:00
Stefan Prodan
4869a9f3ae Merge pull request #915 from HBOCodeLabs/graphite-metrics-provider
Add Graphite metrics provider
2021-05-28 08:55:30 +03:00
Nathan Mische
cd6f36302d Add graphite to the list of valid provider types for the MetricTemplate crd
Co-authored-by: Mike Ball <mike.ball@warnermedia.com>
Co-authored-by: Nathan Mische <Nathan.Mische@warnermedia.com>
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
Signed-off-by: Nathan Mische <Nathan.Mische@warnermedia.com>
2021-05-26 10:07:12 -04:00
Stefan Prodan
e5fdc7a57d docs: Update Ingress guides to networking.k8s.io/v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 11:10:42 +03:00
Stefan Prodan
834a601311 e2e: Update Kubernetes to v1.21.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 10:44:06 +03:00
Stefan Prodan
a2784c533e Upgrade Ingress to networking/v1
- breaking change: drop support for Ingress `k8s.io/api/networking/v1beta1`
- routing: use Ingress `k8s.io/api/networking/v1` for NGINX and Skipper routers
- e2e: update ingress-nginx v0.46.0 and skipper to v0.13.61

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-26 09:59:26 +03:00
Mike Ball
8e3ee3439c add {{target}} to Graphite metrics query example
Co-authored-by: Mike Ball <mike.ball@warnermedia.com>
Co-authored-by: Nathan Mische <Nathan.Mische@warnermedia.com>
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
Signed-off-by: Nathan Mische <Nathan.Mische@warnermedia.com>
2021-05-25 11:56:17 -04:00
Stefan Prodan
f9d40cfe1b Merge pull request #914 from kazukousen/scan-init-container-envs
ConfigTracker: Scan envFrom in init-containers
2021-05-25 17:45:53 +03:00
kazukousen
b26b49fac2 add unit tests
Signed-off-by: kazukousen <mmchari.0228@gmail.com>
2021-05-25 23:21:34 +09:00
Stefan Prodan
f68d647fd0 Merge pull request #916 from fluxcd/e2e-up
e2e: Update Istio and Contour
2021-05-25 11:08:13 +03:00
Stefan Prodan
deb3fb01a2 e2e: Update Contour to v1.15
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-25 10:43:14 +03:00
Stefan Prodan
3accd23a19 e2e: Update Istio to v1.10.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-25 10:42:21 +03:00
Mike Ball
6a66113560 document Graphite metrics provider (#9)
This adds documentation of the Graphite metrics
provider in support of addressing issue #911.

Co-authored-by: Mike Ball <mike.ball@warnermedia.com>
Co-authored-by: Nathan Mische <Nathan.Mische@warnermedia.com>
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
Signed-off-by: Nathan Mische <Nathan.Mische@warnermedia.com>
2021-05-24 17:44:31 -04:00
Eric Wyles
6a7f7415fa Fixed typo on canary documentation (#912)
Fix webhook typo in docs
Signed-off-by: Eric Wyles <eric.wyles@jbhunt.com>
2021-05-24 16:30:26 +03:00
Mike Ball
4654f2cba9 add a Graphite metrics provider
This adds a Graphite metric provider to address
issue #911.

Co-authored-by: Mike Ball <mike.ball@warnermedia.com>
Co-authored-by: Nathan Mische <Nathan.Mische@warnermedia.com>
Signed-off-by: Mike Ball <mike.ball@warnermedia.com>
Signed-off-by: Nathan Mische <Nathan.Mische@warnermedia.com>
2021-05-24 09:16:00 -04:00
kazukousen
17557dc206 fixed ConfigTracker to be able to scan envFrom in init-containers
Signed-off-by: kazukousen <mmchari.0228@gmail.com>
2021-05-24 14:09:04 +09:00
Stefan Prodan
39a3898234 Merge pull request #909 from fluxcd/release-v1.9.0
Release v1.9.0
2021-05-14 16:20:38 +03:00
Stefan Prodan
9372cf9f18 Release v1.9.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-14 16:19:27 +03:00
Stefan Prodan
41e427d645 Merge pull request #908 from kdorosh/add_gloo_upstreamRef
Gloo Upstream Ref for Upstream Config
2021-05-14 15:37:49 +03:00
Stefan Prodan
84ff6f7e89 Merge pull request #907 from vorozhko/nginx-ingress-cleanup
Adjusted Nginx ingress canary headers on init and promotion
2021-05-14 15:18:14 +03:00
Keerthan Ekbote
a286625ad9 updated gloo unit tests
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

intermediate commit

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

updated gloo unit tests

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

copy config from upstream ref to flagger-generateed upstreams

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

removed unneeded types

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

make fmt

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

added code-generator to replace

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

reverted go.mod

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

fixed struct

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

updated e2es with new upstream ref

Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>

Add note to docs about upstreamRef

Signed-off-by: Kevin Dorosh <kevin.dorosh@solo.io>

Fix typo, improve clarity

Signed-off-by: Kevin Dorosh <kevin.dorosh@solo.io>
2021-05-14 08:07:15 -04:00
Iaroslav Vorozhko
d7999e6627 Added e2e test to check nginx update pass witth nginx validation webhook after canary promotion
Signed-off-by: Iaroslav Vorozhko <iaroslav.vorozhko@mcmakler.de>
2021-05-14 12:25:05 +02:00
Iaroslav Vorozhko
41481c1ca8 Adjusted tests to new behaviour on init and promotion
Signed-off-by: Iaroslav Vorozhko <iaroslav.vorozhko@mcmakler.de>
2021-05-13 14:45:33 +02:00
Iaroslav Vorozhko
e926486b0f Stop canary traffic after canary promotion
Signed-off-by: Iaroslav Vorozhko <iaroslav.vorozhko@mcmakler.de>
2021-05-13 14:45:33 +02:00
Stefan Prodan
3ad55c9750 Merge pull request #894 from saiskee/create-non-discovered-gloo-upstreams
Gloo: Create gloo upstreams from non-discovered services
2021-05-11 18:42:20 +03:00
Keerthan Ekbote
06c4151ec4 change port numbers in gloo progressive delivery docs
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-05-06 13:00:23 -04:00
Keerthan Ekbote
51605d9e04 Updated docs
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-05-06 10:26:33 -04:00
Stefan Prodan
438b558809 Merge pull request #902 from fluxcd/issue-template
Add issue templates for bug reports and enhancements
2021-05-06 11:57:40 +03:00
Stefan Prodan
293c44b2a5 Add issue templates for bug reports and enhancements
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-05-06 11:57:19 +03:00
Stefan Prodan
55de241f48 Merge pull request #898 from oliviermichaelis/om/rename-canaryphase
style: rename CanaryWaitingPromotion to CanaryPhaseWaitingPromotion
2021-05-06 11:37:48 +03:00
Stefan Prodan
fda1d32dec Merge pull request #900 from dholbach/update-adopters-location
Move list of production users
2021-05-06 11:29:32 +03:00
Daniel Holbach
b8d5295690 move list of production users
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-05-05 18:34:05 +02:00
Keerthan Ekbote
fdc8dd8795 fixed observers test
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-05-05 11:29:14 -04:00
Keerthan Ekbote
99b3775926 fixed typo in gloo/v1/types.go
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-05-05 11:21:43 -04:00
Keerthan Ekbote
f0f44c9d35 updated gloo unit tests
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-05-05 11:19:51 -04:00
Olivier Michaelis
d7b878f980 style: rename CanaryWaitingPromotion to CanaryPhaseWaitingPromotion
Renames the CanaryPhase to be more consistent with the existing phases.

Signed-off-by: Olivier Michaelis <38879457+oliviermichaelis@users.noreply.github.com>
2021-05-01 00:21:13 +02:00
Keerthan Ekbote
d8c8b90a95 make fmt
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-30 09:50:18 -04:00
Keerthan Ekbote
8be3d82ae9 Merge branch 'main' of https://github.com/fluxcd/flagger into create-non-discovered-gloo-upstreams 2021-04-29 19:16:05 -04:00
Keerthan Ekbote
fd778be943 updated prom queries to new envoy clusters
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-29 19:12:01 -04:00
Keerthan Ekbote
51936bdc89 changed upstream names in tests
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-29 12:19:52 -04:00
Keerthan Ekbote
2935fad54d fixed gloo upstream api group
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-29 11:43:39 -04:00
Stefan Prodan
c9257bdb99 Merge pull request #897 from fluxcd/release-v1.8.0
Release v1.8.0
2021-04-29 16:10:47 +03:00
Stefan Prodan
90a6ace666 Release v1.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-29 15:40:26 +03:00
Stefan Prodan
5eb2b5211c Merge pull request #896 from fluxcd/smi-v1alpha3
Implement SMI v1alpha3 router
2021-04-29 15:19:01 +03:00
Stefan Prodan
2ed9ddcdf8 Merge pull request #878 from AlonGluz/bugfix/scale-up-canary-after-confirm-rollout
Scale up canary on confirm rollout
2021-04-29 11:59:36 +03:00
Alon Gluzman
92f4be79ac Scale up canary on confirm rollout
Signed-off-by: Alon Gluzman <alon.gluzman@stackpulse.io>
2021-04-29 11:37:18 +03:00
Stefan Prodan
593f450093 Implement SMI v1alpha3 router
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-28 19:26:42 +03:00
Keerthan Ekbote
d20efe4509 make fmt
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-28 09:52:51 -04:00
Stefan Prodan
fcac992e71 Merge pull request #867 from carsonoid/patch-1
Update traefik-progressive-delivery.md
2021-04-28 15:02:19 +03:00
Stefan Prodan
d59663810c Merge pull request #872 from L3o-pold/feature/add-alerting-http-proxy
Add alerting http proxy option
2021-04-28 14:59:37 +03:00
Stefan Prodan
37abdbb774 Merge pull request #881 from andylibrian/charts-prometheus-security-context
Chart: Add securityContext parameter to prometheus deployment
2021-04-28 14:57:51 +03:00
Stefan Prodan
a5909682cd Merge pull request #887 from mayankshah1607/mayank/alert-muting
feat: Add option to mute alerts generated from webhooks
2021-04-28 14:56:47 +03:00
Stefan Prodan
927b4324ae Merge pull request #879 from fluxcd/smi-v1lapha2-router
Implement SMI v1alpha2 router
2021-04-28 13:22:43 +03:00
Stefan Prodan
1ae72dafca Merge pull request #895 from Nerja/fix_loadtester_pdb
Fix Deployment of Flagger loadtester to include the correct label
2021-04-28 12:22:39 +03:00
Marcus Rodan
392865ec59 Fix Deployment of Flagger loadtester to include the correct label
The Deployment of the Flagger loadtester did not contain the correct
label app.kubernetes.io/name. This label is used for the Flagger
deployment and it is also used in the PodDisruptionBudget for
the Flagger operator. I added the same label to the Flagger
load tester to make the PodDisruptionBudget work correctly
for the Flagger loadtester.

Signed-off-by: Marcus Rodan <marcusrodan@gmail.com>
2021-04-28 10:59:18 +02:00
Keerthan Ekbote
3f1af1ec85 added comment
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-27 17:14:30 -04:00
Keerthan Ekbote
487432d873 change: turned off discovery by default in tests
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-27 13:44:21 -04:00
Keerthan Ekbote
a1ff44454a change: Creating gloo upstreams from kube services
Signed-off-by: Keerthan Ekbote <keerthan.ekbote@solo.io>
2021-04-27 12:49:19 -04:00
Mayank Shah
05b0557430 Trigger CI
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2021-04-23 14:17:46 +05:30
Mayank Shah
975b84a2eb feat: Add option to mute alerts generated from webhooks
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2021-04-23 11:27:09 +05:30
Stefan Prodan
3e845f1a29 Merge pull request #884 from marcoferrer/add-ou-org-list
Add offerup to the organizations list
2021-04-15 10:52:12 +03:00
Marco Ferrer
49a266c207 Add offerup to the organizations list
Signed-off-by: Marco Ferrer <marrferr.cdx@gmail.com>
2021-04-14 12:50:57 -04:00
Andy Librian
7284e55eb0 Chart: Add securityContext parameter to prometheus deployment
Signed-off-by: Andy Librian <andylibrian@gmail.com>
2021-04-09 15:03:30 +07:00
Léopold Jacquot
b82fd5e5a5 Add alerting http proxy option
Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
2021-04-08 11:58:19 +02:00
Stefan Prodan
4b084cf685 Implement SMI v1alpha2 router
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-08 11:37:04 +03:00
Stefan Prodan
e6c740d917 Merge pull request #877 from fluxcd/cii-badge
Add CII Best Practices badge
2021-04-07 15:30:32 +03:00
Stefan Prodan
cb93a9a158 Add CII Best Practices badge
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-04-07 15:06:02 +03:00
Stefan Prodan
3ea65ea1ad Merge pull request #876 from Nerja/addedsinch
Added Sinch to Who is using Flagger
2021-04-06 15:09:45 +03:00
Marcus Rodan
70d91bb399 Added Sinch to Who is using Flagger
Removed diff

Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-04-06 13:32:16 +02:00
Carson A
f5fa18d7ca Update traefik-progressive-delivery.md
Use curly braces to specify an array value in helm set.

The latest versions of the chart need to have the additional arguments specified as a list or they error out:

```
Error: template: traefik/templates/_podtemplate.tpl:199:20: executing "traefik.podTemplate" at <.>: range can't iterate over --metrics.prometheus=true
```

Signed-off-by: Carson Anderson <carson.anderson@getweave.com>
2021-03-25 11:47:57 -06:00
Stefan Prodan
cb24c74769 Merge pull request #864 from fluxcd/release-v1.7.0
Release v1.7.0
2021-03-23 11:28:12 +02:00
Stefan Prodan
775dc91ede Release v1.7.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-23 11:00:35 +02:00
Stefan Prodan
ffef8ba4d9 Merge pull request #845 from Pothulapati/tarun/l5d-2.10
linkerd: update prometheus URL based on the latest 2.10 changes
2021-03-23 10:36:33 +02:00
Stefan Prodan
ef2df0d7bc Merge pull request #859 from jblackburn21/waiting-promotion-phase
feat: added WaitingPromotion phase
2021-03-23 10:36:06 +02:00
Jason Blackburn
f0bf5219d4 added WaitingPromotion phase and only generate one alert when transitioning into the phase
Signed-off-by: Jason Blackburn <jason.blackburn@outlook.com>
2021-03-19 08:04:18 -05:00
Stefan Prodan
c8a1165db2 Merge pull request #857 from fluxcd/update-deps-k8s
Update Kubernetes packages to v1.20.4
2021-03-17 16:38:03 +02:00
Stefan Prodan
e9c3518ce7 ci: Merge FOSSA and CodeQL workflows
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-17 16:07:48 +02:00
Stefan Prodan
a5ea6587c0 Update Alpine to v3.13
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-17 16:07:08 +02:00
Stefan Prodan
2792835d66 Update Kubernetes packages to v1.20.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-17 16:06:46 +02:00
Stefan Prodan
16867db1b4 Merge pull request #849 from mayankshah1607/mayank/confirm-traffic-webhook
feat: add webhook for manually approving traffic weight increase
2021-03-17 15:53:37 +02:00
Mayank Shah
164bbb884d Add docs for confirm-traffic-increase webhook
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2021-03-16 20:31:51 +05:30
Mayank Shah
873141b9ca Add webhook confirm-traffic-increase for manually approving traffic increase
Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2021-03-16 20:18:27 +05:30
Tarun Pothulapati
4a66a28c01 update to latest stable linkerd version
This commit updates the linkerd version to `2.10`, along with
the install script to download the arm version.

It also updates the install script and metricsTempalte to install
and use the viz Prometheus respectively.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-03-15 06:25:18 +00:00
Tarun Pothulapati
c886c1db62 Merge branch 'main' into tarun/l5d-2.10 2021-03-08 17:17:59 +00:00
Stefan Prodan
f2d121a13b Merge pull request #846 from fluxcd/update-e2e
e2e fix: Update Contour installer
2021-03-08 17:51:32 +02:00
Stefan Prodan
f255938780 e2e: Update Gloo to v1.6.13
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-08 17:24:29 +02:00
Stefan Prodan
aa17367de7 e2e: Update Contour to v1.13
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-08 16:28:27 +02:00
Stefan Prodan
d5df6df661 Run e2e on Kubernetes v1.20
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-03-08 16:23:53 +02:00
Tarun Pothulapati
ec6004963c use correct prom URL
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-03-08 14:06:20 +00:00
Tarun Pothulapati
61d272dbbc update readme
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-03-08 13:55:56 +00:00
Tarun Pothulapati
6be97b3fc7 linkerd: update prometheus URL based on the latest 2.10 changes
In Linkerd 2.10, The Prometheus instance moved into the `viz`
extension which is installed separately from the core
control-plane. This means that the prometheus now exists in
the `linkerd-viz` namespace by default unless overriden.

This PR updates the URl to reflect the same

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-03-08 13:46:38 +00:00
Stefan Prodan
6f95275051 Merge pull request #843 from gopisaba/faq
docs: update resources to disable mTLS in Istio
2021-03-07 13:08:24 +02:00
Gopi
49829fc80f docs: update resources to disable mTLS in Istio
Signed-off-by: Gopi <gopisaba@users.noreply.github.com>
2021-03-05 13:50:25 +00:00
Stefan Prodan
9112c5a064 Merge pull request #842 from Lapeyus/missing-helm-variable
chart: Add pull secret for Prometheus deployment
2021-03-05 07:44:06 +02:00
Joseph Villarreal Lopez
73c4833697 Add missing pull secret on Prometheus deployment
Prometheus deployment created by the Helm chart is missing a pull secret,
variable is necessary to pull the prometheus image from private a repository

Signed-off-by: Joseph Villarreal Lopez <lapeyus@gmail.com>
2021-03-04 18:49:19 -06:00
Stefan Prodan
f3ca6266ab Merge pull request #833 from KnechtionsCoding/main
docs: updating slack alerting docs to point to legacy slack webhooks
2021-02-27 10:32:56 +02:00
Hans Knecht
03acb869b7 docs: updating slack alert docs tone
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
2021-02-26 10:52:28 -05:00
Hans Knecht
8470d728f9 docs: updating slack alerting docs to point to legacy slack webhooks
Signed-off-by: Hans Knecht <Hans.Knecht@missionlane.com>
2021-02-26 10:44:48 -05:00
Stefan Prodan
71965b199b Merge pull request #832 from fluxcd/release-v1.6.4
Release v1.6.4
2021-02-26 15:24:54 +02:00
Stefan Prodan
fd47d385c2 Release v1.6.4
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-26 14:59:56 +02:00
Stefan Prodan
dfdd8cffd7 Merge pull request #831 from jddcarreira/fixMultipleAppMeshBackends
Fix AWS AppMesh issue when providing multiple backends
2021-02-26 11:13:57 +02:00
Stefan Prodan
138c42ec3a Merge pull request #821 from Becram/main
chart: add env option to loadtester
2021-02-26 11:13:29 +02:00
Stefan Prodan
e53723c9c2 Merge pull request #829 from bia/main
Consolidate logos and add project name logos
2021-02-26 11:07:21 +02:00
Joao Carreira
03be6a58ac Fix AWS AppMesh issue when providing multiple backends
Signed-off-by: Joao Carreira <jddcarreira@gmail.com>
2021-02-25 15:09:40 +00:00
bia
864f362f7d consolidate logos and add project name logos
Signed-off-by: bia <get.bianca@gmail.com>
2021-02-24 18:25:49 +01:00
Stefan Prodan
bfb329b2f3 Merge pull request #825 from Multiply/chore-user-list-trendhim
Add Trendhim to user list
2021-02-23 12:24:03 +02:00
Jens Fosgerau
4ce65be0c6 Add Trendhim to user list
Signed-off-by: Jens Fosgerau <multiply@juhp.net>
2021-02-23 10:57:43 +01:00
Stefan Prodan
6ab598d71b Merge pull request #819 from Nerja/loadtesterimprovements
chart: Added PodDisruptionBudget for the loadtester
2021-02-22 11:45:52 +02:00
Becram
06b8ab4096 add environment variable in chart for loadtester
Signed-off-by: Becram <bikram.dhoju@gmail.com>
2021-02-19 22:09:20 +07:00
Marcus Rodan
596bb6487c Added PDB for the loadtester
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-18 12:16:43 +01:00
Stefan Prodan
fa33a3e4bb Merge pull request #813 from fluxcd/release-1.6.3
Release v1.6.3
2021-02-15 15:13:36 +02:00
Stefan Prodan
abecb891dd Release v1.6.3
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-15 14:43:53 +02:00
Stefan Prodan
fa14cebbf4 Merge pull request #812 from fluxcd/new-logo
New Flagger logo
2021-02-15 14:26:22 +02:00
Stefan Prodan
bde24d28b7 Update project description
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-15 14:03:32 +02:00
Stefan Prodan
c0b400eb7c Update logo in diagrams
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-15 13:38:58 +02:00
Stefan Prodan
4772c91835 Update logo in Helm charts
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-13 13:40:20 +02:00
Stefan Prodan
6da8d919b3 Add Flagger's new logo pack
Design by Bianca Cheng Costanzo

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-02-13 13:40:06 +02:00
Stefan Prodan
10b5504446 Merge pull request #806 from Nerja/fixedspreadconstraintssuffixes
Rewrite the primary Pod Topology Spread Constraints based on label selector
2021-02-13 12:03:04 +02:00
Marcus Rodan
76b73a6319 Update faq.md
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-08 19:47:58 +01:00
Marcus Rodan
0bebfbbb23 Added info to FAQ about anti-affinity
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-08 19:47:58 +01:00
Marcus Rodan
8cb147920b Adds suffix for spread constraints
Added unit test assertions

Changed comment

Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-08 19:47:58 +01:00
Stefan Prodan
5cb343d89f Merge pull request #799 from Nerja/main
Check if mandatory secrets/configmaps exist
2021-02-04 18:32:26 +02:00
Stefan Prodan
67f34f1b29 Merge pull request #805 from Nerja/fixantiaffinity
Suffix only the podAntiAffinity values that match the deployment name
2021-02-04 18:30:15 +02:00
Marcus Rodan
349d781085 Fixed antiaffinity suffixing
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-04 17:02:40 +01:00
Stefan Prodan
d7524414ce Merge pull request #800 from fluxcd/add-codeql
Add CodeQL Security Scanning
2021-02-03 11:29:16 +02:00
Chris Aniszczyk
2e6cccaa90 Add CodeQL Security Scanning
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2021-02-02 10:18:20 -06:00
Marcus Rodan
565b99e210 Added check for optional
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-02 09:56:14 +01:00
Stefan Prodan
5eb37b8f76 Merge pull request #798 from feuyeux/main
Add guide for installing Flagger on AlibabaServiceMesh
2021-02-02 10:01:40 +02:00
六翁
41cb713367 guide for installing flagger on asm
Signed-off-by: 六翁 <lu.hl@alibaba-inc.com>
2021-02-02 12:14:32 +08:00
Stefan Prodan
b29fe1f13b Merge pull request #792 from Prajithp/main
add custom metadata in event webhook
2021-02-01 19:35:31 +02:00
Prajith Ndz
339780dcc4 update event webhook doc with example
Signed-off-by: Prajith Ndz <prajithpalakkuda@gmail.com>
2021-02-01 22:34:27 +05:30
Marcus Rodan
56c77085bf Added checks for API server errors
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-02-01 17:36:47 +01:00
Stefan Prodan
118cac5941 Merge pull request #796 from jhuliano/faq-improvements
Document the behavior of skipAnalysis during the initialization
2021-01-28 14:41:32 +02:00
Jhuliano Skittberg Moreno
7027f18394 documents downtime during initialization when using skipAnalysis=false
Signed-off-by: Jhuliano Skittberg Moreno <jhuliano.moreno@typeform.com>
2021-01-28 13:00:39 +01:00
Jhuliano Skittberg Moreno
99a85205f0 replaces bold format with h4 on questions
Signed-off-by: Jhuliano Skittberg Moreno <jhuliano.moreno@typeform.com>
2021-01-28 13:00:39 +01:00
Stefan Prodan
4b8d8718c2 Release v1.6.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-28 10:11:45 +02:00
Stefan Prodan
0c4dd94e38 Merge pull request #794 from fluxcd/alert-crd
Add alerts section to Canary CRD schema
2021-01-28 10:04:18 +02:00
Stefan Prodan
52cec59ca3 Add channel and username to AlertProvider CRD schema
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-28 09:42:02 +02:00
Stefan Prodan
2c1ba42bcc Merge pull request #788 from Nerja/podantiaffinityfix
Support for adding -primary suffix to Anti-Affinity values
2021-01-28 09:16:54 +02:00
Stefan Prodan
6d204b52ce Add alerts section to Canary CRD schema
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-28 09:00:53 +02:00
Prajith Ndz
55c3745ef8 fix code style
Signed-off-by: Prajith Ndz <prajithpalakkuda@gmail.com>
2021-01-27 21:05:57 +05:30
Prajith Ndz
c876f879de add custom metadata in event webhook
Signed-off-by: Prajith Ndz <prajithpalakkuda@gmail.com>
2021-01-27 20:58:48 +05:30
Marcus Rodan
f2beab1fdc Moved implementation
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-01-26 19:27:50 +01:00
Marcus Rodan
85af1abb26 Added suffix -primary to antiaffinity values
Signed-off-by: Marcus Rodan <marcus.rodan@sinch.com>
2021-01-26 19:27:50 +01:00
Stefan Prodan
4f54901d08 Merge pull request #785 from dholbach/cncf-slack
Link to CNCF Slack
2021-01-20 17:30:52 +02:00
Daniel Holbach
98b10866bf link to new Slack, at CNCF
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-01-20 14:51:33 +01:00
Stefan Prodan
ccf4dc55e9 Merge pull request #783 from fluxcd/fossa
Add CNCF's FOSSA scanning to CI
2021-01-19 13:37:29 +02:00
Stefan Prodan
8ce90e1814 Add CNCF's FOSSA scanning to CI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-19 11:57:22 +02:00
Stefan Prodan
2b6047d124 Merge pull request #782 from fluxcd/release-v1.6.1
Release v1.6.1
2021-01-19 11:37:25 +02:00
Stefan Prodan
05e832ed55 Release v1.6.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-19 11:10:34 +02:00
Stefan Prodan
45fddab9a9 Merge pull request #781 from kyanagimoto/secret-restart-analysis
Add missing TrackedConfig field to Canary status CRD
2021-01-19 11:01:49 +02:00
vito-laurenza-zocdoc
34e9c0da6b chore: reproduce restart analysis issue
Signed-off-by: kyanagimoto <koichiyanagimoto@gmail.com>
2021-01-19 16:11:34 +09:00
Stefan Prodan
9891375c20 Merge pull request #778 from fluxcd/e2e-updates
e2e: Update Istio to v1.8.2 and Contour to v1.11.0
2021-01-15 14:38:11 +02:00
Stefan Prodan
377f145a3f e2e: Update Istio to v1.8.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-15 13:47:05 +02:00
Stefan Prodan
6c7fff080f e2e: Update Contour to v1.11.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-15 13:39:48 +02:00
Stefan Prodan
b1a168c5f2 Merge pull request #777 from h-r-k-matsumoto/update-istio-v1alpha3
Update HTTPMatchRequest to match Istio's definitions
2021-01-15 13:34:29 +02:00
Hiroki Matsumoto
d15df9ae88 Reflect the latest Istio version v1alpha3
Signed-off-by: Hiroki Matsumoto <hiroki.matsumoto.ggg@gmail.com>
2021-01-12 21:08:29 +09:00
Stefan Prodan
c7d93d9ca7 Merge pull request #774 from fluxcd/release-v1.6.0
Release v1.6.0
2021-01-05 15:08:08 +02:00
Stefan Prodan
0ae4ccede1 Release v1.6.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-05 14:46:20 +02:00
Stefan Prodan
c6aa66ab94 Merge pull request #772 from fluxcd/crd-v1
Upgrade CRDs to apiextensions.k8s.io/v1
2021-01-05 13:51:40 +02:00
Stefan Prodan
2e10d8bf05 Format docs markdown
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-05 12:28:56 +02:00
Stefan Prodan
f64295bcee Update Kubernetes packages to v1.20.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 22:33:16 +02:00
Stefan Prodan
3fe8119e0c Set Kubernetes min version to 1.16
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 21:35:54 +02:00
Stefan Prodan
b6880213ce Upgrade CRDs to apiextensions.k8s.io/v1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 17:29:45 +02:00
Stefan Prodan
aca6b2b558 Merge pull request #771 from fluxcd/update-nginx-helm
Update NGINX ingress Helm repository
2021-01-04 16:02:07 +02:00
Stefan Prodan
aa33af25fc Change branch from master to main in docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 15:32:19 +02:00
Stefan Prodan
aa3a93da98 Update NGINX ingress Helm repository
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 15:30:26 +02:00
Stefan Prodan
b42db67d85 Merge pull request #770 from fluxcd/fixes
Use fluxcd registry in base kustomization
2021-01-04 14:51:10 +02:00
Stefan Prodan
0d2163cd94 e2e: Expose traefik as NodePort
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 12:11:49 +02:00
Stefan Prodan
371e177ff3 Use fluxcd registry in base kustomization
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2021-01-04 11:11:41 +02:00
Stefan Prodan
e62668ab48 Merge pull request #765 from kdorosh/gloo_route_tables
A/B testing support for Gloo Edge ingress controller
2021-01-04 09:58:38 +02:00
Kevin Dorosh
005e3928e7 Gloo tests pass now, traefik ones have flake?
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-31 17:19:41 -05:00
Kevin Dorosh
0d5b2a2277 Might have done previous commit before release finished, kick
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-31 17:00:29 -05:00
Kevin Dorosh
bc8cfa91ee Update to Gloo Edge 1.6.0 now that it's released
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-31 16:17:01 -05:00
Stefan Prodan
63b217faee Merge pull request #766 from fluxcd/chart-linting-off
Disable Helm chart linting
2020-12-22 18:18:42 +02:00
Stefan Prodan
376bf194b3 Disable Helm chart linting
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 18:16:19 +02:00
Kevin Dorosh
a69e9abf3c Remove upstream group
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:20:07 -05:00
Kevin Dorosh
c22529bbd0 codegen
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:18:08 -05:00
Kevin Dorosh
6fd8498f6d We are generating 404s not 400s
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:50 -05:00
Kevin Dorosh
39cce0196f Guide is working
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:50 -05:00
Kevin Dorosh
4e39e5608c Fix rebase
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:20 -05:00
Kevin Dorosh
ba4d16fd76 Remove dated comment
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:20 -05:00
Kevin Dorosh
b9f14ee57a Update to use new Gloo Edge 1.6 API
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:20 -05:00
Kevin Dorosh
a3f791be17 First pass A/B testing
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:20 -05:00
Kevin Dorosh
41497c73f4 Update documented flow
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:09:20 -05:00
Kevin Dorosh
2e1b3fc8de Fix json naming
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
44cf4d08e9 Fix test
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
ca07b47523 Fix compile error
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
8fceafc017 Fix api mistakes
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
47dcf6a7b9 Add permissions
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
c63ec2d95d Update gloo logic to use route tables, cleanup
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:55 -05:00
Kevin Dorosh
f4aeb98744 Add route table codegen
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:05:29 -05:00
Kevin Dorosh
e6aefb8f4b Initial commit
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:03:41 -05:00
Kevin Dorosh
6cf1f35eca Small docs fixes
Signed-off-by: Kevin Dorosh <kcdorosh@gmail.com>
2020-12-22 10:03:41 -05:00
Stefan Prodan
cff742d7c4 Merge pull request #764 from fluxcd/release-v1.5.0
Release v1.5.0
2020-12-22 16:55:29 +02:00
Stefan Prodan
67f8f414bf Merge pull request #763 from fluxcd/ghcr
Publish multi-arch image to GitHub Container Registry
2020-12-22 16:54:37 +02:00
Stefan Prodan
ecf73e967a Release v1.5.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 16:18:00 +02:00
Stefan Prodan
7f8986a06d Merge pull request #763 from fluxcd/ghcr
Publish multi-arch image to GitHub Container Registry
2020-12-22 15:16:10 +02:00
Stefan Prodan
ec6aab2c8d Publish multi-arch image to GitHub Container Registry
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 14:53:01 +02:00
Stefan Prodan
b8625d5e1e Merge pull request #762 from fluxcd/label-prefix
Add e2e tests for label prefix inclusion
2020-12-22 13:26:33 +02:00
Stefan Prodan
0fa4654034 Add label prefix e2e test
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 12:57:43 +02:00
Stefan Prodan
6349dbf5c0 Include app.kubernetes.io labels by default
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 12:45:03 +02:00
Stefan Prodan
c8cec8e18b Enable running tests on demand
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-22 12:41:30 +02:00
Stefan Prodan
70114e3fd3 Merge pull request #756 from fluxcd/copyright-flux
Copyright Flux authors
2020-12-21 20:09:33 +02:00
Stefan Prodan
cd75c5fa25 Copyright Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 19:44:52 +02:00
Stefan Prodan
1535f7aa41 Merge pull request #755 from fluxcd/fluxcd
Rename imports to fluxcd/flagger
2020-12-21 19:24:48 +02:00
Stefan Prodan
90abb7ba5b Rename imports to fluxcd/flagger
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 19:02:23 +02:00
Stefan Prodan
e6739711b0 Merge pull request #754 from weaveworks/github-actions
Migrate CI to GitHub Actions
2020-12-21 18:38:28 +02:00
Stefan Prodan
333780e78b Disable CircleCI main build
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 17:26:05 +02:00
Stefan Prodan
38777801de Upload coverage to Codecov
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 17:04:31 +02:00
Stefan Prodan
3750ed850c Merge pull request #749 from Nerja/pdb
Added PodDisruptionBudget to the Flagger Chart
2020-12-21 16:05:19 +02:00
Stefan Prodan
fda53fbf80 Remove CircleCI testing framework
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 11:52:13 +02:00
Stefan Prodan
c8a472c01b Add Skipper e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 10:05:04 +02:00
Stefan Prodan
ccd64a3df9 Add Kubernetes B/G e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 01:12:53 +02:00
Stefan Prodan
2ea13cec88 Add Gloo e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 00:26:36 +02:00
Stefan Prodan
5afc800b11 Cleanup Istio e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 22:35:17 +02:00
Stefan Prodan
1fb898ac22 Cleanup e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 22:22:39 +02:00
Stefan Prodan
73b7fc1cfc Add Traefik e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 22:21:02 +02:00
Stefan Prodan
b25ff35e5b Use test workloads in e2e
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 22:08:43 +02:00
Stefan Prodan
4fe4053cdd Add workloads to e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 21:38:07 +02:00
Stefan Prodan
ed70160583 Add NGINX Ingress e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 21:20:48 +02:00
Stefan Prodan
bb00f8cabd Add Contour e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 19:15:10 +02:00
Stefan Prodan
7bef999c41 Add Linkerd e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 17:59:16 +02:00
Stefan Prodan
a2774d92da Add Istio e2e tests
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 17:24:39 +02:00
Stefan Prodan
be9b03d99b Add release workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 17:07:32 +02:00
Stefan Prodan
b4af9e5f32 Add build workflow
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 17:07:18 +02:00
Stefan Prodan
3ba2762805 Add multi-arch Dockerfile
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 17:06:19 +02:00
Stefan Prodan
2884a80d31 Disable CircleCI
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-20 14:13:56 +02:00
Marcus Rodan
54266acfb1 Added entry to README and added default values 2020-12-10 12:11:19 +01:00
Marcus Rodan
9cb44815c4 Add pdb resource 2020-12-10 09:51:04 +01:00
Stefan Prodan
27b2616330 Merge pull request #748 from weaveworks/release-v1.4.2
Release v1.4.2
2020-12-09 14:52:43 +02:00
Stefan Prodan
8ed729cd54 Release v1.4.2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-09 13:14:33 +02:00
Stefan Prodan
34f7bca33c Merge pull request #747 from weaveworks/update-prom-grafana
Update Prometheus and Grafana
2020-12-09 12:04:15 +02:00
Stefan Prodan
fee442ffe0 Update Prometheus and Grafana
- Prometheus 2.23.0
- Grafana 7.3.4

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-09 11:20:23 +02:00
Stefan Prodan
eb890ef174 Merge pull request #746 from weaveworks/prom-auth-docs
Add Prometheus basic-auth config to docs
2020-12-09 11:01:54 +02:00
Stefan Prodan
24c61df388 Add Prometheus basic-auth config to docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-09 10:19:25 +02:00
Stefan Prodan
bfb3331457 Merge pull request #745 from Nerja/delegate
Fix for VirtualService delegation when analysis is enabled
2020-12-09 10:08:20 +02:00
Marcus Rodan
7fc6f8a04d Changed to using the old e2e test scenario 2020-12-08 18:08:44 +01:00
Marcus Rodan
3c37020260 Changed test file permissions 2020-12-08 16:54:00 +01:00
Marcus Rodan
d05b684dbe Remove log line 2020-12-08 16:14:15 +01:00
Marcus Rodan
da978254b1 Fix issue 2020-12-08 16:12:12 +01:00
Stefan Prodan
0cfeceb3c9 Merge pull request #744 from weaveworks/release-v1.4.1
Release v1.4.1
2020-12-08 15:09:17 +02:00
Stefan Prodan
814aee8f4f Release v1.4.1
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-08 14:43:52 +02:00
Stefan Prodan
48bfb062d8 Merge pull request #743 from relu/exclude-labels-for-cm-secrets
Apply label prefix rules for cm and secrets
2020-12-08 13:37:01 +02:00
Aurel Canciu
08be31f022 Apply label prefix rules for cm and secrets
Copying of Configmaps and Secrets managed through Flagger should now
follow the same label prefix filtering rules as for the workloads.

Extends: #709

Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-12-08 12:55:45 +02:00
Stefan Prodan
39380d4ce8 Merge pull request #741 from weaveworks/release-v1.4.0
Release v1.4.0
2020-12-07 11:59:49 +02:00
Stefan Prodan
1b9e575ba5 Release v1.4.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-07 11:39:08 +02:00
Stefan Prodan
128c883755 Update docs and examples to HPA v2beta2
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-07 11:24:01 +02:00
Stefan Prodan
a244e00057 Merge pull request #740 from tr-fteixeira/hpa-behavior
Add support to HPA behaviors on canaries
2020-12-07 11:13:52 +02:00
Fernando Teixeira
afc063ae9a update tests to use autoscaling/v2beta2 2020-12-06 15:23:08 -05:00
Stefan Prodan
0827622985 Merge pull request #736 from nmlc/traefik
Traefik support
2020-12-06 10:23:16 +02:00
Fernando Teixeira
83dae63989 add support to hpa behaviors on canaries 2020-12-06 00:51:20 -05:00
nmlc
578361a2b0 [traefik] Fix documentation 2020-12-02 05:22:50 +05:00
nmlc
553e1b38bc [traefik] Add documentation 2020-12-01 05:17:33 +05:00
nmlc
635bc83259 [traefik] Add CircleCI tests 2020-11-26 06:00:15 +05:00
nmlc
746507dcc9 [traefik] Remove TraefikService metadata from canary spec 2020-11-26 05:52:42 +05:00
nmlc
adeb585de1 [traefik] add e2e test 2020-11-25 07:55:05 +05:00
nmlc
9c4edc602a [traefik] Update chart: crd & rbac 2020-11-25 07:54:28 +05:00
nmlc
642d3678ec [traefik] Implement observer interface 2020-11-25 07:54:15 +05:00
nmlc
2c1d998c43 [traefik] Implement router interface 2020-11-25 07:54:00 +05:00
nmlc
a3b9ed126d [traefik] Api changes & codegen 2020-11-25 07:50:54 +05:00
Stefan Prodan
2f027de91f Merge pull request #735 from mattchrist/update_faq
fix typo in faq
2020-11-23 17:10:18 +02:00
Matt Christ
b8c9fcfb91 fix typo 2020-11-23 08:16:05 -06:00
Stefan Prodan
1b81ea5a10 Merge pull request #734 from weaveworks/releases-v1.3.0
Release v1.3.0
2020-11-23 14:52:20 +02:00
Stefan Prodan
82bf73e8da Release v1.3.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-23 13:59:43 +02:00
Stefan Prodan
58de5ab198 Merge pull request #733 from weaveworks/deps-update
Update Istio to v1.8.0
2020-11-23 13:47:16 +02:00
Stefan Prodan
6a0ab874b8 Update Istio docs for v1.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-23 12:58:06 +02:00
Stefan Prodan
8301a2c1ba Update Istio e2e tests to v1.8.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-23 12:40:07 +02:00
Stefan Prodan
9b5b1a1421 Merge pull request #731 from mattchrist/update_faq
Update faq with correct prometheus queries for Contour & Gloo (fixes #730)
2020-11-23 11:11:24 +02:00
Stefan Prodan
bc5150903c Merge pull request #729 from jddcarreira/supportAppMeshBackendARN
Support AWS App Mesh backends ARN
2020-11-23 11:10:45 +02:00
Matt Christ
0c017f916b Update faq with correct prometheus queries for Contour & Gloo 2020-11-20 09:30:29 -06:00
João Carreira
df6fb2251d Merge branch 'master' of github.com:jddcarreira/flagger into supportAppMeshBackendARN 2020-11-20 12:41:24 +00:00
Stefan Prodan
4c3bab7ed7 Merge pull request #726 from robq99/feat/custom-weights-in-progression
feat: custom weights in progression
2020-11-20 13:54:41 +02:00
João Carreira
74efb784a2 Update App Mesh guide with ARN usage in backends 2020-11-20 11:37:13 +00:00
João Carreira
5a856c98aa Use strings.HasPrefix instead of manual count of prefix 2020-11-20 10:43:28 +00:00
João Carreira
a9c96fa888 update th usage of App Mesh types 2020-11-20 10:34:10 +00:00
João Carreira
7ab9061899 Update AWS App Mesh types 2020-11-20 10:33:25 +00:00
João Carreira
e149125eaa validate if its an ARN 2020-11-19 16:19:16 +00:00
robq99
c53cbac22c fix: tests added, edge cases protection added 2020-11-18 12:20:42 +01:00
robq99
90bccf748b fix: rollout weights moved to canary doc 2020-11-18 10:09:04 +01:00
Robert Kwolek
1ea2e22734 fix: full weight => total weight 2020-11-17 16:30:45 +01:00
Robert Kwolek
2a0473fc9b fix: fullWeight removed, fullWeight => totalWeight 2020-11-17 09:00:21 +01:00
Robert Kwolek
67dca9c7ad Merge remote-tracking branch 'upstream/master' 2020-11-12 20:47:37 +01:00
Stefan Prodan
9667664853 Merge pull request #725 from sfrique/add-qps-and-burts-config-2
Add QPS and Burst configs for kubernetes client
2020-11-12 17:51:13 +02:00
Henrique Fernandes
4db9701c62 Add QPS and Burst configs for kubernetes client
Implemented as requested in PR723
supersedes: https://github.com/weaveworks/flagger/pull/723
fixes: https://github.com/weaveworks/flagger/issues/638
2020-11-11 17:48:27 -03:00
Stefan Prodan
4a805be5cd Merge pull request #721 from kingdonb/patch-3
Fixup some typos
2020-11-04 16:49:50 +02:00
Kingdon Barrett
3abeea43d0 Fix Typo in skipper-progressive-delivery.md
"exmaple" -> example
2020-11-03 18:13:48 -05:00
Kingdon Barrett
f51629d6b5 Fix Typo in nginx-progressive-delivery.md
"exmaple" -> example
2020-11-03 18:11:13 -05:00
Kazuki Nitta
a624a2977e Add support for Istio VirtualService delegation (#715)
Add support for Istio VirtualService delegation
2020-10-28 11:38:54 +02:00
Stefan Prodan
5ae5530c35 Merge pull request #718 from seankhliao/patch-1
fix release date
2020-10-28 10:02:11 +02:00
Sean Liao
1c58301fd7 fix release date 2020-10-27 19:47:07 +01:00
Stefan Prodan
690da0005d Merge pull request #714 from weaveworks/gitops-toolkit-roadmap
Add GitOps Toolkit integration to roadmap
2020-10-22 15:33:39 +03:00
Stefan Prodan
4d9fbc5da6 Merge pull request #709 from worldtiki/exclude-labels
Copy labels from canary to primary workloads based on prefix rules
2020-10-21 18:12:51 +03:00
Daniel Albuquerque
fbece964e0 Copy annotations to deployment and daemonset 2020-10-21 14:20:09 +01:00
Stefan Prodan
d3e855ac86 Add GitOps Toolkit integration to roadmap
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-10-21 15:24:48 +03:00
Daniel Albuquerque
bd536b689f Fix filtering of labels 2020-10-14 15:20:15 +01:00
Daniel Albuquerque
5ca5647fab Remove refs to jenkins 2020-10-13 22:01:49 +01:00
Daniel Albuquerque
bef02d8e1f Rename proprty from exclude to include 2020-10-13 22:00:31 +01:00
Daniel Albuquerque
8b87cf1757 MIssing commit 2020-10-13 21:59:26 +01:00
Daniel Albuquerque
6ec377181a Change from exclude labels to include labels 2020-10-13 21:58:47 +01:00
Daniel Albuquerque
23e59168af Exclude controller labels by prefix 2020-10-11 14:10:16 +01:00
Stefan Prodan
2f58e51242 Merge pull request #704 from Brick7Face/spell-fix
fix spelling of "template" in scheduler_metrics.go
2020-10-01 18:07:53 +03:00
Nate Tranel
79f0381c52 fix spelling of template 2020-10-01 08:06:39 -06:00
Stefan Prodan
14adedba6a Merge pull request #702 from weaveworks/release-v1.2.0
Release v1.2.0
2020-09-29 09:43:46 +03:00
stefanprodan
f2608e627c Release v1.2.0 2020-09-29 09:13:12 +03:00
Stefan Prodan
17237fbb3e Merge pull request #695 from worldtiki/skip_analysis
Do not promote when not ready on skip analysis
2020-09-29 08:48:43 +03:00
Daniel Albuquerque
065c8640e7 Remove metadata tests (unrelated to skip analysis) 2020-09-19 17:39:54 +01:00
Daniel Albuquerque
1a90392400 Add set -o errexit 2020-09-19 15:15:39 +01:00
Daniel Albuquerque
3b6302640f Remove custom metrics (not needed for tests) 2020-09-18 19:51:03 +01:00
Daniel Albuquerque
26d53dcd44 diff test stucture for istio 2020-09-18 19:05:45 +01:00
Daniel Albuquerque
0eee5b7402 Revert changes in skip analysis condition 2020-09-18 18:43:27 +01:00
Daniel Albuquerque
4b098cc7a2 Better assertion for new tests 2020-09-18 18:17:50 +01:00
Daniel Albuquerque
8119acb40a Remove comment :) 2020-09-18 18:00:38 +01:00
Daniel Albuquerque
013949a9f4 Add tests for when canary analysis is skipped 2020-09-18 17:59:16 +01:00
Stefan Prodan
6d65a2c897 Merge pull request #685 from splkforrest/add-label-value
Derive the label selector value from the target matchLabels
2020-09-17 13:19:49 +03:00
Stefan Prodan
fba16aa1f5 Merge pull request #691 from fpetkovski/newrelic-provider
Add New Relic as a metrics provider
2020-09-17 13:15:00 +03:00
Daniel Albuquerque
2907526452 Do not promote when not ready on skip analysis 2020-09-14 19:46:35 +01:00
Stefan Prodan
04a8759159 Merge pull request #692 from erkannt/patch-1
Add eLife to orgs using flagger
2020-09-10 14:56:54 +03:00
Daniel Haarhoff
d62e7f678f Add eLife to orgs using flagger 2020-09-10 12:22:05 +01:00
Filip Petkovski
8b3296c065 Apply suggestions from code review
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-09-10 09:19:36 +02:00
Filip Petkovski
563b1cd88d Add New Relic provider to the documentation 2020-09-10 09:11:33 +02:00
Filip Petkovski
c81e19c48a Add newrelic as to the provider type enum 2020-09-09 18:12:18 +02:00
Filip Petkovski
68e4e1cc68 Apply suggestions from code review
Co-authored-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-09-09 13:51:27 +02:00
Filip Petkovski
2c249e2a92 Add New Relic as a metrics provider 2020-09-09 12:10:53 +02:00
Forrest Thomas
6c35f7611b address PR review comments and remove unnecessary configuration from Canary CR in e2e tests 2020-09-04 09:35:11 -07:00
Forrest Thomas
7793f0b29d add e2e nginx tests for inconsistent naming between service name and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
930eb8919d add e2e linkerd tests for inconsistent naming between service name and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
7ade97790e update e2e istio test to query the canary service instead of the apex service 2020-09-02 12:46:02 -07:00
Forrest Thomas
29c3056940 add e2e gloo tests for inconsistent naming between service name and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
2abfec05c9 add e2e contour tests for inconsistent naming between service name and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
621150cce6 add e2e istio tests for inconsistent naming between service name and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
ef57dcf75d add a small test for verifying the label selector is named as expected for daemonsets 2020-09-02 12:46:02 -07:00
Forrest Thomas
1bd7ce4eed add a small test for verifying the label selector is named as expected for deployments 2020-09-02 12:46:02 -07:00
Forrest Thomas
364fd0db65 setup daemonset tests to allow configurable name, label and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
b378b3eb5d setup deployment tests to allow configurable name, label and selector 2020-09-02 12:46:02 -07:00
Forrest Thomas
0db82b64f7 correct formatting 2020-09-02 12:46:02 -07:00
Forrest Thomas
c9dc5c5936 fix incorrect primary label value during promotion 2020-09-02 12:46:02 -07:00
Forrest Thomas
6f372d787d fix the incorrect primary label value 2020-09-02 12:46:02 -07:00
Forrest Thomas
f70f43bb3d use the existing labelSelector value instead of using the service name as the value 2020-09-02 12:46:02 -07:00
Stefan Prodan
c6f3a87bb3 Merge pull request #684 from xichengliudui/master
add istio 1.7 install command
2020-09-02 12:01:05 +03:00
xichengliudui
8e7aa29ef1 add istio 1.7 install command 2020-09-02 01:30:53 -07:00
Stefan Prodan
fb66cd3d94 Merge pull request #681 from o11n/preservePredicates
Skipper: preserve Predicates
2020-08-29 11:34:18 +03:00
Samuel Lang
e7da8c3f35 Skipper: preserve Predicates
Current implementation did overwrite potentially existing Predicates.

We face the situation that we need to add further Predicates which we need to keep in order to have  a proper route setup
2020-08-26 12:00:36 +02:00
Robert Kwolek
a6a38c6a7a fix: go fixes 2020-08-25 12:22:57 +02:00
Robert Kwolek
0ccf97bec1 fix: max weight for steps fixed 2020-08-25 10:34:59 +02:00
Robert Kwolek
ab80bcde44 doc: tutorial link added 2020-08-21 09:01:35 +02:00
Robert Kwolek
a58c0ac2c9 doc: rollout weights moved out of Linkerd 2020-08-21 08:59:44 +02:00
Robert Kwolek
c55fd94b67 doc: weighted rollout doc added 2020-08-20 21:38:11 +02:00
Robert Kwolek
16a6df59ab Merge remote-tracking branch 'upstream/master' 2020-08-20 21:03:43 +02:00
Robert Kwolek
906103daa5 feat: weighted deployments 2020-08-20 20:56:10 +02:00
Takeshi Yoneda
ce69a180d8 Merge pull request #679 from weaveworks/feature/optimized-config-disabled
pkg/canary: add unit test of configIsDisabled and its optimization
2020-08-20 21:33:05 +09:00
mathetake
87c090ad8c pkg/canary: add unit test of configIsDisabled and its optimization 2020-08-20 21:15:27 +09:00
678 changed files with 38488 additions and 8854 deletions

View File

@@ -1,275 +0,0 @@
version: 2.1
jobs:
build-binary:
docker:
- image: circleci/golang:1.14
working_directory: ~/build
steps:
- checkout
- restore_cache:
keys:
- go-mod-v3-{{ checksum "go.sum" }}
- run:
name: Run go mod download
command: go mod download
- run:
name: Check code formatting
command: go install golang.org/x/tools/cmd/goimports && make test-fmt
- run:
name: Build Flagger
command: |
CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X github.com/weaveworks/flagger/pkg/version.REVISION=${CIRCLE_SHA1}" \
-a -installsuffix cgo -o bin/flagger ./cmd/flagger/*.go
- run:
name: Build Flagger load tester
command: |
CGO_ENABLED=0 GOOS=linux go build \
-a -installsuffix cgo -o bin/loadtester ./cmd/loadtester/*.go
- run:
name: Run unit tests
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
bash <(curl -s https://codecov.io/bash)
- run:
name: Verify code gen
command: make test-codegen
- save_cache:
key: go-mod-v3-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod/"
- persist_to_workspace:
root: bin
paths:
- flagger
- loadtester
push-container:
docker:
- image: circleci/golang:1.14
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/container-push.sh
push-binary:
docker:
- image: circleci/golang:1.14
working_directory: ~/build
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- restore_cache:
keys:
- go-mod-v3-{{ checksum "go.sum" }}
- run: make release-notes
- run: github-release-notes -org weaveworks -repo flagger -since-latest-release -include-author > /tmp/release.txt
- run: test/goreleaser.sh
e2e-kubernetes-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh v1.18.2
- run: test/e2e-kubernetes.sh
- run: test/e2e-kubernetes-tests-deployment.sh
- run: test/e2e-kubernetes-cleanup.sh
- run: test/e2e-kubernetes-tests-daemonset.sh
e2e-istio-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh v1.18.2
- run: test/e2e-istio.sh
- run: test/e2e-istio-tests.sh
e2e-gloo-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh
- run: test/e2e-gloo.sh
- run: test/e2e-gloo-tests.sh
e2e-nginx-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh
- run: test/e2e-nginx.sh
- run: test/e2e-nginx-tests.sh
- run: test/e2e-nginx-cleanup.sh
- run: test/e2e-nginx-custom-annotations.sh
- run: test/e2e-nginx-tests.sh
e2e-linkerd-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh
- run: test/e2e-linkerd.sh
- run: test/e2e-linkerd-tests.sh
e2e-contour-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh
- run: test/e2e-contour.sh
- run: test/e2e-contour-tests.sh
e2e-skipper-testing:
machine: true
steps:
- checkout
- attach_workspace:
at: /tmp/bin
- run: test/container-build.sh
- run: test/e2e-kind.sh
- run: test/e2e-skipper.sh
- run: test/e2e-skipper-tests.sh
- run: test/e2e-skipper-cleanup.sh
push-helm-charts:
docker:
- image: circleci/golang:1.14
steps:
- checkout
- run:
name: Install kubectl
command: sudo curl -L https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && sudo chmod +x /usr/local/bin/kubectl
- run:
name: Install helm
command: sudo curl -L https://storage.googleapis.com/kubernetes-helm/helm-v2.14.2-linux-amd64.tar.gz | tar xz && sudo mv linux-amd64/helm /bin/helm && sudo rm -rf linux-amd64
- run:
name: Initialize helm
command: helm init --client-only --kubeconfig=$HOME/.kube/kubeconfig
- run:
name: Lint charts
command: |
helm lint ./charts/*
- run:
name: Package charts
command: |
mkdir $HOME/charts
helm package ./charts/* --destination $HOME/charts
- run:
name: Publish charts
command: |
if echo "${CIRCLE_TAG}" | grep v; then
REPOSITORY="https://weaveworksbot:${GITHUB_TOKEN}@github.com/weaveworks/flagger.git"
git config user.email weaveworksbot@users.noreply.github.com
git config user.name weaveworksbot
git remote set-url origin ${REPOSITORY}
git checkout gh-pages
mv -f $HOME/charts/*.tgz .
helm repo index . --url https://flagger.app
git add .
git commit -m "Publish Helm charts v${CIRCLE_TAG}"
git push origin gh-pages
else
echo "Not a release! Skip charts publish"
fi
workflows:
version: 2
build-test-push:
jobs:
- build-binary:
filters:
branches:
ignore:
- gh-pages
- /^user-.*/
- e2e-kubernetes-testing:
requires:
- build-binary
- e2e-istio-testing:
requires:
- build-binary
- e2e-gloo-testing:
requires:
- build-binary
- e2e-nginx-testing:
requires:
- build-binary
- e2e-linkerd-testing:
requires:
- build-binary
- e2e-contour-testing:
requires:
- build-binary
- e2e-skipper-testing:
requires:
- build-binary
- push-container:
requires:
- build-binary
- e2e-kubernetes-testing
- e2e-istio-testing
- e2e-gloo-testing
- e2e-nginx-testing
- e2e-linkerd-testing
- e2e-skipper-testing
filters:
branches:
only:
- master
release:
jobs:
- build-binary:
filters:
branches:
ignore: /.*/
tags:
ignore: /^chart.*/
- push-container:
requires:
- build-binary
filters:
branches:
ignore: /.*/
tags:
ignore: /^chart.*/
- push-binary:
requires:
- push-container
filters:
branches:
ignore: /.*/
tags:
ignore: /^chart.*/
- push-helm-charts:
requires:
- push-container
filters:
branches:
ignore: /.*/
tags:
ignore: /^chart.*/

3
.clomonitor.yml Normal file
View File

@@ -0,0 +1,3 @@
exemptions:
- check: analytics
reason: "We don't track people"

View File

@@ -12,3 +12,7 @@ redirects:
usage/nginx-progressive-delivery: tutorials/nginx-progressive-delivery.md
usage/skipper-progressive-delivery: tutorials/skipper-progressive-delivery.md
usage/crossover-progressive-delivery: tutorials/crossover-progressive-delivery.md
usage/traefik-progressive-delivery: tutorials/traefik-progressive-delivery.md
usage/osm-progressive-delivery: tutorials/osm-progressive-delivery.md
usage/kuma-progressive-delivery: tutorials/kuma-progressive-delivery.md
usage/gatewayapi-progressive-delivery: tutorials/gatewayapi-progressive-delivery.md

29
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve this project
title: ''
assignees: ''
---
### Describe the bug
A clear and concise description of what the bug is.
Please provide the Canary definition and Flagger logs.
### To Reproduce
<!--
Steps to reproduce the behaviour
-->
### Expected behavior
A clear and concise description of what you expected to happen.
### Additional context
- Flagger version:
- Kubernetes version:
- Service Mesh provider:
- Ingress provider:

2
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
blank_issues_enabled: true

View File

@@ -0,0 +1,19 @@
---
name: Feature Request
about: I have a suggestion (and may want to implement it 🙂)!
title: ''
assignees: ''
---
## Describe the feature
What problem are you trying to solve?
### Proposed solution
What do you want to happen? Add any considered drawbacks.
### Any alternatives you've considered?
Is there another way to solve this problem that isn't as good a solution?

View File

@@ -1,17 +0,0 @@
workflow "Publish Helm charts" {
on = "push"
resolves = ["helm-push"]
}
action "helm-lint" {
uses = "stefanprodan/gh-actions/helm@master"
args = ["lint charts/*"]
}
action "helm-push" {
needs = ["helm-lint"]
uses = "stefanprodan/gh-actions/helm-gh-pages@master"
args = ["charts/*","https://flagger.app"]
secrets = ["GITHUB_TOKEN"]
}

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

54
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: build
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
build-flagger:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore Go cache
uses: actions/cache@v3.0.11
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Download modules
run: |
go mod download
go install golang.org/x/tools/cmd/goimports
- name: Run linters
run: make test-fmt test-codegen
- name: Verify CRDs
run: make verify-crd
- name: Run tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic $(go list ./pkg/...)
- name: Check if working tree is dirty
run: |
if [[ $(git diff --stat) != '' ]]; then
git --no-pager diff
echo 'run make test and commit changes'
exit 1
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
- name: Build container image
run: docker build -t test/flagger:latest .

50
.github/workflows/e2e.yaml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: e2e
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
e2e-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
provider:
# service mesh
- istio
- linkerd
- osm
- kuma
# ingress controllers
- contour
- nginx
- traefik
- gloo
- skipper
- kubernetes
- gatewayapi
- keda
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Kubernetes
uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.14.0"
image: kindest/node:v1.23.6@sha256:b1fa224cc6c7ff32455e0b1fd9cbfd3d3bc87ecaa8fcb06961ed1afb3db0f9ae
- name: Build container image
run: |
docker build -t test/flagger:latest .
kind load docker-image test/flagger:latest
- name: Run tests
run: |
./test/${{ matrix['provider'] }}/run.sh

20
.github/workflows/helm.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: helm
on:
workflow_dispatch:
permissions:
contents: read
jobs:
release-charts:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@v1.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_url: https://flagger.app

61
.github/workflows/push-ld.yml vendored Normal file
View File

@@ -0,0 +1,61 @@
name: push-ld
on:
workflow_dispatch:
env:
IMAGE: "ghcr.io/fluxcd/flagger-loadtester"
permissions:
contents: read
jobs:
release-load-tester:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
steps:
- uses: actions/checkout@v3
- uses: sigstore/cosign-installer@v2.8.1
- name: Prepare
id: prep
run: |
VERSION=$(grep 'VERSION' cmd/loadtester/main.go | head -1 | awk '{ print $4 }' | tr -d '"')
echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=VERSION::${VERSION}
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: fluxcdbot
password: ${{ secrets.GHCR_TOKEN }}
- name: Generate image meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.IMAGE }}
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
- name: Publish image
uses: docker/build-push-action@v3
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile.loadtester
platforms: linux/amd64,linux/arm64
build-args: |
REVISION=${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign image
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign ${{ env.IMAGE }}:${{ steps.prep.outputs.VERSION }}

101
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,101 @@
name: release
on:
push:
tags:
- 'v*'
permissions:
contents: read
env:
IMAGE: "ghcr.io/fluxcd/${{ github.event.repository.name }}"
jobs:
release-flagger:
runs-on: ubuntu-latest
permissions:
contents: write # needed to write releases
id-token: write # needed for keyless signing
packages: write # needed for ghcr access
steps:
- uses: actions/checkout@v3
- uses: fluxcd/flux2/action@main
- uses: sigstore/cosign-installer@v2.8.1
- name: Prepare
id: prep
run: |
VERSION=$(grep 'VERSION' pkg/version/version.go | awk '{ print $4 }' | tr -d '"')
CHANGELOG="https://github.com/fluxcd/flagger/blob/main/CHANGELOG.md#$(echo $VERSION | tr -d '.')"
echo "[CHANGELOG](${CHANGELOG})" > notes.md
echo ::set-output name=BUILD_DATE::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=VERSION::${VERSION}
- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: fluxcdbot
password: ${{ secrets.GHCR_TOKEN }}
- name: Generate image meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.IMAGE }}
tags: |
type=raw,value=${{ steps.prep.outputs.VERSION }}
- name: Publish image
uses: docker/build-push-action@v3
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
REVISON=${{ github.sha }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign image
env:
COSIGN_EXPERIMENTAL: 1
run: |
cosign sign ${{ env.IMAGE }}:${{ steps.prep.outputs.VERSION }}
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@v1.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_url: https://flagger.app
linting: off
- uses: fluxcd/pkg/actions/helm@main
with:
version: 3.10.1
- name: Publish signed Helm chart to GHCR
env:
COSIGN_EXPERIMENTAL: 1
run: |
helm package charts/flagger
helm push flagger-${{ steps.prep.outputs.VERSION }}.tgz oci://ghcr.io/fluxcd/charts
cosign sign ghcr.io/fluxcd/charts/flagger:${{ steps.prep.outputs.VERSION }}
rm flagger-${{ steps.prep.outputs.VERSION }}.tgz
- name: Publish signed manifests to GHCR
env:
COSIGN_EXPERIMENTAL: 1
run: |
flux push artifact oci://ghcr.io/fluxcd/flagger-manifests:${{ steps.prep.outputs.VERSION }} \
--path="./kustomize" \
--source="$(git config --get remote.origin.url)" \
--revision="${{ steps.prep.outputs.VERSION }}/$(git rev-parse HEAD)"
cosign sign ghcr.io/fluxcd/flagger-manifests:${{ steps.prep.outputs.VERSION }}
- uses: anchore/sbom-action/download-syft@v0
- name: Create release and SBOM
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --release-notes=notes.md --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

41
.github/workflows/scan.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: scan
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '18 10 * * 3'
permissions:
contents: read
jobs:
scan-fossa:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- name: Run FOSSA scan and upload build data
uses: fossa-contrib/fossa-action@v1
with:
# FOSSA Push-Only API Token
fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de
github-token: ${{ github.token }}
scan-codeql:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ artifacts/gcloud/
Makefile.dev
vendor
coverage.txt

View File

@@ -1,18 +1,30 @@
project_name: flagger
builds:
- main: ./cmd/flagger
binary: flagger
ldflags: -s -w -X github.com/weaveworks/flagger/pkg/version.REVISION={{.Commit}}
goos:
- linux
goarch:
- amd64
- skip: true
release:
prerelease: auto
source:
enabled: true
name_template: "{{ .ProjectName }}_{{ .Version }}_source_code"
sboms:
- id: source
artifacts: source
documents:
- "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json"
signs:
- cmd: cosign
env:
- CGO_ENABLED=0
archives:
- name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
changelog:
filters:
exclude:
- '^CircleCI'
- COSIGN_EXPERIMENTAL=1
certificate: '${artifact}.pem'
args:
- sign-blob
- '--output-certificate=${certificate}'
- '--output-signature=${signature}'
- '${artifact}'
artifacts: checksum
output: true

File diff suppressed because it is too large Load Diff

3
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,3 @@
## Code of Conduct
Flagger follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

View File

@@ -14,10 +14,28 @@ Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution.
## Chat
We require all commits to be signed. By signing off with your signature, you
certify that you wrote the patch or otherwise have the right to contribute the
material by the rules of the [DCO](DCO):
`Signed-off-by: Jane Doe <jane.doe@example.com>`
The signature must contain your real name
(sorry, no pseudonyms or anonymous contributions)
If your `user.name` and `user.email` are configured in your Git config,
you can sign your commit automatically with `git commit -s`.
## Communications
The project uses Slack: To join the conversation, simply join the
[Weave community](https://slack.weave.works/) Slack workspace #flagger channel.
[CNCF](https://slack.cncf.io/) Slack workspace and use the
[#flagger](https://cloud-native.slack.com/messages/flagger/) channel.
The developers use a mailing list to discuss development as well.
Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev)
to join the conversation (this will also add an invitation to your
Google calendar for our [Flux
meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)).
## Getting Started
@@ -69,4 +87,3 @@ For Flagger we prefer the following rules for good commit messages:
The [following article](https://chris.beams.io/posts/git-commit/#seven-rules)
has some more helpful advice on documenting your work.
This doc is adapted from [FluxCD](https://github.com/fluxcd/flux/blob/master/CONTRIBUTING.md).

36
DCO Normal file
View File

@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

View File

@@ -1,9 +1,32 @@
FROM alpine:3.12
FROM golang:1.19-alpine as builder
ARG TARGETPLATFORM
ARG REVISON
WORKDIR /workspace
# copy modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache modules
RUN go mod download
# copy source code
COPY cmd/ cmd/
COPY pkg/ pkg/
# build
RUN CGO_ENABLED=0 go build \
-ldflags "-s -w -X github.com/fluxcd/flagger/pkg/version.REVISION=${REVISON}" \
-a -o flagger ./cmd/flagger
FROM alpine:3.16
RUN apk --no-cache add ca-certificates
USER nobody
COPY --chown=nobody:nobody /bin/flagger .
COPY --from=builder --chown=nobody:nobody /workspace/flagger .
ENTRYPOINT ["./flagger"]

View File

@@ -1,59 +1,59 @@
FROM alpine:3.11 as build
FROM golang:1.19-alpine as builder
RUN apk --no-cache add alpine-sdk perl curl
ARG TARGETPLATFORM
ARG TARGETARCH
ARG REVISION
RUN curl -sSLo hey "https://storage.googleapis.com/hey-release/hey_linux_amd64" && \
chmod +x hey && mv hey /usr/local/bin/hey
RUN apk --no-cache add alpine-sdk perl curl bash tar
RUN HELM2_VERSION=2.16.8 && \
curl -sSL "https://get.helm.sh/helm-v${HELM2_VERSION}-linux-amd64.tar.gz" | tar xvz && \
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helm && \
chmod +x linux-amd64/tiller && mv linux-amd64/tiller /usr/local/bin/tiller
RUN HELM3_VERSION=3.9.4 && \
curl -sSL "https://get.helm.sh/helm-v${HELM3_VERSION}-linux-${TARGETARCH}.tar.gz" | tar xvz && \
chmod +x linux-${TARGETARCH}/helm && mv linux-${TARGETARCH}/helm /usr/local/bin/helm
RUN HELM3_VERSION=3.2.3 && \
curl -sSL "https://get.helm.sh/helm-v${HELM3_VERSION}-linux-amd64.tar.gz" | tar xvz && \
chmod +x linux-amd64/helm && mv linux-amd64/helm /usr/local/bin/helmv3
RUN GRPC_HEALTH_PROBE_VERSION=v0.3.1 && \
wget -qO /usr/local/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.12 && \
wget -qO /usr/local/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-${TARGETARCH} && \
chmod +x /usr/local/bin/grpc_health_probe
RUN GHZ_VERSION=0.39.0 && \
curl -sSL "https://github.com/bojand/ghz/releases/download/v${GHZ_VERSION}/ghz_${GHZ_VERSION}_Linux_x86_64.tar.gz" | tar xz -C /tmp && \
mv /tmp/ghz /usr/local/bin && chmod +x /usr/local/bin/ghz
RUN GHZ_VERSION=0.109.0 && \
curl -sSL "https://github.com/bojand/ghz/archive/refs/tags/v${GHZ_VERSION}.tar.gz" | tar xz -C /tmp && \
cd /tmp/ghz-${GHZ_VERSION}/cmd/ghz && GOARCH=$TARGETARCH go build . && mv ghz /usr/local/bin && \
chmod +x /usr/local/bin/ghz
RUN HELM_TILLER_VERSION=0.9.3 && \
curl -sSL "https://github.com/rimusz/helm-tiller/archive/v${HELM_TILLER_VERSION}.tar.gz" | tar xz -C /tmp && \
mv /tmp/helm-tiller-${HELM_TILLER_VERSION} /tmp/helm-tiller
WORKDIR /workspace
RUN WRK_VERSION=4.0.2 && \
cd /tmp && git clone -b ${WRK_VERSION} https://github.com/wg/wrk
RUN cd /tmp/wrk && make
# copy modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache modules
RUN go mod download
# copy source code
COPY cmd/ cmd/
COPY pkg/ pkg/
# build
RUN CGO_ENABLED=0 go build -o loadtester ./cmd/loadtester/*
FROM bash:5.0
ARG TARGETPLATFORM
RUN addgroup -S app && \
adduser -S -g app app && \
apk --no-cache add ca-certificates curl jq libgcc
apk --no-cache add ca-certificates curl jq libgcc wrk hey
WORKDIR /home/app
COPY --from=bats/bats:v1.1.0 /opt/bats/ /opt/bats/
RUN ln -s /opt/bats/bin/bats /usr/local/bin/
COPY --from=build /usr/local/bin/hey /usr/local/bin/
COPY --from=build /tmp/wrk/wrk /usr/local/bin/
COPY --from=build /usr/local/bin/helm /usr/local/bin/
COPY --from=build /usr/local/bin/tiller /usr/local/bin/
COPY --from=build /usr/local/bin/ghz /usr/local/bin/
COPY --from=build /usr/local/bin/helmv3 /usr/local/bin/
COPY --from=build /usr/local/bin/grpc_health_probe /usr/local/bin/
COPY --from=build /tmp/helm-tiller /tmp/helm-tiller
COPY --from=builder /usr/local/bin/helm /usr/local/bin/
COPY --from=builder /usr/local/bin/ghz /usr/local/bin/
COPY --from=builder /usr/local/bin/grpc_health_probe /usr/local/bin/
ADD https://raw.githubusercontent.com/grpc/grpc-proto/master/grpc/health/v1/health.proto /tmp/ghz/health.proto
COPY ./bin/loadtester .
RUN chown -R app:app ./
RUN chown -R app:app /tmp/ghz
@@ -63,7 +63,6 @@ USER app
RUN hey -n 1 -c 1 https://flagger.app > /dev/null && echo $? | grep 0
RUN wrk -d 1s -c 1 -t 1 https://flagger.app > /dev/null && echo $? | grep 0
# install Helm v2 plugins
RUN helm init --client-only && helm plugin install /tmp/helm-tiller
COPY --from=builder --chown=app:app /workspace/loadtester .
ENTRYPOINT ["./loadtester"]

5
GOVERNANCE.md Normal file
View File

@@ -0,0 +1,5 @@
# Flagger Governance
The Flagger project is governed by the [Flux governance document](https://github.com/fluxcd/community/blob/main/GOVERNANCE.md),
involvement is defined in the [Flux community roles document](chttps://github.com/fluxcd/community/blob/main/community-roles.md),
and processes can be found in the [Flux process document](https://github.com/fluxcd/community/blob/main/PROCESS.md).

View File

@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Weaveworks. All rights reserved.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@@ -1,6 +1,9 @@
The maintainers are generally available in Slack at
https://weave-community.slack.com/messages/flagger/ (obtain an invitation
at https://slack.weave.works/).
https://cloud-native.slack.com/messages/flagger/ (obtain an invitation
at https://slack.cncf.io/).
Stefan Prodan, Weaveworks <stefan@weave.works> (Slack: @stefan Twitter: @stefanprodan)
Takeshi Yoneda, DMM.com <cz.rk.t0415y.g@gmail.com> (Slack: @mathetake Twitter: @mathetake)
In alphabetical order:
Stefan Prodan, Weaveworks <stefan@weave.works> (github: @stefanprodan, slack: stefanprodan)
Takeshi Yoneda, Tetrate <takeshi@tetrate.io> (github: @mathetake, slack: mathetake)
Sanskar Jaiswal, Weaveworks <sanskar.jaiswal@weave.works> (github: @aryan9600, slack: aryan9600)

View File

@@ -3,16 +3,16 @@ VERSION?=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4 }' | t
LT_VERSION?=$(shell grep 'VERSION' cmd/loadtester/main.go | awk '{ print $$4 }' | tr -d '"' | head -n1)
build:
GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 GOOS=linux go build \
-ldflags "-s -w -X github.com/weaveworks/flagger/pkg/version.REVISION=$${GIT_COMMIT}" \
-a -installsuffix cgo -o ./bin/flagger ./cmd/flagger/*
docker build -t weaveworks/flagger:$(TAG) . -f Dockerfile
CGO_ENABLED=0 go build -a -o ./bin/flagger ./cmd/flagger
push:
docker tag weaveworks/flagger:$(TAG) weaveworks/flagger:$(VERSION)
docker push weaveworks/flagger:$(VERSION)
tidy:
rm -f go.sum; go mod tidy -compat=1.19
vet:
go vet ./...
fmt:
go mod tidy
gofmt -l -s -w ./
goimports -l -w ./
@@ -33,28 +33,26 @@ crd:
cat artifacts/flagger/crd.yaml > charts/flagger/crds/crd.yaml
cat artifacts/flagger/crd.yaml > kustomize/base/flagger/crd.yaml
verify-crd:
./hack/verify-crd.sh
version-set:
@next="$(TAG)" && \
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" pkg/version/version.go && \
sed -i '' "s/flagger:$$current/flagger:$$next/g" artifacts/flagger/deployment.yaml && \
sed -i '' "s/tag: $$current/tag: $$next/g" charts/flagger/values.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" charts/flagger/Chart.yaml && \
sed -i '' "s/version: $$current/version: $$next/g" charts/flagger/Chart.yaml && \
sed -i '' "s/newTag: $$current/newTag: $$next/g" kustomize/base/flagger/kustomization.yaml && \
sed -i "s/$$current/$$next/g" pkg/version/version.go && \
sed -i "s/flagger:$$current/flagger:$$next/g" artifacts/flagger/deployment.yaml && \
sed -i "s/tag: $$current/tag: $$next/g" charts/flagger/values.yaml && \
sed -i "s/appVersion: $$current/appVersion: $$next/g" charts/flagger/Chart.yaml && \
sed -i "s/version: $$current/version: $$next/g" charts/flagger/Chart.yaml && \
sed -i "s/newTag: $$current/newTag: $$next/g" kustomize/base/flagger/kustomization.yaml && \
echo "Version $$next set in code, deployment, chart and kustomize"
release:
git tag "v$(VERSION)"
git push origin "v$(VERSION)"
release-notes:
cd /tmp && GH_REL_URL="https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz" && \
curl -sSL $${GH_REL_URL} | tar xz && sudo mv github-release-notes /usr/local/bin/
loadtester-build:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./bin/loadtester ./cmd/loadtester/*
docker build -t weaveworks/flagger-loadtester:$(LT_VERSION) . -f Dockerfile.loadtester
docker build -t ghcr.io/fluxcd/flagger-loadtester:$(LT_VERSION) . -f Dockerfile.loadtester
loadtester-push:
docker push weaveworks/flagger-loadtester:$(LT_VERSION)
docker push ghcr.io/fluxcd/flagger-loadtester:$(LT_VERSION)

164
README.md
View File

@@ -1,21 +1,22 @@
# flagger
# flagger
[![build](https://img.shields.io/circleci/build/github/weaveworks/flagger/master.svg)](https://circleci.com/gh/weaveworks/flagger)
[![report](https://goreportcard.com/badge/github.com/weaveworks/flagger)](https://goreportcard.com/report/github.com/weaveworks/flagger)
[![codecov](https://codecov.io/gh/weaveworks/flagger/branch/master/graph/badge.svg)](https://codecov.io/gh/weaveworks/flagger)
[![license](https://img.shields.io/github/license/weaveworks/flagger.svg)](https://github.com/weaveworks/flagger/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/weaveworks/flagger/all.svg)](https://github.com/weaveworks/flagger/releases)
[![release](https://img.shields.io/github/release/fluxcd/flagger/all.svg)](https://github.com/fluxcd/flagger/releases)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4783/badge)](https://bestpractices.coreinfrastructure.org/projects/4783)
[![report](https://goreportcard.com/badge/github.com/fluxcd/flagger)](https://goreportcard.com/report/github.com/fluxcd/flagger)
[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Ffluxcd%2Fflagger.svg?type=shield)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Ffluxcd%2Fflagger?ref=badge_shield)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/flagger)](https://artifacthub.io/packages/search?repo=flagger)
Flagger is a progressive delivery tool that automates the release process for applications running on Kubernetes.
It reduces the risk of introducing a new software version in production
by gradually shifting traffic to the new version while measuring metrics and running conformance tests.
![flagger-overview](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-canary-overview.png)
![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) or an ingress controller (Contour, Gloo, NGINX, Skipper) for traffic routing.
For release analysis, Flagger can query Prometheus, Datadog or CloudWatch
and for alerting it uses Slack, MS Teams, Discord and Rocket.
and integrates with various Kubernetes ingress controllers, service mesh, and monitoring solutions.
Flagger is a [Cloud Native Computing Foundation](https://cncf.io/) project
and part of the [Flux](https://fluxcd.io) family of GitOps tools.
### Documentation
@@ -34,33 +35,30 @@ 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)
* [Kubernetes Blue/Green](https://docs.flagger.app/tutorials/kubernetes-blue-green)
### Who is using Flagger
### Adopters
List of organizations using Flagger:
**Our list of production users has moved to <https://fluxcd.io/adopters/#flagger>**.
* [Chick-fil-A](https://www.chick-fil-a.com)
* [Capra Consulting](https://www.capraconsulting.no)
* [DMM.com](https://dmm-corp.com)
* [MediaMarktSaturn](https://www.mediamarktsaturn.com)
* [Weaveworks](https://weave.works)
* [Jumia Group](https://group.jumia.com)
If you are using Flagger, please submit a PR to add your organization to the list!
If you are using Flagger, please
[submit a PR to add your organization](https://github.com/fluxcd/website/tree/main/adopters#readme) to the list!
### Canary CRD
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler (HPA),
then creates a series of objects (Kubernetes deployments, ClusterIP services, service mesh or ingress routes).
then creates a series of objects (Kubernetes deployments, ClusterIP services, service mesh, or ingress routes).
These objects expose the application on the mesh and drive the canary analysis and promotion.
Flagger keeps track of ConfigMaps and Secrets referenced by a Kubernetes Deployment and triggers a canary analysis if any of those objects change.
When promoting a workload in production, both code (container images) and configuration (config maps and secrets) are being synchronised.
When promoting a workload in production, both code (container images) and configuration (config maps and secrets) are being synchronized.
For a deployment named _podinfo_, a canary promotion can be defined using Flagger's custom resource:
@@ -72,7 +70,8 @@ metadata:
namespace: test
spec:
# service mesh provider (optional)
# can be: kubernetes, istio, linkerd, appmesh, nginx, skipper, contour, gloo, supergloo
# can be: kubernetes, istio, linkerd, appmesh, nginx, skipper, contour, gloo, supergloo, traefik, osm
# for SMI TrafficSplit can be: smi:v1alpha1, smi:v1alpha2, smi:v1alpha3
provider: istio
# deployment reference
targetRef:
@@ -84,7 +83,7 @@ spec:
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: podinfo
service:
@@ -183,60 +182,97 @@ For more details on how the canary analysis and promotion works please [read the
**Service Mesh**
| Feature | App Mesh | Istio | Linkerd | Kubernetes CNI |
| ------------------------------------------ | ------------------ | ------------------ | ------------------ | ----------------- |
| Canary deployments (weighted traffic) | :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: |
| Blue/Green deployments (traffic switch) | :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: |
| Webhooks (acceptance/load testing) | :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: |
| Request success rate check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: |
| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: |
| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Feature | App Mesh | Istio | Linkerd | Kuma | OSM | 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_check_mark: | :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: |
| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
**Ingress**
| Feature | Contour | Gloo | NGINX | Skipper |
| ------------------------------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: | :heavy_minus_sign: |
| Blue/Green deployments (traffic switch) | :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: |
| Manual gating (approve/pause/resume) | :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: |
| Request duration check (L7 metric) | :heavy_check_mark: | :heavy_check_mark: | :heavy_minus_sign: | :heavy_check_mark: |
| Custom metric checks | :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: |
**Networking Interface**
| Feature | Gateway API | SMI |
|-----------------------------------------------|--------------------|--------------------|
| Canary deployments (weighted traffic) | :heavy_check_mark: | :heavy_check_mark: |
| A/B testing (headers and cookies routing) | :heavy_check_mark: | :heavy_minus_sign: |
| Blue/Green deployments (traffic switch) | :heavy_check_mark: | :heavy_check_mark: |
| Blue/Green deployments (traffic mirrroring) | :heavy_minus_sign: | :heavy_minus_sign: |
| Webhooks (acceptance/load testing) | :heavy_check_mark: | :heavy_check_mark: |
| Manual gating (approve/pause/resume) | :heavy_check_mark: | :heavy_check_mark: |
| Request success rate check (L7 metric) | :heavy_minus_sign: | :heavy_minus_sign: |
| Request duration check (L7 metric) | :heavy_minus_sign: | :heavy_minus_sign: |
| Custom metric checks | :heavy_check_mark: | :heavy_check_mark: |
For all [Gateway API](https://gateway-api.sigs.k8s.io/) implementations like
[Contour](https://projectcontour.io/guides/gateway-api/) or
[Istio](https://istio.io/latest/docs/tasks/traffic-management/ingress/gateway-api/)
and [SMI](https://smi-spec.io) compatible service mesh solutions like
[Nginx Service Mesh](https://docs.nginx.com/nginx-service-mesh/),
[Prometheus MetricTemplates](https://docs.flagger.app/usage/metrics#prometheus)
can be used to implement the request success rate and request duration checks.
### Roadmap
* Add support for Kubernetes [Ingress v2](https://github.com/kubernetes-sigs/service-apis)
* Integrate with other service mesh like Consul Connect and ingress controllers like HAProxy, ALB
* Integrate with other metrics providers like InfluxDB, Stackdriver, SignalFX
* Add support for comparing the canary metrics to the primary ones and do the validation based on the derivation between the two
#### [GitOps Toolkit](https://github.com/fluxcd/flux2) compatibility
- Migrate Flagger to Kubernetes controller-runtime and [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder)
- Make the Canary status compatible with [kstatus](https://github.com/kubernetes-sigs/cli-utils)
- Make Flagger emit Kubernetes events compatible with Flux v2 notification API
- Integrate Flagger into Flux v2 as the progressive delivery component
#### Integrations
- Add support for ingress controllers like HAProxy, ALB, and Apache APISIX
- Add support for Knative Serving
### Contributing
Flagger is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
To start contributing please read the [development guide](https://docs.flagger.app/dev/dev-guide).
When submitting bug reports please include as much details as possible:
When submitting bug reports please include as many details as possible:
* which Flagger version
* which Flagger CRD version
* which Kubernetes version
* what configuration (canary, ingress and workloads definitions)
* what happened (Flagger and Proxy logs)
- which Flagger version
- which Kubernetes version
- what configuration (canary, ingress and workloads definitions)
- what happened (Flagger and Proxy logs)
### Getting Help
### Communication
If you have any questions about Flagger and progressive delivery:
Here is a list of good entry points into our community, how we stay in touch and how you can meet us as a team.
* Read the Flagger [docs](https://docs.flagger.app).
* Invite yourself to the [Weave community slack](https://slack.weave.works/)
and join the [#flagger](https://weave-community.slack.com/messages/flagger/) channel.
* Join the [Weave User Group](https://www.meetup.com/pro/Weave/) and get invited to online talks,
hands-on training and meetups in your area.
* File an [issue](https://github.com/weaveworks/flagger/issues/new).
- Slack: Join in and talk to us in the `#flagger` channel on [CNCF Slack](https://slack.cncf.io/).
- Public meetings: We run weekly meetings - join one of the upcoming dev meetings from the [Flux calendar](https://fluxcd.io/#calendar).
- Blog: Stay up to date with the latest news on [the Flux blog](https://fluxcd.io/blog/).
- Mailing list: To be updated on Flux and Flagger progress regularly, please [join the flux-dev mailing list](https://lists.cncf.io/g/cncf-flux-dev).
Your feedback is always welcome!
#### Subscribing to the flux-dev calendar
To add the meetings to your e.g. Google calendar
1. visit the [Flux calendar](https://lists.cncf.io/g/cncf-flux-dev/calendar)
2. click on "Subscribe to Calendar" at the very bottom of the page
3. copy the iCalendar URL
4. open e.g. your Google calendar
5. find the "add calendar" option
6. choose "add by URL"
7. paste iCalendar URL (ends with `.ics`)
8. done

View File

@@ -0,0 +1,50 @@
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
annotations:
kuma.io/mesh: default
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
progressDeadlineSeconds: 60
service:
port: 9898
targetPort: 9898
apex:
annotations:
9898.service.kuma.io/protocol: "http"
canary:
annotations:
9898.service.kuma.io/protocol: "http"
primary:
annotations:
9898.service.kuma.io/protocol: "http"
analysis:
interval: 15s
threshold: 15
maxWeight: 50
stepWeight: 10
metrics:
- name: request-success-rate
threshold: 99
interval: 1m
- name: request-duration
threshold: 500
interval: 30s
webhooks:
- name: acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 30s
metadata:
type: bash
cmd: "curl -sd 'test' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
type: rollout
url: http://flagger-loadtester.test/
metadata:
cmd: "hey -z 2m -q 10 -c 2 http://podinfo-canary.test:9898/"

View File

@@ -0,0 +1,51 @@
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
provider: linkerd
progressDeadlineSeconds: 600
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
autoscalerRef:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
name: podinfo
service:
name: podinfo
port: 80
targetPort: 9898
portName: http
portDiscovery: true
skipAnalysis: false
analysis:
interval: 15s
threshold: 10
stepWeights: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]
metrics:
- name: request-success-rate
thresholdRange:
min: 99
interval: 1m
- name: request-duration
thresholdRange:
max: 500
interval: 30s
webhooks:
- name: conformance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 15s
metadata:
type: "bash"
cmd: "curl -sd 'test' http://podinfo-canary.test/token | grep token"
- name: load-test
type: rollout
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
type: cmd
cmd: "hey -z 1m -q 10 -c 2 http://podinfo-canary.test/"

View File

@@ -0,0 +1,42 @@
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
provider: osm
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
progressDeadlineSeconds: 600
service:
port: 9898
targetPort: 9898
analysis:
interval: 15s
threshold: 10
stepWeights: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55]
metrics:
- name: request-success-rate
thresholdRange:
min: 99
interval: 1m
- name: request-duration
thresholdRange:
max: 500
interval: 30s
webhooks:
- name: acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 15s
metadata:
type: bash
cmd: "curl -sd 'test' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
type: rollout
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 1m -q 10 -c 2 http://podinfo-canary.test:9898/"

View File

@@ -0,0 +1,43 @@
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
provider: osm
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
progressDeadlineSeconds: 600
service:
port: 9898
targetPort: 9898
analysis:
interval: 15s
threshold: 10
maxWeight: 50
stepWeight: 5
metrics:
- name: request-success-rate
thresholdRange:
min: 99
interval: 1m
- name: request-duration
thresholdRange:
max: 500
interval: 30s
webhooks:
- name: acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 15s
metadata:
type: bash
cmd: "curl -sd 'test' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
type: rollout
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 1m -q 10 -c 2 http://podinfo-canary.test:9898/"

View File

@@ -6,7 +6,7 @@ metadata:
labels:
app: flagger
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: flagger
@@ -31,6 +31,18 @@ rules:
- update
- patch
- delete
- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
@@ -78,6 +90,7 @@ rules:
resources:
- canaries
- canaries/status
- canaries/finalizers
- metrictemplates
- metrictemplates/status
- alertproviders
@@ -153,8 +166,19 @@ rules:
resources:
- upstreams
- upstreams/finalizers
- upstreamgroups
- upstreamgroups/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- gateway.solo.io
resources:
- routetables
- routetables/finalizers
verbs:
- get
- list
@@ -176,12 +200,51 @@ rules:
- update
- patch
- delete
- apiGroups:
- kuma.io
resources:
- trafficroutes
- trafficroutes/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- gateway.networking.k8s.io
resources:
- httproutes
- httproutes/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- keda.sh
resources:
- scaledobjects
- scaledobjects/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- nonResourceURLs:
- /version
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: flagger

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@ spec:
serviceAccountName: flagger
containers:
- name: flagger
image: weaveworks/flagger:1.1.0
image: ghcr.io/fluxcd/flagger:1.24.1
imagePullPolicy: IfNotPresent
ports:
- name: http

View File

@@ -1,14 +1,14 @@
apiVersion: v1
name: flagger
version: 1.1.0
appVersion: 1.1.0
kubeVersion: ">=1.11.0-0"
version: 1.24.1
appVersion: 1.24.1
kubeVersion: ">=1.19.0-0"
engine: gotpl
description: Flagger is a progressive delivery operator for Kubernetes
home: https://flagger.app
icon: https://raw.githubusercontent.com/weaveworks/flagger/master/docs/logo/weaveworks.png
icon: https://raw.githubusercontent.com/fluxcd/flagger/main/docs/logo/flagger-icon.png
sources:
- https://github.com/weaveworks/flagger
- https://github.com/fluxcd/flagger
maintainers:
- name: stefanprodan
url: https://github.com/stefanprodan
@@ -18,8 +18,12 @@ keywords:
- istio
- appmesh
- linkerd
- kuma
- osm
- smi
- gloo
- contour
- nginx
- traefik
- gitops
- canary

View File

@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2018 Weaveworks. All rights reserved.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@@ -1,18 +1,18 @@
# Flagger
[Flagger](https://github.com/weaveworks/flagger) is an operator that automates the release process of applications on Kubernetes.
[Flagger](https://github.com/fluxcd/flagger) is a progressive delivery tool that automates the release process
for applications running on Kubernetes. It reduces the risk of introducing a new software version in production
by gradually shifting traffic to the new version while measuring metrics and running conformance tests.
Flagger can run automated application analysis, testing, promotion and rollback for the following deployment strategies:
* Canary Release (progressive traffic shifting)
* A/B Testing (HTTP headers and cookies traffic routing)
* Blue/Green (traffic switching and mirroring)
Flagger implements several deployment strategies (Canary releases, A/B testing, Blue/Green mirroring)
and integrates with various Kubernetes ingress controllers, service mesh and monitoring solutions.
Flagger works with service mesh solutions (Istio, Linkerd, AWS App Mesh) and with Kubernetes ingress controllers (NGINX, Skipper, Gloo, Contour).
Flagger can be configured to send alerts to various chat platforms such as Slack, Microsoft Teams, Discord and Rocket.
Flagger is a [Cloud Native Computing Foundation](https://cncf.io/) project
and part of [Flux](https://fluxcd.io) family of GitOps tools.
## Prerequisites
* Kubernetes >= 1.14
* Kubernetes >= 1.19
## Installing the Chart
@@ -25,7 +25,7 @@ $ helm repo add flagger https://flagger.app
Install Flagger's custom resource definitions:
```console
$ kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
$ kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/main/artifacts/flagger/crd.yaml
```
To install Flagger for **Istio**:
@@ -37,13 +37,13 @@ $ helm upgrade -i flagger flagger/flagger \
--set metricsServer=http://prometheus:9090
```
To install Flagger for **Linkerd**:
To install Flagger for **Linkerd** (requires Linkerd Viz extension):
```console
$ helm upgrade -i flagger flagger/flagger \
--namespace=linkerd \
--set meshProvider=linkerd \
--set metricsServer=http://linkerd-prometheus:9090
--set metricsServer=http://prometheus.linkerd-viz:9090
```
To install Flagger for **AWS App Mesh**:
@@ -55,6 +55,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
@@ -64,7 +83,7 @@ $ helm upgrade -i flagger flagger/flagger \
--set prometheus.install=true
```
To install Flagger and Prometheus for **Gloo** (requires Gloo discovery enabled):
To install Flagger and Prometheus for **Gloo** (no longer requires Gloo discovery):
```console
$ helm upgrade -i flagger flagger/flagger \
@@ -83,6 +102,15 @@ $ helm upgrade -i flagger flagger/flagger \
--set prometheus.install=true
```
To install Flagger and Prometheus for **Traefik**:
```console
$ helm upgrade -i flagger flagger/flagger \
--namespace=traefik \
--set prometheus.install=true \
--set meshProvider=traefik
```
The [configuration](#configuration) section lists the parameters that can be configured during installation.
## Uninstalling the Chart
@@ -99,48 +127,57 @@ 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 | `weaveworks/flagger`
`image.tag` | Image tag | `<VERSION>`
`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.channel` | Slack channel | None
`slack.user` | Slack username | `flagger`
`msteams.url` | Microsoft Teams incoming webhook | 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`
`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 | ""
| Parameter | Description | Default |
|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------|
| `image.repository` | Image repository | `ghcr.io/fluxcd/flagger` |
| `image.tag` | Image tag | `<VERSION>` |
| `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 | `[]` |
| `controlplane.kubeconfig.secretName` | The name of the Kubernetes secret containing the service mesh control plane kubeconfig | None |
| `controlplane.kubeconfig.key` | The name of Kubernetes secret data key that contains the service mesh 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` |
| `podDisruptionBudget.minAvailable` | The minimal number of available replicas that will be set in the PodDisruptionBudget | `1` |
| `noCrossNamespaceRefs` | If `true`, cross namespace references to custom resources will be disabled | `false` |
| `namespace` | When specified, Flagger will restrict itself to watching Canary objects from that namespace | `""` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade`. For example,
@@ -160,5 +197,3 @@ $ helm upgrade -i flagger flagger/flagger \
```
> **Tip**: You can use the default [values.yaml](values.yaml)

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@ metadata:
app.kubernetes.io/name: {{ template "flagger.name" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
spec:
replicas: {{ .Values.leaderElection.replicaCount }}
{{- if eq .Values.leaderElection.enabled false }}
@@ -22,6 +23,12 @@ spec:
labels:
app.kubernetes.io/name: {{ template "flagger.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- if .Values.podLabels }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
annotations:
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
@@ -43,10 +50,10 @@ spec:
- name: {{ .Values.image.pullSecret }}
{{- end }}
volumes:
{{- if .Values.istio.kubeconfig.secretName }}
{{- if .Values.controlplane.kubeconfig.secretName }}
- name: kubeconfig
secret:
secretName: "{{ .Values.istio.kubeconfig.secretName }}"
secretName: "{{ .Values.controlplane.kubeconfig.secretName }}"
{{- end }}
{{- if .Values.podPriorityClassName }}
priorityClassName: {{ .Values.podPriorityClassName }}
@@ -58,9 +65,9 @@ spec:
{{ toYaml .Values.securityContext.context | indent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.istio.kubeconfig.secretName }}
{{- if .Values.controlplane.kubeconfig.secretName }}
- name: kubeconfig
mountPath: "/tmp/istio-host"
mountPath: "/tmp/controlplane"
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
@@ -90,6 +97,9 @@ spec:
{{- if .Values.slack.url }}
- -slack-url={{ .Values.slack.url }}
{{- end }}
{{- if .Values.slack.proxyUrl }}
- -slack-proxy-url={{ .Values.slack.proxyUrl }}
{{- end }}
{{- if .Values.slack.user }}
- -slack-user={{ .Values.slack.user }}
{{- end }}
@@ -99,6 +109,9 @@ spec:
{{- if .Values.msteams.url }}
- -msteams-url={{ .Values.msteams.url }}
{{- end }}
{{- if .Values.msteams.proxyUrl }}
- -msteams-proxy-url={{ .Values.msteams.proxyUrl }}
{{- end }}
{{- if .Values.leaderElection.enabled }}
- -enable-leader-election=true
- -leader-election-namespace={{ .Release.Namespace }}
@@ -106,18 +119,33 @@ spec:
{{- if .Values.ingressAnnotationsPrefix }}
- -ingress-annotations-prefix={{ .Values.ingressAnnotationsPrefix }}
{{- end }}
{{- if .Values.includeLabelPrefix }}
- -include-label-prefix={{ .Values.includeLabelPrefix }}
{{- end }}
{{- if .Values.ingressClass }}
- -ingress-class={{ .Values.ingressClass }}
{{- end }}
{{- if .Values.eventWebhook }}
- -event-webhook={{ .Values.eventWebhook }}
{{- end }}
{{- if .Values.istio.kubeconfig.secretName }}
- -kubeconfig-service-mesh=/tmp/istio-host/{{ .Values.istio.kubeconfig.key }}
{{- if .Values.kubeconfigQPS }}
- -kubeconfig-qps={{ .Values.kubeconfigQPS }}
{{- end }}
{{- if .Values.kubeconfigBurst }}
- -kubeconfig-burst={{ .Values.kubeconfigBurst }}
{{- end }}
{{- if .Values.controlplane.kubeconfig.secretName }}
- -kubeconfig-service-mesh=/tmp/controlplane/{{ .Values.controlplane.kubeconfig.key }}
{{- end }}
{{- if .Values.threadiness }}
- -threadiness={{ .Values.threadiness }}
{{- end }}
{{- if .Values.clusterName }}
- -cluster-name={{ .Values.clusterName }}
{{- end }}
{{- if .Values.noCrossNamespaceRefs }}
- -no-cross-namespace-refs={{ .Values.noCrossNamespaceRefs }}
{{- end }}
livenessProbe:
exec:
command:

View File

@@ -0,0 +1,11 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "flagger.name" . }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
app.kubernetes.io/name: {{ template "flagger.name" . }}
{{- end }}

View File

@@ -1,5 +1,5 @@
{{- if .Values.prometheus.install }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "flagger.fullname" . }}-prometheus
@@ -24,7 +24,7 @@ rules:
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flagger.fullname" . }}-prometheus
@@ -255,7 +255,14 @@ spec:
mountPath: /etc/prometheus
- name: data-volume
mountPath: /prometheus/data
{{- if .Values.prometheus.securityContext.enabled }}
securityContext:
{{ toYaml .Values.prometheus.securityContext.context | indent 12 }}
{{- end }}
{{- if .Values.prometheus.pullSecret }}
imagePullSecrets:
- name: {{ .Values.prometheus.pullSecret }}
{{- end }}
volumes:
- name: config-volume
configMap:

View File

@@ -1,5 +1,5 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "flagger.fullname" . }}
@@ -27,6 +27,18 @@ rules:
- update
- patch
- delete
- apiGroups:
- "coordination.k8s.io"
resources:
- leases
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- apps
resources:
@@ -74,6 +86,7 @@ rules:
resources:
- canaries
- canaries/status
- canaries/finalizers
- metrictemplates
- metrictemplates/status
- alertproviders
@@ -149,8 +162,19 @@ rules:
resources:
- upstreams
- upstreams/finalizers
- upstreamgroups
- upstreamgroups/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- gateway.solo.io
resources:
- routetables
- routetables/finalizers
verbs:
- get
- list
@@ -172,12 +196,63 @@ rules:
- update
- patch
- delete
- apiGroups:
- traefik.containo.us
resources:
- traefikservices
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- kuma.io
resources:
- trafficroutes
- trafficroutes/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- gateway.networking.k8s.io
resources:
- httproutes
- httproutes/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- keda.sh
resources:
- scaledobjects
- scaledobjects/finalizers
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- nonResourceURLs:
- /version
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "flagger.fullname" . }}

View File

@@ -1,8 +1,8 @@
# Default values for flagger.
image:
repository: weaveworks/flagger
tag: 1.1.0
repository: ghcr.io/fluxcd/flagger
tag: 1.24.1
pullPolicy: IfNotPresent
pullSecret:
@@ -19,7 +19,7 @@ podPriorityClassName: ""
metricsServer: "http://prometheus:9090"
# accepted values are kubernetes, istio, linkerd, appmesh, nginx, gloo or supergloo:mesh.namespace (defaults to istio)
# accepted values are kubernetes, istio, linkerd, appmesh, contour, nginx, gloo, skipper, traefik, osm
meshProvider: ""
# single namespace restriction
@@ -50,11 +50,15 @@ 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:
# incoming webhook https://api.slack.com/incoming-webhooks
url:
proxy:
msteams:
# MS Teams incoming webhook URL
@@ -72,11 +76,21 @@ podMonitor:
# secretKeyRef:
# name: slack
# key: url
#- name: SLACK_PROXY_URL
# valueFrom:
# secretKeyRef:
# name: slack
# key: proxy-url
#- name: MSTEAMS_URL
# valueFrom:
# secretKeyRef:
# name: msteams
# key: url
#- name: MSTEAMS_PROXY_URL
# valueFrom:
# secretKeyRef:
# name: msteams
# key: proxy-url
#- name: EVENT_WEBHOOK_URL
# valueFrom:
# secretKeyRef:
@@ -124,14 +138,31 @@ tolerations: []
prometheus:
# to be used with ingress controllers
install: false
image: docker.io/prom/prometheus:v2.19.0
image: docker.io/prom/prometheus:v2.39.1
pullSecret:
retention: 2h
# when enabled, it will add a security context for the prometheus pod
securityContext:
enabled: false
context:
readOnlyRootFilesystem: true
runAsUser: 10001
# Istio multi-cluster service mesh (shared control plane single-network)
# https://istio.io/docs/setup/install/multicluster/shared-vpn/
istio:
kubeconfigQPS: ""
kubeconfigBurst: ""
# Multi-cluster service mesh (shared control plane single-network)
controlplane:
kubeconfig:
# istio.kubeconfig.secretName: The name of the secret containing the Istio control plane kubeconfig
# controlplane.kubeconfig.secretName: The name of the secret containing the mesh control plane kubeconfig
secretName: ""
# istio.kubeconfig.key: The name of secret data key that contains the Istio control plane kubeconfig
# controlplane.kubeconfig.key: The name of secret data key that contains the mesh control plane kubeconfig
key: "kubeconfig"
podDisruptionBudget:
enabled: false
minAvailable: 1
podLabels: {}
noCrossNamespaceRefs: false

View File

@@ -1,12 +1,12 @@
apiVersion: v1
name: grafana
version: 1.4.0
appVersion: 6.5.1
version: 1.7.0
appVersion: 7.2.0
description: Grafana dashboards for monitoring Flagger canary deployments
icon: https://raw.githubusercontent.com/weaveworks/flagger/master/docs/logo/weaveworks.png
icon: https://raw.githubusercontent.com/fluxcd/flagger/main/docs/logo/flagger-icon.png
home: https://flagger.app
sources:
- https://github.com/weaveworks/flagger
- https://github.com/fluxcd/flagger
maintainers:
- name: stefanprodan
url: https://github.com/stefanprodan

View File

@@ -2,7 +2,7 @@
Grafana dashboards for monitoring progressive deployments powered by Flagger and Prometheus.
![flagger-grafana](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/grafana-canary-analysis.png)
![flagger-grafana](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/grafana-canary-analysis.png)
## Prerequisites

View File

@@ -1146,7 +1146,6 @@
"list": [
{
"allValue": null,
"current": null,
"datasource": "prometheus",
"definition": "query_result(sum(envoy_cluster_upstream_rq) by (kubernetes_namespace))",
"hide": 0,
@@ -1168,7 +1167,6 @@
},
{
"allValue": null,
"current": null,
"datasource": "prometheus",
"definition": "query_result(sum(envoy_cluster_upstream_rq{kubernetes_namespace=\"$namespace\",app=~\".*-primary\"}) by (app))",
"hide": 0,
@@ -1190,7 +1188,6 @@
},
{
"allValue": null,
"current": null,
"datasource": "prometheus",
"definition": "query_result(sum(envoy_cluster_upstream_rq{kubernetes_namespace=\"$namespace\",app!~\".*-primary\"}) by (app))",
"hide": 0,

View File

@@ -403,7 +403,7 @@
"steppedLine": false,
"targets": [
{
"expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
@@ -411,7 +411,7 @@
"refId": "A"
},
{
"expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
@@ -419,7 +419,7 @@
"refId": "B"
},
{
"expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$primary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
@@ -509,7 +509,7 @@
"steppedLine": false,
"targets": [
{
"expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.50, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
@@ -517,7 +517,7 @@
"refId": "A"
},
{
"expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.90, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
@@ -525,7 +525,7 @@
"refId": "B"
},
{
"expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le))",
"expr": "histogram_quantile(0.99, sum(irate(istio_request_duration_milliseconds_bucket{reporter=\"destination\",destination_workload=~\"$canary\", destination_workload_namespace=~\"$namespace\"}[1m])) by (le)) / 1000",
"format": "time_series",
"hide": false,
"intervalFactor": 1,

View File

@@ -6,7 +6,7 @@ replicaCount: 1
image:
repository: grafana/grafana
tag: 6.5.1
tag: 7.3.4
pullPolicy: IfNotPresent
podAnnotations: {}
@@ -32,7 +32,7 @@ affinity: {}
user: admin
password:
# Istio Prometheus instance
# Prometheus instance
url: http://prometheus:9090
# Weave Cloud instance token

View File

@@ -1,14 +1,14 @@
apiVersion: v1
name: loadtester
version: 0.18.0
appVersion: 0.18.0
kubeVersion: ">=1.11.0-0"
version: 0.26.0
appVersion: 0.26.0
kubeVersion: ">=1.19.0-0"
engine: gotpl
description: Flagger's load testing services based on rakyll/hey and bojand/ghz that generates traffic during canary analysis when configured as a webhook.
home: https://docs.flagger.app
icon: https://raw.githubusercontent.com/weaveworks/flagger/master/docs/logo/weaveworks.png
icon: https://raw.githubusercontent.com/fluxcd/flagger/main/docs/logo/flagger-icon.png
sources:
- https://github.com/weaveworks/flagger
- https://github.com/fluxcd/flagger
maintainers:
- name: stefanprodan
url: https://github.com/stefanprodan
@@ -19,5 +19,7 @@ keywords:
- appmesh
- linkerd
- gloo
- osm
- smi
- gitops
- load testing

View File

@@ -1,13 +1,13 @@
# Flagger load testing service
[Flagger's](https://github.com/weaveworks/flagger) load testing service is based on
[rakyll/hey](https://github.com/rakyll/hey) and
[Flagger's](https://github.com/fluxcd/flagger) load testing service is based on
[rakyll/hey](https://github.com/rakyll/hey) and
[bojand/ghz](https://github.com/bojand/ghz).
It can be used to generate HTTP and gRPC traffic during canary analysis when configured as a webhook.
## Prerequisites
* Kubernetes >= 1.11
* Kubernetes >= 1.19
## Installing the Chart
@@ -26,7 +26,7 @@ helm upgrade -i flagger-loadtester flagger/loadtester
The command deploys loadtester on the Kubernetes cluster in the default namespace.
> **Tip**: Note that the namespace where you deploy the load tester should
> have the Istio, App Mesh or Linkerd sidecar injection enabled
> have the Istio, App Mesh, Linkerd or Open Service Mesh sidecar injection enabled
The [configuration](#configuration) section lists the parameters that can be configured during installation.
@@ -44,32 +44,35 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of the load tester chart and their default values.
Parameter | Description | Default
--- | --- | ---
`image.repository` | Image repository | `quay.io/stefanprodan/flagger-loadtester`
`image.pullPolicy` | Image pull policy | `IfNotPresent`
`image.tag` | Image tag | `<VERSION>`
`replicaCount` | Desired number of pods | `1`
`serviceAccountName` | Kubernetes service account name | `none`
`resources.requests.cpu` | CPU requests | `10m`
`resources.requests.memory` | Memory requests | `64Mi`
`tolerations` | List of node taints to tolerate | `[]`
`affinity` | node/pod affinities | `node`
`nodeSelector` | Node labels for pod assignment | `{}`
`service.type` | Type of service | `ClusterIP`
`service.port` | ClusterIP port | `80`
`cmd.timeout` | Command execution timeout | `1h`
`logLevel` | Log level can be debug, info, warning, error or panic | `info`
`appmesh.enabled` | Create AWS App Mesh v1beta2 virtual node | `false`
`appmesh.backends` | AWS App Mesh virtual services | `none`
`istio.enabled` | Create Istio virtual service | `false`
`istio.host` | Loadtester hostname | `flagger-loadtester.flagger`
`istio.gateway.enabled` | Create Istio gateway in namespace | `false`
`istio.tls.enabled` | Enable TLS in gateway ( TLS secrets should be in namespace ) | `false`
`istio.tls.httpsRedirect` | Redirect traffic to TLS port | `false`
`podPriorityClassName` | PriorityClass name for pod priority configuration | ""
`securityContext.enabled` | Add securityContext to container | ""
`securityContext.context` | securityContext to add | ""
| Parameter | Description | Default |
|------------------------------------|--------------------------------------------------------------------------------------|-------------------------------------|
| `image.repository` | Image repository | `ghcr.io/fluxcd/flagger-loadtester` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.tag` | Image tag | `<VERSION>` |
| `replicaCount` | Desired number of pods | `1` |
| `serviceAccountName` | Kubernetes service account name | `none` |
| `resources.requests.cpu` | CPU requests | `10m` |
| `resources.requests.memory` | Memory requests | `64Mi` |
| `tolerations` | List of node taints to tolerate | `[]` |
| `affinity` | node/pod affinities | `node` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `service.type` | Type of service | `ClusterIP` |
| `service.port` | ClusterIP port | `80` |
| `cmd.timeout` | Command execution timeout | `1h` |
| `cmd.namespaceRegexp` | Restrict access to canaries in matching namespaces | "" |
| `logLevel` | Log level can be debug, info, warning, error or panic | `info` |
| `appmesh.enabled` | Create AWS App Mesh v1beta2 virtual node | `false` |
| `appmesh.backends` | AWS App Mesh virtual services | `none` |
| `istio.enabled` | Create Istio virtual service | `false` |
| `istio.host` | Loadtester hostname | `flagger-loadtester.flagger` |
| `istio.gateway.enabled` | Create Istio gateway in namespace | `false` |
| `istio.tls.enabled` | Enable TLS in gateway ( TLS secrets should be in namespace ) | `false` |
| `istio.tls.httpsRedirect` | Redirect traffic to TLS port | `false` |
| `podPriorityClassName` | PriorityClass name for pod priority configuration | "" |
| `securityContext.enabled` | Add securityContext to container | "" |
| `securityContext.context` | securityContext to add | "" |
| `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,
@@ -87,5 +90,3 @@ helm install flagger/loadtester --name flagger-loadtester -f values.yaml
```
> **Tip**: You can use the default [values.yaml](values.yaml)

View File

@@ -16,8 +16,13 @@ spec:
metadata:
labels:
app: {{ include "loadtester.name" . }}
app.kubernetes.io/name: {{ include "loadtester.name" . }}
{{- range $key, $value := .Values.podLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
annotations:
appmesh.k8s.aws/ports: "444"
openservicemesh.io/inbound-port-exclusion-list: "80, 8080"
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
@@ -29,7 +34,7 @@ spec:
{{- end }}
{{- if .Values.podPriorityClassName }}
priorityClassName: {{ .Values.podPriorityClassName }}
{{- end }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- if .Values.securityContext.enabled }}
@@ -46,6 +51,7 @@ spec:
- -port=8080
- -log-level={{ .Values.logLevel }}
- -timeout={{ .Values.cmd.timeout }}
- -namespace-regexp={{ .Values.cmd.namespaceRegexp }}
livenessProbe:
exec:
command:
@@ -66,8 +72,24 @@ spec:
- --spider
- http://localhost:8080/healthz
timeoutSeconds: 5
{{- if .Values.env }}
env:
{{- toYaml .Values.env | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ .Values.image.pullSecret }}
{{- end }}
{{ with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@@ -0,0 +1,11 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "loadtester.fullname" . }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "loadtester.name" . }}
{{- end }}

View File

@@ -1,23 +1,29 @@
replicaCount: 1
image:
repository: weaveworks/flagger-loadtester
tag: 0.18.0
repository: ghcr.io/fluxcd/flagger-loadtester
tag: 0.26.0
pullPolicy: IfNotPresent
pullSecret:
podLabels: {}
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
podPriorityClassName: ""
podPriorityClassName: ""
logLevel: info
cmd:
timeout: 1h
namespaceRegexp: ""
nameOverride: ""
fullnameOverride: ""
env: []
service:
type: ClusterIP
port: 80
@@ -27,6 +33,9 @@ resources:
cpu: 10m
memory: 64Mi
volumes: []
volumeMounts: []
nodeSelector: {}
tolerations: []
@@ -62,15 +71,15 @@ appmesh:
- podinfo
- podinfo-canary
#Istio virtual service and gatway settings. TLS secrets should be in namespace before enbaled it. ( secret format loadtester.fullname )
#Istio virtual service and gatway settings. TLS secrets should be in namespace before enbaled it. ( secret format loadtester.fullname )
istio:
enabled: false
host: flagger-loadtester.flagger
gateway:
enabled: false
enabled: false
tls:
enabled: false
httpsRedirect: false
httpsRedirect: false
# when enabled, it will add a security context for the loadtester pod
securityContext:
@@ -79,3 +88,7 @@ securityContext:
readOnlyRootFilesystem: true
runAsUser: 100
runAsGroup: 101
podDisruptionBudget:
enabled: false
minAvailable: 1

View File

@@ -1,11 +1,11 @@
apiVersion: v1
version: 3.1.1
appVersion: 3.1.0
version: 6.1.3
appVersion: 6.1.3
name: podinfo
engine: gotpl
description: Flagger canary deployment demo application
home: https://docs.flagger.app
icon: https://raw.githubusercontent.com/weaveworks/flagger/master/docs/logo/weaveworks.png
icon: https://raw.githubusercontent.com/fluxcd/flagger/main/docs/logo/flagger-icon.png
sources:
- https://github.com/stefanprodan/podinfo
maintainers:

View File

@@ -1,4 +1,4 @@
{{- if not .Values.canary.enabled }}
{{- if and .Values.service.enabled (not .Values.canary.enabled) }}
apiVersion: v1
kind: Service
metadata:

View File

@@ -12,6 +12,7 @@ metadata:
sidecar.istio.io/inject: "false"
linkerd.io/inject: disabled
appmesh.k8s.aws/sidecarInjectorWebhook: disabled
openservicemesh.io/sidecar-injection: disabled
spec:
containers:
- name: tools

View File

@@ -1,7 +1,7 @@
# Default values for podinfo.
image:
repository: stefanprodan/podinfo
tag: 3.1.0
repository: ghcr.io/stefanprodan/podinfo
tag: 6.1.3
pullPolicy: IfNotPresent
podAnnotations: {}

View File

@@ -1,3 +1,19 @@
/*
Copyright 2020 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
@@ -9,7 +25,8 @@ import (
"strings"
"time"
semver "github.com/Masterminds/semver/v3"
"github.com/Masterminds/semver/v3"
"github.com/go-logr/zapr"
"go.uber.org/zap"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/uuid"
@@ -21,29 +38,36 @@ import (
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/client-go/transport"
_ "k8s.io/code-generator/cmd/client-gen/generators"
"k8s.io/klog/v2"
"github.com/weaveworks/flagger/pkg/canary"
clientset "github.com/weaveworks/flagger/pkg/client/clientset/versioned"
informers "github.com/weaveworks/flagger/pkg/client/informers/externalversions"
"github.com/weaveworks/flagger/pkg/controller"
"github.com/weaveworks/flagger/pkg/logger"
"github.com/weaveworks/flagger/pkg/metrics/observers"
"github.com/weaveworks/flagger/pkg/notifier"
"github.com/weaveworks/flagger/pkg/router"
"github.com/weaveworks/flagger/pkg/server"
"github.com/weaveworks/flagger/pkg/signals"
"github.com/weaveworks/flagger/pkg/version"
"github.com/fluxcd/flagger/pkg/canary"
clientset "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
informers "github.com/fluxcd/flagger/pkg/client/informers/externalversions"
"github.com/fluxcd/flagger/pkg/controller"
"github.com/fluxcd/flagger/pkg/logger"
"github.com/fluxcd/flagger/pkg/metrics/observers"
"github.com/fluxcd/flagger/pkg/notifier"
"github.com/fluxcd/flagger/pkg/router"
"github.com/fluxcd/flagger/pkg/server"
"github.com/fluxcd/flagger/pkg/signals"
"github.com/fluxcd/flagger/pkg/version"
)
var (
masterURL string
kubeconfig string
kubeconfigQPS int
kubeconfigBurst int
metricsServer string
controlLoopInterval time.Duration
logLevel string
port string
msteamsURL string
msteamsProxyURL string
includeLabelPrefix string
slackURL string
slackToken string
slackProxyURL string
slackUser string
slackChannel string
eventWebhook string
@@ -60,25 +84,33 @@ var (
enableConfigTracking bool
ver bool
kubeconfigServiceMesh string
clusterName string
noCrossNamespaceRefs bool
)
func init() {
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
flag.IntVar(&kubeconfigQPS, "kubeconfig-qps", 100, "Set QPS for kubeconfig.")
flag.IntVar(&kubeconfigBurst, "kubeconfig-burst", 250, "Set Burst for kubeconfig.")
flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.")
flag.StringVar(&metricsServer, "metrics-server", "http://prometheus:9090", "Prometheus URL.")
flag.DurationVar(&controlLoopInterval, "control-loop-interval", 10*time.Second, "Kubernetes API sync interval.")
flag.StringVar(&logLevel, "log-level", "debug", "Log level can be: debug, info, warning, error.")
flag.StringVar(&port, "port", "8080", "Port to listen on.")
flag.StringVar(&slackURL, "slack-url", "", "Slack hook URL.")
flag.StringVar(&slackToken, "slack-token", "", "Slack bot token.")
flag.StringVar(&slackProxyURL, "slack-proxy-url", "", "Slack proxy URL.")
flag.StringVar(&slackUser, "slack-user", "flagger", "Slack user name.")
flag.StringVar(&slackChannel, "slack-channel", "", "Slack channel.")
flag.StringVar(&eventWebhook, "event-webhook", "", "Webhook for publishing flagger events")
flag.StringVar(&msteamsURL, "msteams-url", "", "MS Teams incoming webhook URL.")
flag.StringVar(&msteamsProxyURL, "msteams-proxy-url", "", "MS Teams proxy URL.")
flag.StringVar(&includeLabelPrefix, "include-label-prefix", "", "List of prefixes of labels that are copied when creating primary deployments or daemonsets. Use * to include all.")
flag.IntVar(&threadiness, "threadiness", 2, "Worker concurrency.")
flag.BoolVar(&zapReplaceGlobals, "zap-replace-globals", false, "Whether to change the logging level of the global zap logger.")
flag.StringVar(&zapEncoding, "zap-encoding", "json", "Zap logger encoding.")
flag.StringVar(&namespace, "namespace", "", "Namespace that flagger would watch canary object.")
flag.StringVar(&meshProvider, "mesh-provider", "istio", "Service mesh provider, can be istio, linkerd, appmesh, contour, gloo, nginx or skipper.")
flag.StringVar(&meshProvider, "mesh-provider", "istio", "Service mesh provider, can be istio, linkerd, appmesh, contour, gloo, nginx, skipper, traefik, osm or kuma.")
flag.StringVar(&selectorLabels, "selector-labels", "app,name,app.kubernetes.io/name", "List of pod labels that Flagger uses to create pod selectors.")
flag.StringVar(&ingressAnnotationsPrefix, "ingress-annotations-prefix", "nginx.ingress.kubernetes.io", "Annotations prefix for NGINX ingresses.")
flag.StringVar(&ingressClass, "ingress-class", "", "Ingress class used for annotating HTTPProxy objects.")
@@ -87,9 +119,12 @@ func init() {
flag.BoolVar(&enableConfigTracking, "enable-config-tracking", true, "Enable secrets and configmaps tracking.")
flag.BoolVar(&ver, "version", false, "Print version")
flag.StringVar(&kubeconfigServiceMesh, "kubeconfig-service-mesh", "", "Path to a kubeconfig for the service mesh control plane cluster.")
flag.StringVar(&clusterName, "cluster-name", "", "Cluster name to be included in alert msgs.")
flag.BoolVar(&noCrossNamespaceRefs, "no-cross-namespace-refs", false, "When set to true, Flagger can only refer to resources in the same namespace.")
}
func main() {
klog.InitFlags(nil)
flag.Parse()
if ver {
@@ -105,6 +140,8 @@ func main() {
zap.ReplaceGlobals(logger.Desugar())
}
klog.SetLogger(zapr.NewLogger(logger.Desugar()))
defer logger.Sync()
stopCh := signals.SetupSignalHandler()
@@ -116,6 +153,9 @@ func main() {
logger.Fatalf("Error building kubeconfig: %v", err)
}
cfg.QPS = float32(kubeconfigQPS)
cfg.Burst = kubeconfigBurst
kubeClient, err := kubernetes.NewForConfig(cfg)
if err != nil {
logger.Fatalf("Error building kubernetes clientset: %v", err)
@@ -130,12 +170,15 @@ func main() {
if kubeconfigServiceMesh == "" {
kubeconfigServiceMesh = kubeconfig
}
cfgHost, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfigServiceMesh)
serviceMeshCfg, err := clientcmd.BuildConfigFromFlags(masterURL, kubeconfigServiceMesh)
if err != nil {
logger.Fatalf("Error building host kubeconfig: %v", err)
}
meshClient, err := clientset.NewForConfig(cfgHost)
serviceMeshCfg.QPS = float32(kubeconfigQPS)
serviceMeshCfg.Burst = kubeconfigBurst
meshClient, err := clientset.NewForConfig(serviceMeshCfg)
if err != nil {
logger.Fatalf("Error building mesh clientset: %v", err)
}
@@ -171,7 +214,14 @@ func main() {
// start HTTP server
go server.ListenAndServe(port, 3*time.Second, logger, stopCh)
routerFactory := router.NewFactory(cfg, kubeClient, flaggerClient, ingressAnnotationsPrefix, ingressClass, logger, meshClient)
setOwnerRefs := true
// Router shouldn't set OwnerRefs on resources that they create since the
// service mesh/ingress controller is in a different cluster.
if cfg.Host != serviceMeshCfg.Host {
setOwnerRefs = false
}
routerFactory := router.NewFactory(cfg, kubeClient, flaggerClient, ingressAnnotationsPrefix, ingressClass, logger, meshClient, setOwnerRefs)
var configTracker canary.Tracker
if enableConfigTracking {
@@ -184,7 +234,9 @@ func main() {
configTracker = &canary.NopTracker{}
}
canaryFactory := canary.NewFactory(kubeClient, flaggerClient, configTracker, labels, logger)
includeLabelPrefixArray := strings.Split(includeLabelPrefix, ",")
canaryFactory := canary.NewFactory(kubeClient, flaggerClient, configTracker, labels, includeLabelPrefixArray, logger)
c := controller.NewController(
kubeClient,
@@ -199,6 +251,8 @@ func main() {
meshProvider,
version.VERSION,
fromEnv("EVENT_WEBHOOK_URL", eventWebhook),
clusterName,
noCrossNamespaceRefs,
)
// leader election context
@@ -273,7 +327,7 @@ func startLeaderElection(ctx context.Context, run func(), ns string, kubeClient
id = id + "_" + string(uuid.NewUUID())
lock, err := resourcelock.New(
resourcelock.ConfigMapsResourceLock,
resourcelock.ConfigMapsLeasesResourceLock,
ns,
configMapName,
kubeClient.CoreV1(),
@@ -313,12 +367,15 @@ func startLeaderElection(ctx context.Context, run func(), ns string, kubeClient
func initNotifier(logger *zap.SugaredLogger) (client notifier.Interface) {
provider := "slack"
token := fromEnv("SLACK_TOKEN", slackToken)
notifierURL := fromEnv("SLACK_URL", slackURL)
notifierProxyURL := fromEnv("SLACK_PROXY_URL", slackProxyURL)
if msteamsURL != "" || os.Getenv("MSTEAMS_URL") != "" {
provider = "msteams"
notifierURL = fromEnv("MSTEAMS_URL", msteamsURL)
notifierProxyURL = fromEnv("MSTEAMS_PROXY_URL", msteamsProxyURL)
}
notifierFactory := notifier.NewFactory(notifierURL, slackUser, slackChannel)
notifierFactory := notifier.NewFactory(notifierURL, token, notifierProxyURL, slackUser, slackChannel)
var err error
client, err = notifierFactory.Notifier(provider)

View File

@@ -1,21 +1,39 @@
/*
Copyright 2020, 2022 The Flux authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package main
import (
"flag"
"log"
"regexp"
"time"
"github.com/weaveworks/flagger/pkg/loadtester"
"github.com/weaveworks/flagger/pkg/logger"
"github.com/weaveworks/flagger/pkg/signals"
"github.com/fluxcd/flagger/pkg/loadtester"
"github.com/fluxcd/flagger/pkg/logger"
"github.com/fluxcd/flagger/pkg/signals"
"go.uber.org/zap"
)
var VERSION = "0.18.0"
var VERSION = "0.26.0"
var (
logLevel string
port string
timeout time.Duration
namespaceRegexp string
zapReplaceGlobals bool
zapEncoding string
)
@@ -24,6 +42,7 @@ func init() {
flag.StringVar(&logLevel, "log-level", "debug", "Log level can be: debug, info, warning, error.")
flag.StringVar(&port, "port", "9090", "Port to listen on.")
flag.DurationVar(&timeout, "timeout", time.Hour, "Load test exec timeout.")
flag.StringVar(&namespaceRegexp, "namespace-regexp", "", "Restrict access to canaries in matching namespaces.")
flag.BoolVar(&zapReplaceGlobals, "zap-replace-globals", false, "Whether to change the logging level of the global zap logger.")
flag.StringVar(&zapEncoding, "zap-encoding", "json", "Zap logger encoding.")
}
@@ -50,5 +69,12 @@ func main() {
logger.Infof("Starting load tester v%s API on port %s", VERSION, port)
gateStorage := loadtester.NewGateStorage("in-memory")
loadtester.ListenAndServe(port, time.Minute, logger, taskRunner, gateStorage, stopCh)
var namespaceRegexpCompiled *regexp.Regexp
if namespaceRegexp != "" {
namespaceRegexpCompiled = regexp.MustCompile(namespaceRegexp)
}
authorizer := loadtester.NewAuthorizer(namespaceRegexpCompiled)
loadtester.ListenAndServe(port, time.Minute, logger, taskRunner, gateStorage, authorizer, stopCh)
}

View File

@@ -1,73 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported by contacting stefan.prodan(at)gmail.com.
All complaints will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of
an incident. Further details of specific enforcement policies may be
posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -4,35 +4,41 @@ description: Flagger is a progressive delivery Kubernetes operator
# Introduction
[Flagger](https://github.com/weaveworks/flagger) is a **Kubernetes** operator that automates the promotion of
canary deployments using **Istio**, **Linkerd**, **App Mesh**, **NGINX**, **Skipper**, **Contour** or **Gloo** routing for
traffic shifting and **Prometheus** metrics for canary analysis. The canary analysis can be extended with webhooks for
running system integration/acceptance tests, load tests, or any other custom validation.
[Flagger](https://github.com/fluxcd/flagger) is a progressive delivery tool that automates the release
process for applications running on Kubernetes. It reduces the risk of introducing a new software
version in production by gradually shifting traffic to the new version while measuring metrics
and running conformance tests.
Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators
like HTTP requests success rate, requests average duration and pods health.
Based on analysis of the **KPIs** a canary is promoted or aborted, and the analysis result is published to **Slack** or **MS Teams**.
Flagger implements several deployment strategies (Canary releases, A/B testing, Blue/Green mirroring)
using a service mesh (App Mesh, Istio, Linkerd, Kuma, Open Service Mesh)
or an ingress controller (Contour, Gloo, NGINX, Skipper, Traefik) for traffic routing.
For release analysis, Flagger can query Prometheus, InfluxDB, Datadog, New Relic, CloudWatch, Stackdriver
or Graphite and for alerting it uses Slack, MS Teams, Discord and Rocket.
![Flagger overview diagram](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-canary-overview.png)
![Flagger overview diagram](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-overview.png)
Flagger can be configured with Kubernetes custom resources and is compatible with any CI/CD solutions made for Kubernetes.
Since Flagger is declarative and reacts to Kubernetes events,
it can be used in **GitOps** pipelines together with Flux CD or JenkinsX.
Flagger can be configured with Kubernetes custom resources and is compatible with
any CI/CD solutions made for Kubernetes. Since Flagger is declarative and reacts to Kubernetes events,
it can be used in **GitOps** pipelines together with tools like [Flux](install/flagger-install-with-flux.md),
JenkinsX, Carvel, Argo, etc.
This project is sponsored by [Weaveworks](https://www.weave.works/)
Flagger is a [Cloud Native Computing Foundation](https://cncf.io/) project
and part of [Flux](https://fluxcd.io) family of GitOps tools.
## Getting started
To get started with Flagger, chose one of the supported routing providers
and [install](install/flagger-install-on-kubernetes.md) Flagger with Helm or Kustomize.
To get started with Flagger, choose one of the supported routing providers and
[install](install/flagger-install-on-kubernetes.md) Flagger with Helm or Kustomize.
After install Flagger, you can follow one of the tutorials:
After installing Flagger, you can follow one of these tutorials to get started:
**Service mesh tutorials**
* [Istio](tutorials/istio-progressive-delivery.md)
* [Linkerd](tutorials/linkerd-progressive-delivery.md)
* [AWS App Mesh](tutorials/appmesh-progressive-delivery.md)
* [Open Service Mesh](tutorials/osm-progressive-delivery.md)
* [Kuma](tutorials/kuma-progressive-delivery.md)
**Ingress controller tutorials**
@@ -40,6 +46,7 @@ After install Flagger, you can follow one of the tutorials:
* [Gloo](tutorials/gloo-progressive-delivery.md)
* [NGINX Ingress](tutorials/nginx-progressive-delivery.md)
* [Skipper Ingress](tutorials/skipper-progressive-delivery.md)
* [Traefik](tutorials/traefik-progressive-delivery.md)
**Hands-on GitOps workshops**

View File

@@ -6,8 +6,10 @@
## Install
* [Flagger Install on Kubernetes](install/flagger-install-on-kubernetes.md)
* [Flagger Install with Flux](install/flagger-install-with-flux.md)
* [Flagger Install on GKE Istio](install/flagger-install-on-google-cloud.md)
* [Flagger Install on EKS App Mesh](install/flagger-install-on-eks-appmesh.md)
* [Flagger Install on Alibaba ServiceMesh](install/flagger-install-on-alibaba-servicemesh.md)
## Usage
@@ -28,10 +30,13 @@
* [Gloo Canary Deployments](tutorials/gloo-progressive-delivery.md)
* [NGINX Canary Deployments](tutorials/nginx-progressive-delivery.md)
* [Skipper Canary Deployments](tutorials/skipper-progressive-delivery.md)
* [Traefik Canary Deployments](tutorials/traefik-progressive-delivery.md)
* [Open Service Mesh Deployments](tutorials/osm-progressive-delivery.md)
* [Kuma Canary Deployments](tutorials/kuma-progressive-delivery.md)
* [Gateway API Canary Deployments](tutorials/gatewayapi-progressive-delivery.md)
* [Blue/Green Deployments](tutorials/kubernetes-blue-green.md)
* [Crossover Canary Deployments](tutorials/crossover-progressive-delivery.md)
* [Canary analysis with Prometheus Operator](tutorials/prometheus-operator.md)
* [Canaries with Helm charts and GitOps](tutorials/canary-helm-gitops.md)
* [Canary analysis with KEDA ScaledObjects](tutorials/keda-scaledobject.md)
* [Zero downtime deployments](tutorials/zero-downtime-deployments.md)
## Dev
@@ -39,3 +44,4 @@
* [Development Guide](dev/dev-guide.md)
* [Release Guide](dev/release-guide.md)
* [Upgrade Guide](dev/upgrade-guide.md)

View File

@@ -2,36 +2,36 @@
This document describes how to build, test and run Flagger from source.
### Setup dev environment
## Setup dev environment
Flagger is written in Go and uses Go modules for dependency management.
On your dev machine install the following tools:
* go >= 1.14
* git >= 2.20
* go >= 1.19
* git >;= 2.20
* bash >= 5.0
* make >= 3.81
* kubectl >= 1.16
* kustomize >= 3.5
* kubectl >= 1.22
* kustomize >= 4.4
* helm >= 3.0
* docker >= 19.03
You'll also need a Kubernetes cluster for testing Flagger.
You can use Minikube, Kind, Docker desktop or any remote cluster
(AKS/EKS/GKE/etc) Kubernetes version 1.14 or newer.
You can use Minikube, Kind, Docker desktop or any remote cluster (AKS/EKS/GKE/etc) Kubernetes version 1.22 or newer.
To start contributing to Flagger, fork the [repository](https://github.com/weaveworks/flagger) on GitHub.
To start contributing to Flagger, fork the [repository](https://github.com/fluxcd/flagger) on GitHub.
Create a dir inside your `GOPATH`:
```bash
mkdir -p $GOPATH/src/github.com/weaveworks
mkdir -p $GOPATH/src/github.com/fluxcd
```
Clone your fork:
```bash
cd $GOPATH/src/github.com/weaveworks
cd $GOPATH/src/github.com/fluxcd
git clone https://github.com/YOUR_USERNAME/flagger
cd flagger
```
@@ -39,18 +39,18 @@ cd flagger
Set Flagger repository as upstream:
```bash
git remote add upstream https://github.com/weaveworks/flagger.git
git remote add upstream https://github.com/fluxcd/flagger.git
```
Sync your fork regularly to keep it up-to-date with upstream:
```bash
git fetch upstream
git checkout master
git merge upstream/master
git checkout main
git merge upstream/main
```
### Build
## Build
Download Go modules:
@@ -58,19 +58,30 @@ Download Go modules:
go mod download
```
Build Flagger binary and container image:
Build Flagger binary:
```bash
make build
```
Build load tester binary and container image:
Build load tester binary:
```bash
make loadtester-build
```
### Code changes
## Code changes
We require all commits to be signed. By signing off with your signature, you
certify that you wrote the patch or otherwise have the right to contribute the
material by the rules of the [DCO](https://raw.githubusercontent.com/fluxcd/flagger/main/DCO).
If your `user.name` and `user.email` are configured in your Git config,
you can sign your commit automatically with:
```bash
git commit -s
```
Before submitting a PR, make sure your changes are covered by unit tests.
@@ -89,6 +100,8 @@ make codegen
Run code formatters:
```bash
go install golang.org/x/tools/cmd/goimports@latest
make fmt
```
@@ -98,7 +111,7 @@ Run unit tests:
make test
```
### API changes
## API changes
If you made changes to `pkg/apis` regenerate the Kubernetes client sets with:
@@ -114,10 +127,11 @@ make crd
Note that any change to the CRDs must be accompanied by an update to the Open API schema.
### Manual testing
## Manual testing
Install a service mesh and/or an ingress controller on your cluster and deploy Flagger
using one of the install options [listed here](https://docs.flagger.app/install/flagger-install-on-kubernetes).
Install a service mesh and/or an ingress controller on your cluster
and deploy Flagger using one of the install options
[listed here](https://docs.flagger.app/install/flagger-install-on-kubernetes).
If you made changes to the CRDs, apply your local copy with:
@@ -150,7 +164,7 @@ Another option to manually test your changes is to build and push the image to y
```bash
make build
docker tag weaveworks/flagger:latest <YOUR-DOCKERHUB-USERNAME>/flagger:<YOUR-TAG>
docker build -t <YOUR-DOCKERHUB-USERNAME>/flagger:<YOUR-TAG> .
docker push <YOUR-DOCKERHUB-USERNAME>/flagger:<YOUR-TAG>
```
@@ -163,7 +177,7 @@ kubectl -n istio-system scale deployment/flagger --replicas=1
Now you can use one of the [tutorials](https://docs.flagger.app/) to manually test your changes.
### Integration testing
## Integration testing
Flagger end-to-end tests can be run locally with [Kubernetes Kind](https://github.com/kubernetes-sigs/kind).
@@ -173,39 +187,22 @@ Create a Kind cluster:
kind create cluster
```
Install a service mesh and/or an ingress controller in Kind.
Linkerd example:
```bash
linkerd install | kubectl apply -f -
linkerd check
```
Build Flagger container image and load it on the cluster:
```bash
make build
docker tag weaveworks/flagger:latest test/flagger:latest
docker build -t test/flagger:latest .
kind load docker-image test/flagger:latest
```
Install Flagger on the cluster and set the test image:
Run the Istio e2e tests:
```bash
kubectl apply -k ./kustomize/linkerd
kubectl -n linkerd set image deployment/flagger flagger=test/flagger:latest
kubectl -n linkerd rollout status deployment/flagger
./test/istio/run.sh
```
Run the Linkerd e2e tests:
```bash
./test/e2e-linkerd-tests.sh
```
For each service mesh and ingress controller there is a dedicated e2e test suite,
chose one that matches your changes from this [list](https://github.com/weaveworks/flagger/tree/master/test).
For each service mesh and ingress controller, there is a dedicated e2e test suite,
choose one that matches your changes from this [list](https://github.com/fluxcd/flagger/tree/main/test).
When you open a pull request on Flagger repo, the unit and integration tests will be run in CI.

View File

@@ -2,33 +2,33 @@
This document describes how to release Flagger.
### Release
## Release
To release a new Flagger version (e.g. `2.0.0`) follow these steps:
* create a branch `git checkout -b prep-2.0.0`
* set the version in code and manifests `TAG=2.0.0 make version-set`
* commit changes and merge PR
* checkout master `git checkout master && git pull`
* checkout master `git checkout main && git pull`
* tag master `make release`
### CI
## CI
After the tag has been pushed to GitHub, the CI release pipeline does the following:
* creates a GitHub release
* pushes the Flagger binary and change log to GitHub release
* pushes the Flagger container image to Docker Hub
* pushes the Helm chart to github-pages branch
* GitHub pages publishes the new chart version on the Helm repository
### Docs
## Docs
The documentation [website](https://docs.flagger.app) is built from the `docs` branch.
After a Flagger release, publish the docs with:
* `git checkout master && git pull`
* `git checkout main && git pull`
* `git checkout docs`
* `git rebase master`
* `git rebase main`
* `git push origin docs`

View File

@@ -2,9 +2,10 @@
This document describes how to upgrade Flagger.
### Upgrade canaries v1alpha3 to v1beta1
## Upgrade canaries v1alpha3 to v1beta1
Canary CRD changes in `canaries.flagger.app/v1beta1`:
* the `spec.canaryAnalysis` field has been deprecated and replaced with `spec.analysis`
* the `spec.analysis.interval` and `spec.analysis.threshold` fields are required
* the `status.lastAppliedSpec` and `status.lastPromotedSpec` hashing algorithm changed to `hash/fnv`
@@ -17,17 +18,17 @@ Canary CRD changes in `canaries.flagger.app/v1beta1`:
* the `spec.service.meshName` field has been deprecated and no longer used for `provider: appmesh:v1beta2`
Upgrade procedure:
* install the `v1beta1` CRDs
* update Flagger deployment
* replace `apiVersion: flagger.app/v1alpha3` with `apiVersion: flagger.app/v1beta1` in all canary manifests
* replace `spec.canaryAnalysis` with `spec.analysis` in all canary manifests
* update 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`.
**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` with `thresholdRange.min` for request-success-rate
* replace `threshold` with `thresholdRange.max` for request-duration
@@ -43,11 +44,9 @@ metrics:
interval: 1m
```
### Istio telemetry v2
## 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.
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:
@@ -88,3 +87,4 @@ metrics:
max: 0.500
interval: 1m
```

View File

@@ -1,32 +1,35 @@
# Frequently asked questions
# FAQ
### Deployment Strategies
## Deployment Strategies
**Which deployment strategies are supported by Flagger?**
#### Which deployment strategies are supported by Flagger?
Flagger implements the following deployment strategies:
* [Canary Release](usage/deployment-strategies.md#canary-release)
* [A/B Testing](usage/deployment-strategies.md#a-b-testing)
* [Blue/Green](usage/deployment-strategies.md#blue-green-deployments)
* [Blue/Green Mirroring](usage/deployment-strategies.md#blue-green-with-traffic-mirroring)
* [A/B Testing](usage/deployment-strategies.md#ab-testing)
* [Blue/Green](usage/deployment-strategies.md#bluegreen-deployments)
* [Blue/Green Mirroring](usage/deployment-strategies.md#bluegreen-with-traffic-mirroring)
**When should I use A/B testing instead of progressive traffic shifting?**
#### When should I use A/B testing instead of progressive traffic shifting?
For frontend applications that require session affinity you should use HTTP headers or cookies match conditions
to ensure a set of users will stay on the same version for the whole duration of the canary analysis.
For frontend applications that require session affinity, you should use HTTP headers or
cookie match conditions to ensure a set of users will stay on the same version for
the whole duration of the canary analysis.
**Can I use Flagger to manage applications that live outside of a service mesh?**
#### Can I use Flagger to manage applications that live outside of a service mesh?
For applications that are not deployed on a service mesh, Flagger can orchestrate Blue/Green style deployments
with Kubernetes L4 networking.
For applications that are not deployed on a service mesh,
Flagger can orchestrate Blue/Green style deployments with Kubernetes L4 networking.
**When can I use traffic mirroring?**
#### When can I use traffic mirroring?
Traffic mirroring can be used for Blue/Green deployment strategy or a pre-stage in a Canary release.
Traffic mirroring will copy each incoming request, sending one request to the primary and one to the canary service.
Mirroring should be used for requests that are **idempotent** or capable of being processed twice (once by the primary and once by the canary).
Mirroring should be used for requests that are **idempotent**
or capable of being processed twice (once by the primary and once by the canary).
**How to retry a failed release?**
#### How to retry a failed release?
A canary analysis is triggered by changes in any of the following objects:
@@ -46,11 +49,45 @@ spec:
timestamp: "2020-03-10T14:24:48+0000"
```
### Kubernetes services
#### How to change replicas for a deployment when not using HPA?
**How is an application exposed inside the cluster?**
To change replicas for a deployment when not using HPA, you have to update the canary deployment with the desired replica count
and trigger an analysis by annotating the template. After the analysis finishes, Flagger will promote the `spec.replicas` changes to the primary deployment.
Assuming the app name is podinfo you can define a canary like:
Example:
```yaml
apiVersion: apps/v1
kind: Deployment
spec:
replicas: 4 #update replicas
template:
metadata:
annotations:
timestamp: "2022-02-10T14:24:48+0000" #add annotation to trigger analysis
```
#### Why is there a window of downtime during the canary initializing process when analysis is disabled?
A window of downtime is the intended behavior when the analysis is disabled. This allows instant rollback and also mimics the way
a Kubernetes deployment initialization works. To avoid this, enable the analysis (`skipAnalysis: true`), wait for the initialization
to finish, and disable it afterward (`skipAnalysis: false`).
#### How to disable cross namespace references?
Flagger by default can access resources across namespaces (`AlertProivder`, `MetricProvider` and Gloo `Upsteream`).
If you're in a multi-tenant environment and wish to disable this, you can do so through the `no-cross-namespace-refs` flag.
```
flagger \
-no-cross-namespace-refs=true \
...
```
## Kubernetes services
#### How is an application exposed inside the cluster?
Assuming the app name is `podinfo`, you can define a canary like:
```yaml
apiVersion: flagger.app/v1beta1
@@ -74,20 +111,26 @@ spec:
portName: http
```
If the `service.name` is not specified, then `targetRef.name` is used for the apex domain and canary/primary services name prefix.
You should treat the service name as an immutable field, changing it could result in routing conflicts.
If the `service.name` is not specified, then `targetRef.name` is used for
the apex domain and canary/primary services name prefix.
You should treat the service name as an immutable field; changing its could result in routing conflicts.
Based on the canary spec service, Flagger generates the following Kubernetes ClusterIP service:
* `<service.name>.<namespace>.svc.cluster.local`
* `<service.name>.<namespace>.svc.cluster.local`
selector `app=<name>-primary`
* `<service.name>-primary.<namespace>.svc.cluster.local`
* `<service.name>-primary.<namespace>.svc.cluster.local`
selector `app=<name>-primary`
* `<service.name>-canary.<namespace>.svc.cluster.local`
* `<service.name>-canary.<namespace>.svc.cluster.local`
selector `app=<name>`
This ensures that traffic coming from a namespace outside the mesh to `podinfo.test:9898`
will be routed to the latest stable release of your app.
will be routed to the latest stable release of your app.
```yaml
apiVersion: v1
@@ -133,15 +176,15 @@ spec:
targetPort: http
```
The `podinfo-canary.test:9898` address is available only during the
canary analysis and can be used for conformance testing or load testing.
The `podinfo-canary.test:9898` address is available only during the canary analysis
and can be used for conformance testing or load testing.
### Multiple ports
## Multiple ports
**My application listens on multiple ports, how can I expose them inside the cluster?**
#### My application listens on multiple ports. How can I expose them inside the cluster?
If port discovery is enabled, Flagger scans the deployment spec and extracts the containers
ports excluding the port specified in the canary service and Envoy sidecar ports.
If port discovery is enabled, Flagger scans the deployment spec and extracts the containers ports excluding
the port specified in the canary service and Envoy sidecar ports.
These ports will be used when generating the ClusterIP services.
For a deployment that exposes two ports:
@@ -184,9 +227,9 @@ spec:
Both port `8080` and `9090` will be added to the ClusterIP services.
### Label selectors
## Label selectors
**What labels selectors are supported by Flagger?**
#### What labels selectors are supported by Flagger?
The target deployment must have a single label selector in the format `app: <DEPLOYMENT-NAME>`:
@@ -205,14 +248,93 @@ spec:
app: podinfo
```
Besides `app` Flagger supports `name` and `app.kubernetes.io/name` selectors. If you use a different
convention you can specify your label with the `-selector-labels` flag.
Besides `app`, Flagger supports `name` and `app.kubernetes.io/name` selectors.
If you use a different convention, you can specify your label with the `-selector-labels` flag.
For example:
**Is pod affinity and anti affinity supported?**
```
flagger \
-selector-labels=service,name,app.kubernetes.io/name \
...
```
For pod affinity to work you need to use a different label than the `app`, `name` or `app.kubernetes.io/name`.
#### Is pod affinity and anti affinity supported?
Anti affinity example:
Flagger will rewrite the first value in each match expression,
defined in the target deployment's pod anti-affinity and topology spread constraints,
satisfying the following two requirements when creating, or updating, the primary deployment:
* The key in the match expression must be one of the labels specified by the parameter selector-labels.
The default labels are `app`,`name`,`app.kubernetes.io/name`.
* The value must match the name of the target deployment.
The rewrite done by Flagger in these cases is to suffix the value with `-primary`.
This rewrite can be used to spread the pods created by the canary
and primary deployments across different availability zones.
Example target deployment:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: podinfo
spec:
selector:
matchLabels:
app: podinfo
template:
metadata:
labels:
app: podinfo
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- podinfo
topologyKey: topology.kubernetes.io/zone
```
Example of generated primary deployment:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: podinfo-primary
spec:
selector:
matchLabels:
app: podinfo-primary
template:
metadata:
labels:
app: podinfo-primary
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- podinfo-primary
topologyKey: topology.kubernetes.io/zone
```
It is also possible to use a different label than the `app`, `name` or `app.kubernetes.io/name`.
Anti affinity example(using a different label):
```yaml
apiVersion: apps/v1
@@ -238,16 +360,16 @@ spec:
labelSelector:
matchLabels:
affinity: podinfo
topologyKey: kubernetes.io/hostname
topologyKey: topology.kubernetes.io/zone
```
### Metrics
## Metrics
**How does Flagger measures the request success rate and duration?**
#### How does Flagger measure the request success rate and duration?
Flagger measures the request success rate and duration using Prometheus queries.
By default, Flagger measures the request success rate and duration using Prometheus queries.
**HTTP requests success rate percentage**
#### HTTP requests success rate percentage
Spec:
@@ -274,8 +396,8 @@ sum(
response_code!~"5.*"
}[$interval]
)
)
/
)
/
sum(
rate(
istio_requests_total{
@@ -287,7 +409,7 @@ sum(
)
```
Envoy query (App Mesh, Contour or Gloo):
Envoy query (App Mesh):
```javascript
sum(
@@ -298,8 +420,8 @@ sum(
envoy_response_code!~"5.*"
}[$interval]
)
)
/
)
/
sum(
rate(
envoy_cluster_upstream_rq{
@@ -310,7 +432,28 @@ sum(
)
```
**HTTP requests milliseconds duration P99**
Envoy query (Contour and Gloo):
```javascript
sum(
rate(
envoy_cluster_upstream_rq{
envoy_cluster_name=~"$namespace-$workload",
envoy_response_code!~"5.*"
}[$interval]
)
)
/
sum(
rate(
envoy_cluster_upstream_rq{
envoy_cluster_name=~"$namespace-$workload",
}[$interval]
)
)
```
#### HTTP requests milliseconds duration P99
Spec:
@@ -328,10 +471,10 @@ Spec:
Istio query:
```javascript
histogram_quantile(0.99,
histogram_quantile(0.99,
sum(
irate(
istio_request_duration_seconds_bucket{
istio_request_duration_milliseconds_bucket{
reporter="destination",
destination_workload=~"$workload",
destination_workload_namespace=~"$namespace"
@@ -341,10 +484,10 @@ histogram_quantile(0.99,
)
```
Envoy query (App Mesh, Contour or Gloo):
Envoy query (App Mesh, Contour and Gloo):
```javascript
histogram_quantile(0.99,
histogram_quantile(0.99,
sum(
irate(
envoy_cluster_upstream_rq_time_bucket{
@@ -358,20 +501,47 @@ histogram_quantile(0.99,
> **Note** that the metric interval should be lower or equal to the control loop interval.
**Can I use custom metrics?**
#### Can I use custom metrics?
The analysis can be extended with metrics provided by Prometheus, Datadog and AWS CloudWatch. For more details
on how custom metrics can be used please read the [metrics docs](usage/metrics.md).
The analysis can be extended with metrics provided by Prometheus, Datadog, AWS CloudWatch, New Relic and Graphite.
For more details on how custom metrics can be used, please read the [metrics docs](usage/metrics.md).
### Istio routing
#### Istio Gateway API
**How does Flagger interact with Istio?**
If you're using Istio with Gateway API, the Prometheus query needs to include `reporter="source"`. For example, to calculate HTTP requests error percentage, the query would be:
Flagger creates an Istio Virtual Service and Destination Rules based on the Canary service spec.
The service configuration lets you expose an app inside or outside the mesh.
You can also define traffic policies, HTTP match conditions, URI rewrite rules, CORS policies, timeout and retries.
```javascript
100 - sum(
rate(
istio_requests_total{
reporter="source",
destination_workload_namespace=~"$namespace",
destination_workload=~"$workload",
response_code!~"5.*"
}[$interval]
)
)
/
sum(
rate(
istio_requests_total{
reporter="source",
destination_workload_namespace=~"$namespace",
destination_workload=~"$workload"
}[$interval]
)
) * 100
```
The following spec exposes the `frontend` workload inside the mesh on `frontend.test.svc.cluster.local:9898`
## Istio routing
#### How does Flagger interact with Istio?
Flagger creates an Istio Virtual Service and Destination Rules based on the Canary service spec.
The service configuration lets you expose an app inside or outside the mesh. You can also define traffic policies,
HTTP match conditions, URI rewrite rules, CORS policies, timeout and retries.
The following spec exposes the `frontend` workload inside the mesh on `frontend.test.svc.cluster.local:9898`
and outside the mesh on `frontend.example.com`. You'll have to specify an Istio ingress gateway for external hosts.
```yaml
@@ -551,15 +721,96 @@ spec:
app: backend-primary
```
Flagger works for user facing apps exposed outside the cluster via an ingress gateway
and for backend HTTP APIs that are accessible only from inside the mesh.
Flagger works for user facing apps exposed outside the cluster via an ingress gateway and for backend HTTP APIs
that are accessible only from inside the mesh.
### Istio Ingress Gateway
If `Delegation` is enabled, Flagger would generate Istio VirtualService without hosts and gateway,
making the service compatible with Istio delegation.
**How can I expose multiple canaries on the same external domain?**
```yaml
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: backend
namespace: test
spec:
service:
delegation: true
port: 9898
targetRef:
apiVersion: v1
kind: Deployment
name: podinfo
analysis:
interval: 15s
threshold: 15
maxWeight: 30
stepWeight: 10
```
Assuming you have two apps, one that servers the main website and one that serves the REST API.
For each app you can define a canary object as:
Based on the above spec, Flagger will create the following virtual service:
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: backend
namespace: test
ownerReferences:
- apiVersion: flagger.app/v1beta1
blockOwnerDeletion: true
controller: true
kind: Canary
name: backend
uid: 58562662-5e10-4512-b269-2b789c1b30fe
spec:
http:
- route:
- destination:
host: podinfo-primary
weight: 100
- destination:
host: podinfo-canary
weight: 0
```
Therefore, the following virtual service forwards the traffic to `/podinfo` by the above delegate VirtualService.
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: frontend
namespace: test
spec:
gateways:
- public-gateway.istio-system.svc.cluster.local
- mesh
hosts:
- frontend.example.com
- frontend
http:
- match:
- uri:
prefix: /podinfo
rewrite:
uri: /
delegate:
name: backend
namespace: test
```
Note that pilot env `PILOT_ENABLE_VIRTUAL_SERVICE_DELEGATE` must also be set.
For the use of Istio Delegation, you can refer to the documentation of
[Virtual Service](https://istio.io/latest/docs/reference/config/networking/virtual-service/#Delegate)
and [pilot environment variables](https://istio.io/latest/docs/reference/commands/pilot-discovery/#envvars).
## Istio Ingress Gateway
#### How can I expose multiple canaries on the same external domain?
Assuming you have two apps -- one that serves the main website and one that serves its REST API --
you can define a canary object for each app as:
```yaml
apiVersion: flagger.app/v1beta1
@@ -597,15 +848,17 @@ spec:
uri: /
```
Based on the above configuration, Flagger will create two virtual services bounded to the same ingress gateway and external host.
Istio Pilot will [merge](https://istio.io/help/ops/traffic-management/deploy-guidelines/#multiple-virtual-services-and-destination-rules-for-the-same-host)
the two services and the website rule will be moved to the end of the list in the merged configuration.
Based on the above configuration, Flagger will create two virtual services bounded
to the same ingress gateway and external host.
Istio Pilot will
[merge](https://istio.io/help/ops/traffic-management/deploy-guidelines/#multiple-virtual-services-and-destination-rules-for-the-same-host)
the two services and the website rule will be moved to the end of the list in the merged configuration.
Note that host merging only works if the canaries are bounded to a ingress gateway other than the `mesh` gateway.
Note that host merging only works if the canaries are bounded to an ingress gateway other than the `mesh` gateway.
### Istio Mutual TLS
## Istio Mutual TLS
**How can I enable mTLS for a canary?**
#### How can I enable mTLS for a canary?
When deploying Istio with global mTLS enabled, you have to set the TLS mode to `ISTIO_MUTUAL`:
@@ -619,7 +872,7 @@ spec:
mode: ISTIO_MUTUAL
```
If you run Istio in permissive mode you can disable TLS:
If you run Istio in permissive mode, you can disable TLS:
```yaml
apiVersion: flagger.app/v1beta1
@@ -631,12 +884,13 @@ spec:
mode: DISABLE
```
**If Flagger is outside of the mesh, how can it start the load test?**
#### If Flagger is outside of the mesh, how can it start the load test?
In order for Flagger to be able to call the load tester service from outside the mesh, you need to disable mTLS on port 80:
In order for Flagger to be able to call the load tester service from outside the mesh,
you need to disable mTLS:
```yaml
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: flagger-loadtester
@@ -647,14 +901,54 @@ spec:
tls:
mode: DISABLE
---
apiVersion: authentication.istio.io/v1alpha1
kind: Policy
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
name: flagger-loadtester
namespace: test
spec:
targets:
- name: flagger-loadtester
ports:
- number: 80
selector:
matchLabels:
app: flagger-loadtester
mtls:
mode: DISABLE
```
## ExternalDNS
### Can I use annotations?
Flagger propagates annotations (and labels) to all the generated apex,
primary and canary objects. This allows using external-dns annotations.
You can configure Flagger to set annotations with:
```yaml
spec:
service:
apex:
annotations:
external-dns.alpha.kubernetes.io/hostname: "mydomain.com"
primary:
annotations:
external-dns.alpha.kubernetes.io/hostname: "primary.mydomain.com"
canary:
annotations:
external-dns.alpha.kubernetes.io/hostname: "canary.mydomain.com"
```
### Multiple sources and Istio
**/!\\** The apex annotations are added to both the generated Kubernetes Services and the generated Istio
VirtualServices objects. If you have configured external-dns to use both sources,
this will create conflicts!
```yaml
spec:
containers:
args:
- --source=service # choose only one
- --source=istio-virtualservice # of these two
```
[Checkout ExternalDNS documentation](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/istio.md)

View File

@@ -0,0 +1,57 @@
# Flagger Install on Alibaba ServiceMesh
This guide walks you through setting up Flagger on Alibaba ServiceMesh.
## Prerequisites
- Created an ACK([Alibabacloud Container Service for Kubernetes](https://cs.console.aliyun.com)) cluster instance.
- Create an ASM([Alibaba ServiceMesh](https://servicemesh.console.aliyun.com)) enterprise instance and add ACK cluster.
### Variables declaration
- `$ACK_CONFIG`: the kubeconfig file path of ACK, which be treated as`$HOME/.kube/config` in the rest of guide.
- `$MESH_CONFIG`: the kubeconfig file path of ASM.
### Enable Data-plane KubeAPI access in ASM
In the Alibaba Cloud Service Mesh (ASM) console, on the basic information page, make sure Data-plane KubeAPI access is enabled. When enabled, the Istio resources of the control plane can be managed through the Kubeconfig of the data plane cluster.
## Enable Prometheus
In the Alibaba Cloud Service Mesh (ASM) console, click Settings to enable the collection of Prometheus monitoring metrics. You can use the self-built Prometheus monitoring, or you can use the Alibaba Cloud ARMS Prometheus monitoring plug-in that has joined the ACK cluster, and use ARMS Prometheus to collect monitoring indicators.
## Install Flagger
Add Flagger Helm repository:
```bash
helm repo add flagger https://flagger.app
```
Install Flagger's Canary CRD:
```bash
kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/v1.21.0/artifacts/flagger/crd.yaml
```
## Deploy Flagger for Istio
### Add data plane cluster to Alibaba Cloud Service Mesh (ASM)
In the Alibaba Cloud Service Mesh (ASM) console, click Cluster & Workload Management, select the Kubernetes cluster, select the target ACK cluster, and add it to ASM.
### Prometheus address
If you are using Alibaba Cloud Container Service for Kubernetes (ACK) ARMS Prometheus monitoring, replace {Region-ID} in the link below with your region ID, such as cn-hangzhou. {ACKID} is the ACK ID of the data plane cluster that you added to Alibaba Cloud Service Mesh (ASM). Visit the following links to query the public and intranet addresses monitored by ACK's ARMS Prometheus:
[https://arms.console.aliyun.com/#/promDetail/{Region-ID}/{ACK-ID}/setting](https://arms.console.aliyun.com/)
An example of an intranet address is as follows:
[http://{Region-ID}-intranet.arms.aliyuncs.com:9090/api/v1/prometheus/{Prometheus-ID}/{u-id}/{ACK-ID}/{Region-ID}](https://arms.console.aliyun.com/)
## Deploy Flagger
Replace the value of metricsServer with your Prometheus address.
```bash
helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set crd.create=false \
--set meshProvider=istio \
--set metricsServer=http://prometheus:9090
```

View File

@@ -62,7 +62,7 @@ helm repo add eks https://aws.github.io/eks-charts
## Enable horizontal pod auto-scaling
Install the Horizontal Pod Autoscaler \(HPA\) metrics provider:
Install the Horizontal Pod Autoscaler (HPA) metrics provider:
```bash
helm upgrade -i metrics-server stable/metrics-server \
@@ -118,7 +118,7 @@ helm repo add flagger https://flagger.app
Install Flagger's Canary CRD:
```yaml
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/main/artifacts/flagger/crd.yaml
```
Deploy Flagger in the _**appmesh-system**_ namespace:
@@ -146,6 +146,6 @@ You can access Grafana using port forwarding:
kubectl -n appmesh-system port-forward svc/appmesh-grafana 3000:3000
```
Now that you have Flagger running,
you can try the [App Mesh canary deployments tutorial](https://docs.flagger.app/usage/appmesh-progressive-delivery).
Now that you have Flagger running, you can try the
[App Mesh canary deployments tutorial](https://docs.flagger.app/usage/appmesh-progressive-delivery).

View File

@@ -2,7 +2,7 @@
This guide walks you through setting up Flagger and Istio on Google Kubernetes Engine.
![GKE Cluster Overview](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-gke-istio.png)
![GKE Cluster Overview](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-gke-istio.png)
## Prerequisites
@@ -205,12 +205,12 @@ jetstack/cert-manager
## Istio Gateway TLS setup
![Istio Let&apos;s Encrypt](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/istio-cert-manager-gke.png)
![Istio Let&apos;s Encrypt](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/istio-cert-manager-gke.png)
Create a generic Istio Gateway to expose services outside the mesh on HTTPS:
```bash
REPO=https://raw.githubusercontent.com/weaveworks/flagger/master
REPO=https://raw.githubusercontent.com/fluxcd/flagger/main
kubectl apply -f ${REPO}/artifacts/gke/istio-gateway.yaml
```
@@ -346,7 +346,7 @@ helm repo add flagger https://flagger.app
Install Flagger's Canary CRD:
```yaml
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/main/artifacts/flagger/crd.yaml
```
Deploy Flagger in the `istio-system` namespace with Slack notifications enabled:

View File

@@ -4,7 +4,7 @@ This guide walks you through setting up Flagger on a Kubernetes cluster with Hel
## Prerequisites
Flagger requires a Kubernetes cluster **v1.14** or newer.
Flagger requires a Kubernetes cluster **v1.16** or newer.
## Install Flagger with Helm
@@ -17,7 +17,7 @@ helm repo add flagger https://flagger.app
Install Flagger's Canary CRD:
```yaml
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
kubectl apply -f https://raw.githubusercontent.com/fluxcd/flagger/main/artifacts/flagger/crd.yaml
```
Deploy Flagger for Istio:
@@ -30,11 +30,12 @@ helm upgrade -i flagger flagger/flagger \
--set metricsServer=http://prometheus:9090
```
Note that Flagger depends on Istio telemetry and Prometheus, if you're installing Istio with istioctl
then you should be using the [default profile](https://istio.io/docs/setup/additional-setup/config-profiles/).
Note that Flagger depends on Istio telemetry and Prometheus, if you're installing
Istio with istioctl then you should be using the
[default profile](https://istio.io/docs/setup/additional-setup/config-profiles/).
For Istio multi-cluster shared control plane you can install Flagger
on each remote cluster and set the Istio control plane host cluster kubeconfig:
For Istio multi-cluster shared control plane you can install Flagger on each remote cluster and set the
Istio control plane host cluster kubeconfig:
```bash
helm upgrade -i flagger flagger/flagger \
@@ -42,13 +43,13 @@ helm upgrade -i flagger flagger/flagger \
--set crd.create=false \
--set meshProvider=istio \
--set metricsServer=http://istio-cluster-prometheus:9090 \
--set istio.kubeconfig.secretName=istio-kubeconfig \
--set istio.kubeconfig.key=kubeconfig
--set controlplane.kubeconfig.secretName=istio-kubeconfig \
--set controlplane.kubeconfig.key=kubeconfig
```
Note that the Istio kubeconfig must be stored in a Kubernetes secret with a data key named `kubeconfig`.
For more details on how to configure Istio multi-cluster credentials
read the [Istio docs](https://istio.io/docs/setup/install/multicluster/shared-vpn/#credentials).
For more details on how to configure Istio multi-cluster
credentials read the [Istio docs](https://istio.io/docs/setup/install/multicluster/shared-vpn/#credentials).
Deploy Flagger for Linkerd:
@@ -70,6 +71,16 @@ helm upgrade -i flagger flagger/flagger \
--set metricsServer=http://appmesh-prometheus:9090
```
Deploy 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 crd.create=false \
--set meshProvider=osm \
--set metricsServer=http://osm-prometheus.osm-system.svc:7070
```
You can install Flagger in any namespace as long as it can talk to the Prometheus service on port 9090.
For ingress controllers, the install instructions are:
@@ -78,26 +89,7 @@ For ingress controllers, the install instructions are:
* [Gloo](https://docs.flagger.app/tutorials/gloo-progressive-delivery)
* [NGINX](https://docs.flagger.app/tutorials/nginx-progressive-delivery)
* [Skipper](https://docs.flagger.app/tutorials/skipper-progressive-delivery)
Enable **Slack** notifications:
```bash
helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set crd.create=false \
--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--set slack.channel=general \
--set slack.user=flagger
```
Enable **Microsoft Teams** notifications:
```bash
helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set crd.create=false \
--set msteams.url=https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK
```
* [Traefik](https://docs.flagger.app/tutorials/traefik-progressive-delivery)
You can use the helm template command and apply the generated yaml with kubectl:
@@ -122,7 +114,7 @@ helm delete flagger
The command removes all the Kubernetes components associated with the chart and deletes the release.
> **Note** that on uninstall the Canary CRD will not be removed. Deleting the CRD will make Kubernetes
>remove all the objects owned by Flagger like Istio virtual services, Kubernetes deployments and ClusterIP services.
> remove all the objects owned by Flagger like Istio virtual services, Kubernetes deployments and ClusterIP services.
If you want to remove all the objects created by Flagger you have delete the Canary CRD with kubectl:
@@ -172,13 +164,13 @@ As an alternative to Helm, Flagger can be installed with Kustomize **3.5.0** or
Install Flagger for Istio:
```bash
kustomize build https://github.com/weaveworks/flagger/kustomize/istio | kubectl apply -f -
kustomize build https://github.com/fluxcd/flagger/kustomize/istio?ref=main | kubectl apply -f -
```
Install Flagger for AWS App Mesh:
```bash
kustomize build https://github.com/weaveworks/flagger/kustomize/appmesh | kubectl apply -f -
kustomize build https://github.com/fluxcd/flagger/kustomize/appmesh?ref=main | kubectl apply -f -
```
This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus instance.
@@ -186,27 +178,35 @@ This deploys Flagger and sets the metrics server URL to App Mesh's Prometheus in
Install Flagger for Linkerd:
```bash
kustomize build https://github.com/weaveworks/flagger/kustomize/linkerd | kubectl apply -f -
kustomize build https://github.com/fluxcd/flagger/kustomize/linkerd?ref=main | kubectl apply -f -
```
This deploys Flagger in the `linkerd` namespace and sets the metrics server URL to Linkerd's Prometheus instance.
Install Flagger for Open Service Mesh:
```bash
kustomize build https://github.com/fluxcd/flagger/kustomize/osm?ref=main | kubectl apply -f -
```
This deploys Flagger in the `osm-system` namespace and sets the metrics server URL to OSM's Prometheus instance.
If you want to install a specific Flagger release, add the version number to the URL:
```bash
kustomize build https://github.com/weaveworks/flagger/kustomize/linkerd?ref=v1.0.0 | kubectl apply -f -
kustomize build https://github.com/fluxcd/flagger/kustomize/linkerd?ref=v1.0.0 | kubectl apply -f -
```
**Generic installer**
Install Flagger and Prometheus for Contour, Gloo, NGINX or Skipper ingress:
Install Flagger and Prometheus for Contour, Gloo, NGINX, Skipper, or Traefik ingress:
```bash
kustomize build https://github.com/weaveworks/flagger/kustomize/kubernetes | kubectl apply -f -
kustomize build https://github.com/fluxcd/flagger/kustomize/kubernetes?ref=main | kubectl apply -f -
```
This deploys Flagger and Prometheus in the `flagger-system` namespace, sets the metrics server URL
to `http://flagger-prometheus.flagger-system:9090` and the mesh provider to `kubernetes`.
This deploys Flagger and Prometheus in the `flagger-system` namespace,
sets the metrics server URL to `http://flagger-prometheus.flagger-system:9090` and the mesh provider to `kubernetes`.
The Prometheus instance has a two hours data retention and is configured to scrape all pods in your cluster
that have the `prometheus.io/scrape: "true"` annotation.
@@ -220,7 +220,7 @@ metadata:
name: app
namespace: test
spec:
# can be: kubernetes, istio, linkerd, appmesh, nginx, skipper, gloo
# can be: kubernetes, istio, linkerd, appmesh, nginx, skipper, gloo, traefik, osm
# use the kubernetes provider for Blue/Green style deployments
provider: nginx
```
@@ -233,7 +233,7 @@ Create a kustomization file using Flagger as base and patch the container args:
cat > kustomization.yaml <<EOF
namespace: istio-system
bases:
- github.com/weaveworks/flagger/kustomize/base/flagger
- https://github.com/fluxcd/flagger/kustomize/kubernetes?ref=main
patches:
- target:
kind: Deployment
@@ -251,19 +251,6 @@ patches:
args:
- -mesh-provider=istio
- -metrics-server=http://prometheus.istio-system:9090
- -slack-user=flagger
- -slack-channel=alerts
- -slack-url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
- -include-label-prefix=app.kubernetes.io
EOF
```
Install Flagger for Istio with Slack notifications:
```bash
kustomize build . | kubectl apply -f -
```
If you want to use MS Teams instead of Slack, replace `-slack-url` with `-msteams-url` and set the webhook address
to `https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK`.

View File

@@ -0,0 +1,158 @@
# Flagger Install on Kubernetes with Flux
This guide walks you through setting up Flagger on a Kubernetes cluster the GitOps way.
You'll configure Flux to scan the Flagger OCI artifacts and deploy the
latest stable version on Kubernetes.
## Flagger OCI artifacts
Flagger OCI artifacts (container images, Helm charts, Kustomize overlays) are published to
GitHub Container Registry, and they are signed with Cosign at every release.
OCI artifacts
- `ghcr.io/fluxcd/flagger:<version>` multi-arch container images
- `ghcr.io/fluxcd/flagger-manifest:<version>` Kubernetes manifests
- `ghcr.io/fluxcd/charts/flagger:<version>` Helm charts
## Prerequisites
To follow this guide youll need a Kubernetes cluster with Flux installed on it.
Please see the Flux [get started guide](https://fluxcd.io/flux/get-started/)
or the Flux [installation guide](https://fluxcd.io/flux/installation/).
## Deploy Flagger with Flux
First define the namespace where Flagger will be installed:
```yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: flagger-system
labels:
toolkit.fluxcd.io/tenant: sre-team
```
Define a Flux `HelmRepository` that points to where the Flagger Helm charts are stored:
```yaml
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: flagger
namespace: flux-system
spec:
interval: 1h
url: oci://ghcr.io/fluxcd/charts
type: oci
```
Define a Flux `HelmRelease` that verifies and installs Flagger's latest version on the cluster:
```yaml
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: flagger
namespace: flagger-system
spec:
interval: 1h
releaseName: flagger
install: # override existing Flagger CRDs
crds: CreateReplace
upgrade: # update Flagger CRDs
crds: CreateReplace
chart:
spec:
chart: flagger
version: 1.x # update Flagger to the latest minor version
interval: 6h # scan for new versions every six hours
sourceRef:
kind: HelmRepository
name: flagger
verify: # verify the chart signature with Cosign keyless
provider: cosign
values:
nodeSelector:
kubernetes.io/os: linux
```
Copy the above manifests into a file called `flagger.yaml`, place the YAML file
in the Git repository bootstrapped with Flux, then commit and push it to upstream.
After Flux reconciles the changes on your cluster, you can check if Flagger got deployed with:
```console
$ helm list -n flagger-system
NAME NAMESPACE REVISION STATUS CHART APP VERSION
flagger flagger-system 1 deployed flagger-1.23.0 1.23.0
```
To uninstall Flagger, delete the `flagger.yaml` from your repository, then Flux will uninstall
the Helm release and will remove the namespace from your cluster.
## Deploy Flagger load tester with Flux
Flagger comes with a load testing service that generates traffic during analysis when configured as a webhook.
The load tester container images and deployment manifests are published to GitHub Container Registry.
The container images and the manifests are signed with Cosign and GitHub Actions OIDC.
Assuming the applications managed by Flagger are in the `apps` namespace, you can configure Flux to
deploy the load tester there.
Define a Flux `OCIRepository` that points to where the Flagger Kustomize overlays are stored:
```yaml
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: flagger-loadtester
namespace: apps
spec:
interval: 6h # scan for new versions every six hours
url: oci://ghcr.io/fluxcd/flagger-manifests
ref:
semver: 1.x # update to the latest version
verify: # verify the artifact signature with Cosign keyless
provider: cosign
```
Define a Flux `Kustomization` that deploys the Flagger load tester to the `apps` namespace:
```yaml
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: flagger-loadtester
namespace: apps
spec:
interval: 6h
wait: true
timeout: 5m
prune: true
sourceRef:
kind: OCIRepository
name: flagger-loadtester
path: ./kustomize/tester
targetNamespace: apps
```
Copy the above manifests into a file called `flagger-loadtester.yaml`, place the YAML file
in the Git repository bootstrapped with Flux, then commit and push it to upstream.
After Flux reconciles the changes on your cluster, you can check if the load tester got deployed with:
```console
$ flux -n apps get kustomization flagger-loadtester
NAME READY MESSAGE
flagger-loadtester True Applied revision: v1.23.0/a80af71e001
```
To uninstall the load tester, delete the `flagger-loadtester.yaml` from your repository,
and Flux will delete the load tester deployment from the cluster.

View File

@@ -1,188 +0,0 @@
# Flagger Install with SuperGloo
This guide walks you through setting up Flagger on a Kubernetes cluster using [SuperGloo](https://github.com/solo-io/supergloo).
SuperGloo by [Solo.io](https://solo.io) is an opinionated abstraction layer that simplifies the installation, management, and operation of your service mesh. It supports running multiple ingresses with multiple meshes \(Istio, App Mesh, Consul Connect and Linkerd 2\) in the same cluster.
## Prerequisites
Flagger requires a Kubernetes cluster **v1.11** or newer with the following admission controllers enabled:
* MutatingAdmissionWebhook
* ValidatingAdmissionWebhook
## Install Istio with SuperGloo
### Install SuperGloo command line interface helper
SuperGloo includes a command line helper \(CLI\) that makes operation of SuperGloo easier. The CLI is not required for SuperGloo to function correctly.
If you use [Homebrew](https://brew.sh) package manager run the following commands to install the SuperGloo CLI.
```bash
brew tap solo-io/tap
brew solo-io/tap/supergloo
```
Or you can download SuperGloo CLI and add it to your path:
```bash
curl -sL https://run.solo.io/supergloo/install | sh
export PATH=$HOME/.supergloo/bin:$PATH
```
### Install SuperGloo controller
Deploy the SuperGloo controller in the `supergloo-system` namespace:
```bash
supergloo init
```
This is equivalent to installing SuperGloo using its Helm chart
```bash
helm repo add supergloo http://storage.googleapis.com/supergloo-helm
helm upgrade --install supergloo supergloo/supergloo --namespace supergloo-system
```
### Install Istio using SuperGloo
Create the `istio-system` namespace and install Istio with traffic management, telemetry and Prometheus enabled:
```bash
ISTIO_VER="1.0.6"
kubectl create namespace istio-system
supergloo install istio --name istio \
--namespace=supergloo-system \
--auto-inject=true \
--installation-namespace=istio-system \
--mtls=false \
--prometheus=true \
--version=${ISTIO_VER}
```
This creates a Kubernetes Custom Resource \(CRD\) like the following.
```yaml
apiVersion: supergloo.solo.io/v1
kind: Install
metadata:
name: istio
namespace: supergloo-system
spec:
installationNamespace: istio-system
mesh:
installedMesh:
name: istio
namespace: supergloo-system
istioMesh:
enableAutoInject: true
enableMtls: false
installGrafana: false
installJaeger: false
installPrometheus: true
istioVersion: 1.0.6
```
### Allow Flagger to manipulate SuperGloo
Create a cluster role binding so that Flagger can manipulate SuperGloo custom resources:
```bash
kubectl create clusterrolebinding flagger-supergloo \
--clusterrole=mesh-discovery \
--serviceaccount=istio-system:flagger
```
Wait for the Istio control plane to become available:
```bash
kubectl --namespace istio-system rollout status deployment/istio-sidecar-injector
kubectl --namespace istio-system rollout status deployment/prometheus
```
## Install Flagger
Add Flagger Helm repository:
```bash
helm repo add flagger https://flagger.app
```
Install Flagger's Canary CRD:
```yaml
kubectl apply -f https://raw.githubusercontent.com/weaveworks/flagger/master/artifacts/flagger/crd.yaml
```
Deploy Flagger in the _**istio-system**_ namespace and set the service mesh provider to SuperGloo:
```bash
helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set crd.create=false \
--set metricsServer=http://prometheus.istio-system:9090 \
--set meshProvider=supergloo:istio.supergloo-system
```
When using SuperGloo the mesh provider format is `supergloo:<MESH-NAME>.<SUPERGLOO-NAMESPACE>`.
Optionally you can enable **Slack** notifications:
```bash
helm upgrade -i flagger flagger/flagger \
--reuse-values \
--namespace=istio-system \
--set slack.url=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \
--set slack.channel=general \
--set slack.user=flagger
```
## Install Grafana
Flagger comes with a Grafana dashboard made for monitoring the canary analysis.
Deploy Grafana in the _**istio-system**_ namespace:
```bash
helm upgrade -i flagger-grafana flagger/grafana \
--namespace=istio-system \
--set url=http://prometheus.istio-system:9090
```
You can access Grafana using port forwarding:
```bash
kubectl -n istio-system port-forward svc/flagger-grafana 3000:80
```
## Install Load Tester
Flagger comes with an optional load testing service that generates traffic during canary analysis when configured as a webhook.
Deploy the load test runner with Helm:
```bash
helm upgrade -i flagger-loadtester flagger/loadtester \
--namespace=test \
--set cmd.timeout=1h
```
Deploy with kubectl:
```bash
helm fetch --untar --untardir . flagger/loadtester &&
helm template loadtester \
--name flagger-loadtester \
--namespace=test
> $HOME/flagger-loadtester.yaml
# apply
kubectl apply -f $HOME/flagger-loadtester.yaml
```
> **Note** that the load tester should be deployed in a namespace with Istio sidecar injection enabled.

View File

@@ -1,13 +1,14 @@
# App Mesh Canary Deployments
This guide shows you how to use App Mesh and Flagger to automate canary deployments.
You'll need an EKS cluster configured with App Mesh,
you can find the installion guide [here](https://docs.flagger.app/install/flagger-install-on-eks-appmesh).
You'll need an EKS cluster (Kubernetes >= 1.16) configured with App Mesh,
you can find the installation guide [here](https://docs.flagger.app/install/flagger-install-on-eks-appmesh).
## Bootstrap
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler \(HPA\),
then creates a series of objects \(Kubernetes deployments, ClusterIP services, App Mesh virtual nodes and services\).
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler (HPA),
then creates a series of objects (Kubernetes deployments, ClusterIP services,
App Mesh virtual nodes and services).
These objects expose the application on the mesh and drive the canary analysis and promotion.
The only App Mesh object you need to create by yourself is the mesh resource.
@@ -42,7 +43,7 @@ EOF
Create a deployment and a horizontal pod autoscaler:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main
```
Deploy the load testing service to generate traffic during the canary analysis:
@@ -61,6 +62,9 @@ Create a canary definition:
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
annotations:
# Enable Envoy access logging to stdout.
appmesh.flagger.app/accesslog: enabled
name: podinfo
namespace: test
spec:
@@ -76,7 +80,7 @@ spec:
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: podinfo
service:
@@ -167,20 +171,20 @@ virtualservice.appmesh.k8s.aws/podinfo
virtualservice.appmesh.k8s.aws/podinfo-canary
```
After the boostrap, the podinfo deployment will be scaled to zero and the traffic to
`podinfo.test` will be routed to the primary pods.
After the bootstrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test`
will be routed to the primary pods.
During the canary analysis, the `podinfo-canary.test` address can be used to target directly the canary pods.
App Mesh blocks all egress traffic by default.
If your application needs to call another service, you have to
create an App Mesh virtual service for it and add the virtual service name to the backend list.
If your application needs to call another service, you have to create an App Mesh virtual service for it
and add the virtual service name to the backend list.
```yaml
service:
port: 9898
backends:
- backend1
- backend2
- arn:aws:appmesh:eu-west-1:12345678910:mesh/my-mesh/virtualService/backend2
```
## Setup App Mesh Gateway (optional)
@@ -234,14 +238,14 @@ Open your browser and navigate to the ingress address to access podinfo UI.
A canary deployment is triggered by changes in any of the following objects:
* Deployment PodSpec \(container image, command, ports, env, resources, etc\)
* Deployment PodSpec (container image, command, ports, env, resources, etc)
* ConfigMaps and Secrets mounted as volumes or mapped to environment variables
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.1
podinfod=ghcr.io/stefanprodan/podinfo:6.0.1
```
Flagger detects that the deployment revision changed and starts a new rollout:
@@ -281,7 +285,7 @@ During the analysis the canarys progress can be monitored with Grafana.
The App Mesh dashboard URL is
[http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo](http://localhost:3000/d/flagger-appmesh/appmesh-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo).
![App Mesh Canary Dashboard](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/flagger-grafana-appmesh.png)
![App Mesh Canary Dashboard](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/flagger-grafana-appmesh.png)
You can monitor all canaries with:
@@ -296,7 +300,7 @@ prod backend Failed 0
If youve enabled the Slack notifications, you should receive the following messages:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-notifications.png)
![Flagger Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-notifications.png)
## Automated rollback
@@ -306,7 +310,7 @@ Trigger a canary deployment:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.2
podinfod=ghcr.io/stefanprodan/podinfo:6.0.2
```
Exec into the load tester pod with:
@@ -350,7 +354,7 @@ Canary failed! Scaling down podinfo.test
If youve enabled the Slack notifications, youll receive a message if the progress deadline is exceeded,
or if the analysis reached the maximum number of failed checks:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-failed.png)
![Flagger Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-failed.png)
## A/B Testing
@@ -358,7 +362,7 @@ Besides weighted routing, Flagger can be configured to route traffic to the cana
In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users.
This is particularly useful for frontend applications that require session affinity.
![Flagger A/B Testing Stages](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-abtest-steps.png)
![Flagger A/B Testing Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-abtest-steps.png)
Edit the canary analysis, remove the max/step weight and add the match conditions and iterations:
@@ -398,7 +402,7 @@ Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.3
podinfod=ghcr.io/stefanprodan/podinfo:6.0.3
```
Flagger detects that the deployment revision changed and starts the A/B test:
@@ -423,4 +427,8 @@ Routing all traffic to primary
Promotion completed! Scaling down podinfo.test
```
For an in-depth look at the analysis process read the [usage docs](../usage/how-it-works.md).
The above procedure can be extended with
[custom metrics](../usage/metrics.md) checks,
[webhooks](../usage/webhooks.md),
[manual promotion](../usage/webhooks.md#manual-gating) approval and
[Slack or MS Teams](../usage/alerting.md) notifications.

View File

@@ -30,7 +30,7 @@ You can find the chart source [here](https://github.com/stefanprodan/flagger/tre
Create a test namespace with Istio sidecar injection enabled:
```bash
export REPO=https://raw.githubusercontent.com/weaveworks/flagger/master
export REPO=https://raw.githubusercontent.com/fluxcd/flagger/main
kubectl apply -f ${REPO}/artifacts/namespaces/test.yaml
```
@@ -77,7 +77,7 @@ When the `frontend-primary` deployment comes online, Flagger will route all traf
Open your browser and navigate to the frontend URL:
![Podinfo Frontend](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/demo-frontend.png)
![Podinfo Frontend](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/demo-frontend.png)
Now let's install the `backend` release without exposing it outside the mesh:
@@ -101,7 +101,7 @@ frontend Initialized 0 2019-02-12T17:50:50Z
Click on the ping button in the `frontend` UI to trigger a HTTP POST request that will reach the `backend` app:
![Jaeger Tracing](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/demo-frontend-jaeger.png)
![Jaeger Tracing](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/demo-frontend-jaeger.png)
We'll use the `/echo` endpoint \(same as the one the ping button calls\) to generate load on both apps during a canary deployment.
@@ -159,7 +159,7 @@ Promotion completed! Scaling down frontend.test
You can monitor the canary deployment with Grafana. Open the Flagger dashboard, select `test` from the namespace dropdown, `frontend-primary` from the primary dropdown and `frontend` from the canary dropdown.
![Flagger Grafana Dashboard](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/demo-frontend-dashboard.png)
![Flagger Grafana Dashboard](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/demo-frontend-dashboard.png)
Now trigger a canary deployment for the `backend` app, but this time you'll change a value in the configmap:
@@ -217,7 +217,7 @@ Copying backend.test template spec to backend-primary.test
Promotion completed! Scaling down backend.test
```
![Flagger Grafana Dashboard](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/demo-backend-dashboard.png)
![Flagger Grafana Dashboard](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/demo-backend-dashboard.png)
If the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, the canary is scaled to zero and the rollout is marked as failed.
@@ -235,7 +235,7 @@ If you've enabled the Slack notifications, you'll receive an alert with the reas
Instead of using Helm CLI from a CI tool to perform the install and upgrade, you could use a Git based approach. GitOps is a way to do Continuous Delivery, it works by using Git as a source of truth for declarative infrastructure and workloads. In the [GitOps model](https://www.weave.works/technologies/gitops/), any change to production must be committed in source control prior to being applied on the cluster. This way rollback and audit logs are provided by Git.
![Helm GitOps Canary Deployment](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-flux-gitops.png)
![Helm GitOps Canary Deployment](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-flux-gitops.png)
In order to apply the GitOps pipeline model to Flagger canary deployments you'll need a Git repository with your workloads definitions in YAML format, a container registry where your CI system pushes immutable images and an operator that synchronizes the Git repo with the cluster state.
@@ -286,15 +286,11 @@ spec:
enabled: true
```
In the `chart` section I've defined the release source by specifying the Helm repository (hosted on GitHub Pages),
chart name and version. In the `values` section I've overwritten the defaults set in values.yaml.
In the `chart` section I've defined the release source by specifying the Helm repository \(hosted on GitHub Pages\), chart name and version. In the `values` section I've overwritten the defaults set in values.yaml.
With the `fluxcd.io` annotations I instruct Flux to automate this release.
When an image tag in the sem ver range of `3.1.0 - 3.1.99` is pushed to Docker Hub,
Flux will upgrade the Helm release and from there Flagger will pick up the change and start a canary deployment.
With the `fluxcd.io` annotations I instruct Flux to automate this release. When an image tag in the sem ver range of `3.1.0 - 3.1.99` is pushed to Docker Hub, Flux will upgrade the Helm release and from there Flagger will pick up the change and start a canary deployment.
Install [Flux](https://github.com/fluxcd/flux) and its
[Helm Operator](https://github.com/fluxcd/helm-operator) by specifying your Git repo URL:
Install [Flux](https://github.com/fluxcd/flux) and its [Helm Operator](https://github.com/fluxcd/helm-operator) by specifying your Git repo URL:
```bash
helm repo add fluxcd https://charts.fluxcd.io
@@ -315,19 +311,16 @@ At startup Flux generates a SSH key and logs the public key. Find the SSH public
kubectl -n fluxcd logs deployment/flux | grep identity.pub | cut -d '"' -f2
```
In order to sync your cluster state with Git you need to copy the public key
and create a deploy key with write access on your GitHub repository.
In order to sync your cluster state with Git you need to copy the public key and create a deploy key with write access on your GitHub repository.
Open GitHub, navigate to your fork, go to _Setting &gt; Deploy keys_ click on _Add deploy key_, check _Allow write access_,
paste the Flux public key and click _Add key_.
Open GitHub, navigate to your fork, go to _Setting &gt; Deploy keys_ click on _Add deploy key_, check _Allow write access_, paste the Flux public key and click _Add key_.
After a couple of seconds Flux will apply the Kubernetes resources from Git and
Flagger will launch the `frontend` and `backend` apps.
After a couple of seconds Flux will apply the Kubernetes resources from Git and Flagger will launch the `frontend` and `backend` apps.
A CI/CD pipeline for the `frontend` release could look like this:
* cut a release from the master branch of the podinfo code repo with the git tag `3.1.1`
* CI builds the image and pushes the `podinfo:3.1.1` image to the container registry
* CI builds the image and pushes the `podinfo:6.0.1` image to the container registry
* Flux scans the registry and updates the Helm release `image.tag` to `3.1.1`
* Flux commits and push the change to the cluster repo
* Flux applies the updated Helm release on the cluster
@@ -343,14 +336,12 @@ If the canary fails, fix the bug, do another patch release eg `3.1.2` and the wh
A canary deployment can fail due to any of the following reasons:
* the container image can't be downloaded
* the deployment replica set is stuck for more then ten minutes (eg. due to a container crash loop)
* the webooks (acceptance tests, helm tests, load tests, etc) are returning a non 2xx response
* the HTTP success rate (non 5xx responses) metric drops under the threshold
* the deployment replica set is stuck for more then ten minutes \(eg. due to a container crash loop\)
* the webhooks \(acceptance tests, helm tests, load tests, etc\) are returning a non 2xx response
* the HTTP success rate \(non 5xx responses\) metric drops under the threshold
* the HTTP average duration metric goes over the threshold
* the Istio telemetry service is unable to collect traffic metrics
* the metrics server (Prometheus) can't be reached
* the metrics server \(Prometheus\) can't be reached
If you want to find out more about managing Helm releases with Flux here are two in-depth guides:
[gitops-helm](https://github.com/stefanprodan/gitops-helm)
and [gitops-istio](https://github.com/stefanprodan/gitops-istio).
If you want to find out more about managing Helm releases with Flux here are two in-depth guides: [gitops-helm](https://github.com/stefanprodan/gitops-helm) and [gitops-istio](https://github.com/stefanprodan/gitops-istio).

View File

@@ -2,11 +2,11 @@
This guide shows you how to use [Contour](https://projectcontour.io/) ingress controller and Flagger to automate canary releases and A/B testing.
![Flagger Contour Overview](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-contour-overview.png)
![Flagger Contour Overview](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-contour-overview.png)
## Prerequisites
Flagger requires a Kubernetes cluster **v1.11** or newer and Contour **v1.0** or newer.
Flagger requires a Kubernetes cluster **v1.16** or newer and Contour **v1.0** or newer.
Install Contour on a cluster with LoadBalancer support:
@@ -19,7 +19,7 @@ The above command will deploy Contour and an Envoy daemonset in the `projectcont
Install Flagger using Kustomize (kubectl 1.14) in the `projectcontour` namespace:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/contour
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/contour?ref=main
```
The above command will deploy Flagger and Prometheus configured to scrape the Contour's Envoy instances.
@@ -36,14 +36,11 @@ helm upgrade -i flagger flagger/flagger \
--set prometheus.install=true
```
You can also enable Slack, Discord, Rocket or MS Teams notifications,
see the alerting [docs](../usage/alerting.md).
You can also enable Slack, Discord, Rocket or MS Teams notifications, see the alerting [docs](../usage/alerting.md).
## Bootstrap
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler (HPA),
then creates a series of objects (Kubernetes deployments, ClusterIP services and Contour HTTPProxy).
These objects expose the application in the cluster and drive the canary analysis and promotion.
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler \(HPA\), then creates a series of objects \(Kubernetes deployments, ClusterIP services and Contour HTTPProxy\). These objects expose the application in the cluster and drive the canary analysis and promotion.
Create a test namespace:
@@ -54,16 +51,16 @@ kubectl create ns test
Install the load testing service to generate traffic during the canary analysis:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/tester
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main
```
Create a deployment and a horizontal pod autoscaler:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main
```
Create a canary custom resource (replace `app.example.com` with your own domain):
Create a canary custom resource \(replace `app.example.com` with your own domain\):
```yaml
apiVersion: flagger.app/v1beta1
@@ -79,7 +76,7 @@ spec:
name: podinfo
# HPA reference
autoscalerRef:
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: podinfo
service:
@@ -93,6 +90,8 @@ spec:
retries:
attempts: 3
perTryTimeout: 5s
# supported values for retryOn - https://projectcontour.io/docs/main/config/api/#projectcontour.io/v1.RetryOn
retryOn: "5xx"
# define the canary analysis timing and KPIs
analysis:
# schedule interval (default 60s)
@@ -160,9 +159,7 @@ service/podinfo-primary
httpproxy.projectcontour.io/podinfo
```
After the boostrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test`
will be routed to the primary pods.
During the canary analysis, the `podinfo-canary.test` address can be used to target directly the canary pods.
After the bootstrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test` will be routed to the primary pods. During the canary analysis, the `podinfo-canary.test` address can be used to target directly the canary pods.
## Expose the app outside the cluster
@@ -174,11 +171,9 @@ export ADDRESS="$(kubectl -n projectcontour get svc/envoy -ojson \
echo $ADDRESS
```
Configure your DNS server with a CNAME record \(AWS\) or A record (GKE/AKS/DOKS)
and point a domain e.g. `app.example.com` to the LB address.
Configure your DNS server with a CNAME record \(AWS\) or A record \(GKE/AKS/DOKS\) and point a domain e.g. `app.example.com` to the LB address.
Create a HTTPProxy definition and include the podinfo proxy generated by Flagger
(replace `app.example.com` with your own domain):
Create a HTTPProxy definition and include the podinfo proxy generated by Flagger \(replace `app.example.com` with your own domain\):
```yaml
apiVersion: projectcontour.io/v1
@@ -214,28 +209,24 @@ podinfo-ingress app.example.com valid
Now you can access podinfo UI using your domain address.
Note that you should be using HTTPS when exposing production workloads on internet.
You can obtain free TLS certs from Let's Encrypt, read this [guide](https://github.com/stefanprodan/eks-contour-ingress)
on how to configure cert-manager to secure Contour with TLS certificates.
Note that you should be using HTTPS when exposing production workloads on internet. You can obtain free TLS certs from Let's Encrypt, read this [guide](https://github.com/stefanprodan/eks-contour-ingress) on how to configure cert-manager to secure Contour with TLS certificates.
## Automated canary promotion
Flagger implements a control loop that gradually shifts traffic to the canary while measuring
key performance indicators like HTTP requests success rate, requests average duration and pod health.
Based on analysis of the KPIs a canary is promoted or aborted.
Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators like HTTP requests success rate, requests average duration and pod health. Based on analysis of the KPIs a canary is promoted or aborted.
![Flagger Canary Stages](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-canary-steps.png)
![Flagger Canary Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-canary-steps.png)
A canary deployment is triggered by changes in any of the following objects:
* Deployment PodSpec (container image, command, ports, env, resources, etc)
* Deployment PodSpec \(container image, command, ports, env, resources, etc\)
* ConfigMaps and Secrets mounted as volumes or mapped to environment variables
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.1
podinfod=ghcr.io/stefanprodan/podinfo:6.0.1
```
Flagger detects that the deployment revision changed and starts a new rollout:
@@ -282,7 +273,7 @@ test podinfo Progressing 15 2019-12-20T14:05:07Z
If youve enabled the Slack notifications, you should receive the following messages:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-notifications.png)
![Flagger Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-notifications.png)
## Automated rollback
@@ -292,7 +283,7 @@ Trigger a canary deployment:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.2
podinfod=ghcr.io/stefanprodan/podinfo:6.0.2
```
Exec into the load tester pod with:
@@ -313,8 +304,7 @@ Generate latency:
watch -n 1 curl http://app.example.com/delay/1
```
When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary,
the canary is scaled to zero and the rollout is marked as failed.
When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, the canary is scaled to zero and the rollout is marked as failed.
```text
kubectl -n projectcontour logs deploy/flagger -f | jq .msg
@@ -333,18 +323,15 @@ Rolling back podinfo.test failed checks threshold reached 5
Canary failed! Scaling down podinfo.test
```
If youve enabled the Slack notifications, youll receive a message if the progress deadline is exceeded,
or if the analysis reached the maximum number of failed checks:
If youve enabled the Slack notifications, youll receive a message if the progress deadline is exceeded, or if the analysis reached the maximum number of failed checks:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-failed.png)
![Flagger Slack Notifications](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/screens/slack-canary-failed.png)
## A/B Testing
Besides weighted routing, Flagger can be configured to route traffic to the canary based on HTTP match conditions.
In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users.
This is particularly useful for frontend applications that require session affinity.
Besides weighted routing, Flagger can be configured to route traffic to the canary based on HTTP match conditions. In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users. This is particularly useful for frontend applications that require session affinity.
![Flagger A/B Testing Stages](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-abtest-steps.png)
![Flagger A/B Testing Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-abtest-steps.png)
Edit the canary analysis, remove the max/step weight and add the match conditions and iterations:
@@ -384,7 +371,7 @@ Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.3
podinfod=ghcr.io/stefanprodan/podinfo:6.0.3
```
Flagger detects that the deployment revision changed and starts the A/B test:
@@ -439,3 +426,4 @@ match:
```
For an in-depth look at the analysis process read the [usage docs](../usage/how-it-works.md).

View File

@@ -1,358 +0,0 @@
# Crossover Canary Deployments
This guide shows you how to use Envoy, [Crossover](https://github.com/mumoshu/crossover) and Flagger to automate canary deployments.
Crossover is a minimal Envoy xDS implementation supports [Service Mesh Interface](https://smi-spec.io/).
## Prerequisites
Flagger requires a Kubernetes cluster **v1.11** or newer and Envoy paired with [Crossover](https://github.com/mumoshu/crossover) sidecar.
Create a test namespace:
```bash
kubectl create ns test
```
Install Envoy along with the Crossover sidecar with Helm:
```bash
helm repo add crossover https://mumoshu.github.io/crossover
helm upgrade --install envoy crossover/envoy \
--namespace test \
-f <(cat <<EOF
smi:
apiVersions:
trafficSplits: v1alpha1
upstreams:
podinfo:
smi:
enabled: true
backends:
podinfo-primary:
port: 9898
weight: 100
podinfo-canary:
port: 9898
weight: 0
EOF
)
```
Install Flagger and the Prometheus add-on in the same namespace as Envoy:
```bash
helm repo add flagger https://flagger.app
helm upgrade -i flagger flagger/flagger \
--namespace test \
--set prometheus.install=true \
--set meshProvider=smi:crossover
```
## Bootstrap
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler (HPA),
then creates a series of objects (Kubernetes deployments, ClusterIP services, SMI traffic splits).
These objects expose the application on the mesh and drive the canary analysis and promotion.
There's no SMI object you need to create by yourself.
Create a deployment and a horizontal pod autoscaler:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo
```
Deploy the load testing service to generate traffic during the canary analysis:
```bash
helm upgrade -i flagger-loadtester flagger/loadtester \
--namespace=test
```
Create a metric template to measure the HTTP requests error rate:
```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: error-rate
namespace: test
spec:
provider:
address: http://flagger-prometheus:9090
type: prometheus
query: |
100 - rate(
envoy_cluster_upstream_rq{
kubernetes_namespace="{{ namespace }}",
envoy_cluster_name="{{ target }}-canary",
envoy_response_code!~"5.*"
}[{{ interval }}])
/
rate(
envoy_cluster_upstream_rq{
kubernetes_namespace="{{ namespace }}",
envoy_cluster_name="{{ target }}-canary"
}[{{ interval }}]
) * 100
```
Create a metric template to measure the HTTP requests average duration:
```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: latency
namespace: test
spec:
provider:
address: http://flagger-prometheus:9090
type: prometheus
query: |
histogram_quantile(0.99,
sum(
rate(
envoy_cluster_upstream_rq_time_bucket{
kubernetes_namespace="{{ namespace }}",
envoy_cluster_name="{{ target }}-canary"
}[{{ interval }}]
)
) by (le)
)
```
Create a canary custom resource:
```yaml
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
provider: "smi:crossover"
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
name: podinfo
service:
port: 9898
# define the canary analysis timing and KPIs
analysis:
# schedule interval (default 60s)
interval: 1m
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 5
metrics:
- name: error-rate
templateRef:
name: error-rate
thresholdRange:
max: 1
interval: 30s
- name: latency
templateRef:
name: latency
thresholdRange:
max: 0.5
interval: 30s
webhooks:
- name: acceptance-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 30s
metadata:
type: bash
cmd: "curl -sd 'test' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 1m -q 10 -c 2 -H 'Host: podinfo.test' http://envoy.test:10000/"
```
Save the above resource as podinfo-canary.yaml and then apply it:
```bash
kubectl apply -f ./podinfo-canary.yaml
```
After a couple of seconds Flagger will create the canary objects:
```bash
# applied
deployment.apps/podinfo
horizontalpodautoscaler.autoscaling/podinfo
canary.flagger.app/podinfo
# generated
deployment.apps/podinfo-primary
horizontalpodautoscaler.autoscaling/podinfo-primary
service/podinfo
service/podinfo-canary
service/podinfo-primary
trafficsplits.split.smi-spec.io/podinfo
```
After the boostrap, the podinfo deployment will be scaled to zero and the traffic to `podinfo.test`
will be routed to the primary pods. During the canary analysis,
the `podinfo-canary.test` address can be used to target directly the canary pods.
## Automated canary promotion
Flagger implements a control loop that gradually shifts traffic to the canary while measuring
key performance indicators like HTTP requests success rate, requests average duration and pod health.
Based on analysis of the KPIs a canary is promoted or aborted, and the analysis result is published to Slack.
![Flagger Canary Stages](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-canary-steps.png)
A canary deployment is triggered by changes in any of the following objects:
* Deployment PodSpec (container image, command, ports, env, resources, etc)
* ConfigMaps and Secrets mounted as volumes or mapped to environment variables
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.5
```
Flagger detects that the deployment revision changed and starts a new rollout:
```text
kubectl -n test describe canary/podinfo
Status:
Canary Weight: 0
Failed Checks: 0
Phase: Succeeded
Events:
New revision detected! Scaling up podinfo.test
Waiting for podinfo.test rollout to finish: 0 of 1 updated replicas are available
Pre-rollout check acceptance-test passed
Advance podinfo.test canary weight 5
Advance podinfo.test canary weight 10
Advance podinfo.test canary weight 15
Advance podinfo.test canary weight 20
Advance podinfo.test canary weight 25
Advance podinfo.test canary weight 30
Advance podinfo.test canary weight 35
Advance podinfo.test canary weight 40
Advance podinfo.test canary weight 45
Advance podinfo.test canary weight 50
Copying podinfo.test template spec to podinfo-primary.test
Waiting for podinfo-primary.test rollout to finish: 1 of 2 updated replicas are available
Routing all traffic to primary
Promotion completed! Scaling down podinfo.test
```
When the canary analysis starts, Flagger will call the pre-rollout webhooks before routing traffic to the canary.
**Note** that if you apply new changes to the deployment during the canary analysis, Flagger will restart the analysis.
During the analysis the canarys progress can be monitored with Grafana.
Flagger comes with a Grafana dashboard made for canary analysis. Install Grafana with Helm:
```bash
helm upgrade -i flagger-grafana flagger/grafana \
--namespace=test \
--set url=http://flagger-prometheus:9090
```
Run:
```bash
kubectl port-forward --namespace test svc/flagger-grafana 3000:80
```
The Envoy dashboard URL is [http://localhost:3000/d/flagger-envoy/envoy-canary?refresh=10s&orgId=1&var-namespace=test&var-target=podinfo](http://localhost:3000/d/flagger-envoy/envoy-canary?refresh=10s&orgId=1&var-namespace=test&var-target=podinfo)
![Envoy Canary Dashboard](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/flagger-grafana-appmesh.png)
You can monitor all canaries with:
```bash
watch kubectl get canaries --all-namespaces
NAMESPACE NAME STATUS WEIGHT LASTTRANSITIONTIME
test podinfo Progressing 15 2019-10-02T14:05:07Z
prod frontend Succeeded 0 2019-10-02T16:15:07Z
prod backend Failed 0 2019-10-02T17:05:07Z
```
If youve enabled the Slack notifications, you should receive the following messages:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-notifications.png)
## Automated rollback
During the canary analysis you can generate HTTP 500 errors or high latency to test if Flagger pauses the rollout.
Trigger a canary deployment:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:3.1.2
```
Exec into the load tester pod with:
```bash
kubectl -n test exec -it deploy/flagger-loadtester bash
```
Generate HTTP 500 errors:
```bash
hey -z 1m -c 5 -q 5 -H 'Host: podinfo.test' http://envoy.test:10000/status/500
```
Generate latency:
```bash
watch -n 1 curl -H 'Host: podinfo.test' http://envoy.test:10000/delay/1
```
When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary,
the canary is scaled to zero and the rollout is marked as failed.
```text
kubectl -n test logs deploy/flagger -f | jq .msg
New revision detected! progressing canary analysis for podinfo.test
Pre-rollout check acceptance-test passed
Advance podinfo.test canary weight 5
Advance podinfo.test canary weight 10
Advance podinfo.test canary weight 15
Halt podinfo.test advancement success rate 69.17% < 99%
Halt podinfo.test advancement success rate 61.39% < 99%
Halt podinfo.test advancement success rate 55.06% < 99%
Halt podinfo.test advancement request duration 1.20s > 0.5s
Halt podinfo.test advancement request duration 1.45s > 0.5s
Rolling back podinfo.test failed checks threshold reached 5
Canary failed! Scaling down podinfo.test
```
If youve enabled the Slack notifications, youll receive a message if the progress deadline is exceeded,
or if the analysis reached the maximum number of failed checks:
![Flagger Slack Notifications](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/screens/slack-canary-failed.png)

View File

@@ -1,295 +0,0 @@
# SMI Istio Canary Deployments
This guide shows you how to use the SMI Istio adapter and Flagger to automate canary deployments.
## Prerequisites
* Kubernetes &gt; 1.13
* Istio &gt; 1.0
## Install Istio SMI adapter
Install the SMI adapter:
```bash
kubectl apply -f https://raw.githubusercontent.com/deislabs/smi-adapter-istio/master/deploy/crds/crds.yaml
kubectl apply -f https://raw.githubusercontent.com/deislabs/smi-adapter-istio/master/deploy/operator-and-rbac.yaml
```
Create a generic Istio gateway to expose services outside the mesh on HTTP:
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: public-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
```
Save the above resource as public-gateway.yaml and then apply it:
```bash
kubectl apply -f ./public-gateway.yaml
```
Find the Gateway load balancer IP and add a DNS record for it:
```bash
kubectl -n istio-system get svc/istio-ingressgateway -ojson | jq -r .status.loadBalancer.ingress[0].ip
```
## Install Flagger and Grafana
Add Flagger Helm repository:
```bash
helm repo add flagger https://flagger.app
```
Deploy Flagger in the _**istio-system**_ namespace:
```bash
helm upgrade -i flagger flagger/flagger \
--namespace=istio-system \
--set meshProvider=smi:istio
```
Flagger comes with a Grafana dashboard made for monitoring the canary deployments.
Deploy Grafana in the _**istio-system**_ namespace:
```bash
helm upgrade -i flagger-grafana flagger/grafana \
--namespace=istio-system \
--set url=http://prometheus.istio-system:9090
```
You can access Grafana using port forwarding:
```bash
kubectl -n istio-system port-forward svc/flagger-grafana 3000:80
```
## Workloads bootstrap
Create a test namespace with Istio sidecar injection enabled:
Create a test namespace and enable Linkerd proxy injection:
```bash
kubectl create ns test
kubectl label namespace test istio-injection=enabled
```
Create a deployment and a horizontal pod autoscaler:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/podinfo
```
Deploy the load testing service to generate traffic during the canary analysis:
```bash
kubectl apply -k github.com/weaveworks/flagger//kustomize/tester
```
Create a canary custom resource \(replace example.com with your own domain\):
```yaml
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
name: podinfo
service:
# container port
port: 9898
# Istio gateways (optional)
gateways:
- public-gateway.istio-system.svc.cluster.local
# Istio virtual service host names (optional)
hosts:
- app.example.com
analysis:
# schedule interval (default 60s)
interval: 10s
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
metrics:
- name: request-success-rate
# minimum req success rate (non 5xx responses)
# percentage (0-100)
thresholdRange:
min: 99
interval: 1m
- name: request-duration
# maximum req duration P99
# milliseconds
thresholdRange:
max: 500
interval: 30s
# generate traffic during analysis
webhooks:
- name: load-test
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 1m -q 10 -c 2 http://podinfo.test:9898/"
```
Save the above resource as podinfo-canary.yaml and then apply it:
```bash
kubectl apply -f ./podinfo-canary.yaml
```
After a couple of seconds Flagger will create the canary objects:
```bash
# applied
deployment.apps/podinfo
horizontalpodautoscaler.autoscaling/podinfo
canary.flagger.app/podinfo
# generated
deployment.apps/podinfo-primary
horizontalpodautoscaler.autoscaling/podinfo-primary
service/podinfo
service/podinfo-canary
service/podinfo-primary
trafficsplits.split.smi-spec.io/podinfo
```
## Automated canary promotion
Flagger implements a control loop that gradually shifts traffic to the canary while measuring key performance indicators like HTTP requests success rate, requests average duration and pod health. Based on analysis of the KPIs a canary is promoted or aborted, and the analysis result is published to Slack.
![Flagger Canary Stages](https://raw.githubusercontent.com/weaveworks/flagger/master/docs/diagrams/flagger-canary-steps.png)
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=quay.io/stefanprodan/podinfo:3.1.1
```
Flagger detects that the deployment revision changed and starts a new rollout:
```text
kubectl -n istio-system logs deployment/flagger -f | jq .msg
New revision detected podinfo.test
Scaling up podinfo.test
Waiting for podinfo.test rollout to finish: 0 of 1 updated replicas are available
Advance podinfo.test canary weight 5
Advance podinfo.test canary weight 10
Advance podinfo.test canary weight 15
Advance podinfo.test canary weight 20
Advance podinfo.test canary weight 25
Advance podinfo.test canary weight 30
Advance podinfo.test canary weight 35
Advance podinfo.test canary weight 40
Advance podinfo.test canary weight 45
Advance podinfo.test canary weight 50
Copying podinfo.test template spec to podinfo-primary.test
Waiting for podinfo-primary.test rollout to finish: 1 of 2 updated replicas are available
Promotion completed! Scaling down podinfo.test
```
**Note** that if you apply new changes to the deployment during the canary analysis, Flagger will restart the analysis.
During the analysis the canarys progress can be monitored with Grafana. The Istio dashboard URL is [http://localhost:3000/d/flagger-istio/istio-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo](http://localhost:3000/d/flagger-istio/istio-canary?refresh=10s&orgId=1&var-namespace=test&var-primary=podinfo-primary&var-canary=podinfo)
You can monitor all canaries with:
```bash
watch kubectl get canaries --all-namespaces
NAMESPACE NAME STATUS WEIGHT LASTTRANSITIONTIME
test podinfo Progressing 15 2019-05-16T14:05:07Z
prod frontend Succeeded 0 2019-05-15T16:15:07Z
prod backend Failed 0 2019-05-14T17:05:07Z
```
## Automated rollback
During the canary analysis you can generate HTTP 500 errors and high latency to test if Flagger pauses the rollout.
Create a tester pod and exec into it:
```bash
kubectl -n test run tester \
--image=quay.io/stefanprodan/podinfo:3.1.2 \
-- ./podinfo --port=9898
kubectl -n test exec -it tester-xx-xx sh
```
Generate HTTP 500 errors:
```bash
watch curl http://podinfo-canary:9898/status/500
```
Generate latency:
```bash
watch curl http://podinfo-canary:9898/delay/1
```
When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, the canary is scaled to zero and the rollout is marked as failed.
```text
kubectl -n test describe canary/podinfo
Status:
Canary Weight: 0
Failed Checks: 10
Phase: Failed
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Synced 3m flagger Starting canary deployment for podinfo.test
Normal Synced 3m flagger Advance podinfo.test canary weight 5
Normal Synced 3m flagger Advance podinfo.test canary weight 10
Normal Synced 3m flagger Advance podinfo.test canary weight 15
Normal Synced 3m flagger Halt podinfo.test advancement success rate 69.17% < 99%
Normal Synced 2m flagger Halt podinfo.test advancement success rate 61.39% < 99%
Normal Synced 2m flagger Halt podinfo.test advancement success rate 55.06% < 99%
Normal Synced 2m flagger Halt podinfo.test advancement success rate 47.00% < 99%
Normal Synced 2m flagger (combined from similar events): Halt podinfo.test advancement success rate 38.08% < 99%
Warning Synced 1m flagger Rolling back podinfo.test failed checks threshold reached 10
Warning Synced 1m flagger Canary failed! Scaling down podinfo.test
```

View File

@@ -0,0 +1,484 @@
# Gateway API Canary Deployments
This guide shows you how to use [Gateway API](https://gateway-api.sigs.k8s.io/) and Flagger to automate canary deployments and A/B testing.
![Flagger Canary Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-gatewayapi-canary.png)
## Prerequisites
Flagger requires a Kubernetes cluster **v1.16** or newer and any mesh/ingress that implements the `v1alpha2` of Gateway API. We'll be using Contour for the sake of this tutorial, but you can use any other implementation.
Install the GatewayAPI CRDs:
```bash
kubectl apply -k github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.4.1
```
Install a cluster-wide GatewayClass; a Gateway belonging to the GatewayClass and Contour components in the `projectcontour` namespace:
```bash
kubectl apply -f https://raw.githubusercontent.com/projectcontour/contour/release-1.20/examples/render/contour-gateway.yaml
```
Install Flagger in the `flagger-system` namespace:
```bash
kubectl apply -k github.com/fluxcd/flagger//kustomize/gatewayapi
```
## Bootstrap
Flagger takes a Kubernetes deployment and optionally a horizontal pod autoscaler \(HPA\), then creates a series of objects \(Kubernetes deployments, ClusterIP services, HTTPRoutes for the Gateway\). These objects expose the application inside the mesh and drive the canary analysis and promotion.
Create a test namespace:
```bash
kubectl create ns test
```
Create a deployment and a horizontal pod autoscaler:
```bash
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/podinfo?ref=main
```
Deploy the load testing service to generate traffic during the canary analysis:
```bash
kubectl apply -k https://github.com/fluxcd/flagger//kustomize/tester?ref=main
```
Create metric templates targeting the Prometheus server in the `flagger-system` namespace. The PromQL queries below are meant for `Envoy`, but you can [change it to your ingress/mesh provider](https://docs.flagger.app/faq#metrics) accordingly.
```yaml
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: latency
namespace: flagger-system
spec:
provider:
type: prometheus
address: http://flagger-prometheus:9090
query: |
histogram_quantile(0.99,
sum(
rate(
envoy_cluster_upstream_rq_time_bucket{
envoy_cluster_name=~"{{ namespace }}_{{ target }}-canary_[0-9a-zA-Z-]+",
}[{{ interval }}]
)
) by (le)
)/1000
---
apiVersion: flagger.app/v1beta1
kind: MetricTemplate
metadata:
name: error-rate
namespace: flagger-system
spec:
provider:
type: prometheus
address: http://flagger-prometheus:9090
query: |
100 - sum(
rate(
envoy_cluster_upstream_rq{
envoy_cluster_name=~"{{ namespace }}_{{ target }}-canary_[0-9a-zA-Z-]+",
envoy_response_code!~"5.*"
}[{{ interval }}]
)
)
/
sum(
rate(
envoy_cluster_upstream_rq{
envoy_cluster_name=~"{{ namespace }}_{{ target }}-canary_[0-9a-zA-Z-]+",
}[{{ interval }}]
)
)
* 100
```
Save the above resource as metric-templates.yaml and then apply it:
```bash
kubectl apply -f metric-templates.yaml
```
Create a canary custom resource \(replace "loaclproject.contour.io" with your own domain\):
```yaml
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: podinfo
service:
# service port number
port: 9898
# container port number or name (optional)
targetPort: 9898
# Gateway API HTTPRoute host names
hosts:
- localproject.contour.io
# Reference to the Gateway that the generated HTTPRoute would attach to.
gatewayRefs:
- name: contour
namespace: projectcontour
analysis:
# schedule interval (default 60s)
interval: 1m
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
metrics:
- name: error-rate
# max error rate (5xx responses)
# percentage (0-100)
templateRef:
name: error-rate
namespace: flagger-system
thresholdRange:
max: 1
interval: 1m
- name: latency
templateRef:
name: latency
namespace: flagger-system
# seconds
thresholdRange:
max: 0.5
interval: 30s
# testing (optional)
webhooks:
- name: smoke-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 15s
metadata:
type: bash
cmd: "curl -sd 'anon' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io http://envoy.projectcontour/"
```
Save the above resource as podinfo-canary.yaml and then apply it:
```bash
kubectl apply -f ./podinfo-canary.yaml
```
When the canary analysis starts, Flagger will call the pre-rollout webhooks before routing traffic to the canary. The canary analysis will run for five minutes while validating the HTTP metrics and rollout hooks every minute.
After a couple of seconds Flagger will create the canary objects:
```bash
# applied
deployment.apps/podinfo
horizontalpodautoscaler.autoscaling/podinfo
canary.flagger.app/podinfo
# generated
deployment.apps/podinfo-primary
horizontalpodautoscaler.autoscaling/podinfo-primary
service/podinfo
service/podinfo-canary
service/podinfo-primary
httproutes.gateway.networking.k8s.io/podinfo
```
## Expose the app outside the cluster
Find the external address of Contour's Envoy load balancer:
```bash
export ADDRESS="$(kubectl -n projectcontour get svc/envoy -ojson \
| jq -r ".status.loadBalancer.ingress[].hostname")"
echo $ADDRESS
```
Configure your DNS server with a CNAME record \(AWS\) or A record \(GKE/AKS/DOKS\) and point a domain e.g. `localproject.contour.io` to the LB address.
Now you can access the podinfo UI using your domain address.
Note that you should be using HTTPS when exposing production workloads on internet. You can obtain free TLS certs from Let's Encrypt, read this [guide](https://github.com/stefanprodan/eks-contour-ingress) on how to configure cert-manager to secure Contour with TLS certificates.
If you're using a local cluster via kind/k3s you can port forward the Envoy LoadBalancer service:
```bash
kubectl port-forward -n projectcontour svc/envoy 8080:80
```
Now you can access podinfo via `curl -H "Host: localproject.contour.io" localhost:8080`
## Automated canary promotion
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:6.0.1
```
Flagger detects that the deployment revision changed and starts a new rollout:
```text
kubectl -n test describe canary/podinfo
Status:
Canary Weight: 0
Failed Checks: 0
Phase: Succeeded
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Synced 3m flagger New revision detected podinfo.test
Normal Synced 3m flagger Scaling up podinfo.test
Warning Synced 3m flagger Waiting for podinfo.test rollout to finish: 0 of 1 updated replicas are available
Normal Synced 3m flagger Advance podinfo.test canary weight 5
Normal Synced 3m flagger Advance podinfo.test canary weight 10
Normal Synced 3m flagger Advance podinfo.test canary weight 15
Normal Synced 2m flagger Advance podinfo.test canary weight 20
Normal Synced 2m flagger Advance podinfo.test canary weight 25
Normal Synced 1m flagger Advance podinfo.test canary weight 30
Normal Synced 1m flagger Advance podinfo.test canary weight 35
Normal Synced 55s flagger Advance podinfo.test canary weight 40
Normal Synced 45s flagger Advance podinfo.test canary weight 45
Normal Synced 35s flagger Advance podinfo.test canary weight 50
Normal Synced 25s flagger Copying podinfo.test template spec to podinfo-primary.test
Warning Synced 15s flagger Waiting for podinfo-primary.test rollout to finish: 1 of 2 updated replicas are available
Normal Synced 5s flagger Promotion completed! Scaling down podinfo.test
```
**Note** that if you apply new changes to the deployment during the canary analysis, Flagger will restart the analysis.
A canary deployment is triggered by changes in any of the following objects:
* Deployment PodSpec \(container image, command, ports, env, resources, etc\)
* ConfigMaps mounted as volumes or mapped to environment variables
* Secrets mounted as volumes or mapped to environment variables
You can monitor how Flagger progressively changes the weights of the HTTPRoute object that is attahed to the Gateway with:
```bash
watch kubectl get httproute -n test podinfo -o=jsonpath='{.spec.rules}'
```
You can monitor all canaries with:
```bash
watch kubectl get canaries --all-namespaces
NAMESPACE NAME STATUS WEIGHT LASTTRANSITIONTIME
test podinfo Progressing 15 2022-01-16T14:05:07Z
prod frontend Succeeded 0 2022-01-15T16:15:07Z
prod backend Failed 0 2022-01-14T17:05:07Z
```
## Automated rollback
During the canary analysis you can generate HTTP 500 errors and high latency to test if Flagger pauses the rollout.
Trigger another canary deployment:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:6.0.2
```
Exec into the load tester pod with:
```bash
kubectl -n test exec -it flagger-loadtester-xx-xx sh
```
Generate HTTP 500 errors:
```bash
watch curl http://podinfo-canary:9898/status/500
```
Generate latency:
```bash
watch curl http://podinfo-canary:9898/delay/1
```
When the number of failed checks reaches the canary analysis threshold, the traffic is routed back to the primary, the canary is scaled to zero and the rollout is marked as failed.
```text
kubectl -n test describe canary/podinfo
Status:
Canary Weight: 0
Failed Checks: 10
Phase: Failed
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Synced 3m flagger Starting canary deployment for podinfo.test
Normal Synced 3m flagger Advance podinfo.test canary weight 5
Normal Synced 3m flagger Advance podinfo.test canary weight 10
Normal Synced 3m flagger Advance podinfo.test canary weight 15
Normal Synced 3m flagger Halt podinfo.test advancement error rate 69.17% > 1%
Normal Synced 2m flagger Halt podinfo.test advancement error rate 61.39% > 1%
Normal Synced 2m flagger Halt podinfo.test advancement error rate 55.06% > 1%
Normal Synced 2m flagger Halt podinfo.test advancement error rate 47.00% > 1%
Normal Synced 2m flagger (combined from similar events): Halt podinfo.test advancement error rate 38.08% > 1%
Warning Synced 1m flagger Rolling back podinfo.test failed checks threshold reached 10
Warning Synced 1m flagger Canary failed! Scaling down podinfo.test
```
# A/B Testing
Besides weighted routing, Flagger can be configured to route traffic to the canary based on HTTP match conditions. In an A/B testing scenario, you'll be using HTTP headers or cookies to target a certain segment of your users. This is particularly useful for frontend applications that require session affinity.
![Flagger A/B Testing Stages](https://raw.githubusercontent.com/fluxcd/flagger/main/docs/diagrams/flagger-abtest-steps.png)
Create a canary custom resource \(replace "loaclproject.contour.io" with your own domain\):
```yaml
apiVersion: flagger.app/v1beta1
kind: Canary
metadata:
name: podinfo
namespace: test
spec:
# deployment reference
targetRef:
apiVersion: apps/v1
kind: Deployment
name: podinfo
# the maximum time in seconds for the canary deployment
# to make progress before it is rollback (default 600s)
progressDeadlineSeconds: 60
# HPA reference (optional)
autoscalerRef:
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
name: podinfo
service:
# service port number
port: 9898
# container port number or name (optional)
targetPort: 9898
# Gateway API HTTPRoute host names
hosts:
- localproject.contour.io
# Reference to the Gateway that the generated HTTPRoute would attach to.
gatewayRefs:
- name: contour
namespace: projectcontour
analysis:
# schedule interval (default 60s)
interval: 1m
# max number of failed metric checks before rollback
threshold: 5
# max traffic percentage routed to canary
# percentage (0-100)
maxWeight: 50
# canary increment step
# percentage (0-100)
stepWeight: 10
metrics:
- name: error-rate
# max error rate (5xx responses)
# percentage (0-100)
templateRef:
name: error-rate
namespace: flagger-system
thresholdRange:
max: 1
interval: 1m
- name: latency
templateRef:
name: latency
namespace: flagger-system
# seconds
thresholdRange:
max: 0.5
interval: 30s
# testing (optional)
webhooks:
- name: smoke-test
type: pre-rollout
url: http://flagger-loadtester.test/
timeout: 15s
metadata:
type: bash
cmd: "curl -sd 'anon' http://podinfo-canary.test:9898/token | grep token"
- name: load-test
url: http://flagger-loadtester.test/
timeout: 5s
metadata:
cmd: "hey -z 2m -q 10 -c 2 -host localproject.contour.io -H 'X-Canary: insider' http://envoy.projectcontour/"
```
The above configuration will run an analysis for ten minutes targeting those users that have an insider cookie.
Save the above resource as podinfo-ab-canary.yaml and then apply it:
```bash
kubectl apply -f ./podinfo-ab-canary.yaml
```
Trigger a canary deployment by updating the container image:
```bash
kubectl -n test set image deployment/podinfo \
podinfod=stefanprodan/podinfo:6.0.3
```
Flagger detects that the deployment revision changed and starts a new rollout:
```text
kubectl -n test describe canary/abtest
Status:
Failed Checks: 0
Phase: Succeeded
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Synced 3m flagger New revision detected podinfo.test
Normal Synced 3m flagger Scaling up podinfo.test
Warning Synced 3m flagger Waiting for podinfo.test rollout to finish: 0 of 1 updated replicas are available
Normal Synced 3m flagger Advance podinfo.test canary iteration 1/10
Normal Synced 3m flagger Advance podinfo.test canary iteration 2/10
Normal Synced 3m flagger Advance podinfo.test canary iteration 3/10
Normal Synced 2m flagger Advance podinfo.test canary iteration 4/10
Normal Synced 2m flagger Advance podinfo.test canary iteration 5/10
Normal Synced 1m flagger Advance podinfo.test canary iteration 6/10
Normal Synced 1m flagger Advance podinfo.test canary iteration 7/10
Normal Synced 55s flagger Advance podinfo.test canary iteration 8/10
Normal Synced 45s flagger Advance podinfo.test canary iteration 9/10
Normal Synced 35s flagger Advance podinfo.test canary iteration 10/10
Normal Synced 25s flagger Copying podinfo.test template spec to podinfo-primary.test
Warning Synced 15s flagger Waiting for podinfo-primary.test rollout to finish: 1 of 2 updated replicas are available
Normal Synced 5s flagger Promotion completed! Scaling down podinfo.test
```
The above procedures can be extended with [custom metrics](../usage/metrics.md) checks, [webhooks](../usage/webhooks.md), [manual promotion](../usage/webhooks.md#manual-gating) approval and [Slack or MS Teams](../usage/alerting.md) notifications.

Some files were not shown because too many files have changed in this diff Show More