307 Commits

Author SHA1 Message Date
Tanner Altares
7cf836e982 support for daemonset finalize
fmt

update e2e test typo

finalizer return if not found

fix typo
2020-03-20 21:41:43 -05:00
Tanner Altares
c9a07cec87 add e2e tests istio
add e2e tests istio

clean up comment from review

add e2e tests istio

clean up comment from review

clean up logging statement

add e2e tests istio

clean up comment from review

clean up logging statement

add log statement on e2e iteration

add e2e tests istio

clean up comment from review

clean up logging statement

add log statement on e2e iteration

extend timeout for finalizing

add e2e tests istio

clean up comment from review

clean up logging statement

add log statement on e2e iteration

extend timeout for finalizing

add phase to kustomize crd

add e2e tests istio

clean up comment from review

clean up logging statement

add log statement on e2e iteration

extend timeout for finalizing

add phase to kustomize crd

revert timeout on circleci

vs and svc checks for istio e2e tests

fix fmt errors and tests

add get statement in e2e test

add get statement in e2e test

add namespace to e2e

use only selector for service revert
2020-03-20 15:13:51 -05:00
sayboras
2954317982 Remove obsolete stats configuration 2020-03-19 20:53:39 +11:00
sayboras
830f3ac18f Upgrade nginx help to 1.34.2 2020-03-19 20:36:09 +11:00
leigh capili
bbbcfd6cde Fix gRPC typos 2020-03-18 20:16:37 -06:00
stefanprodan
31090d08b6 e2e: Update NGINX ingress to v0.30.0 2020-03-09 18:44:49 +02:00
stefanprodan
5cd78bfd40 e2e: Consolidate Kubernetes e2e tests
- run both Deployment and DaemonSet tests on the same Kubernetes Kind cluster
- add cleanup script that deletes the test namespace before running the DaemonSet tests
- set Kubernetes version to 1.17.2
2020-03-09 10:10:37 +02:00
stefanprodan
e76e718967 e2e: Use custom latency check for Istio 1.5 2020-03-07 11:57:46 +02:00
stefanprodan
438a9839d2 e2e: Update Istio to v1.5.0 2020-03-07 10:34:51 +02:00
stefanprodan
2fb36d58b1 build: generate release notes on disk 2020-03-04 20:48:06 +02:00
stefanprodan
a0a9b7d29a e2e: use kustomize to install the load tester 2020-03-04 16:13:49 +02:00
stefanprodan
eced0f45c6 Update roadmap and readme 2020-03-04 16:13:49 +02:00
stefanprodan
be4c67540d build: make release compatible with go mod 2020-02-28 18:46:26 +02:00
stefanprodan
19faf67523 e2e: update istio to 1.4.5 and NGINX to 1.33.0 2020-02-28 12:28:09 +02:00
stefanprodan
82660e23da Update e2e tests to v1beta1
- set Canary API version to flagger.app/v1beta1
- rename canaryAnalysis to analysis
2020-02-28 11:31:27 +02:00
mathetake
cc07c2891e add DaemonSet targetKind in crd and change label selector
and ignore daemonSetScaleDownNodeSelector in target spec change detection
2020-02-25 13:00:36 +09:00
mathetake
336344720c add e2e test for daemonset target type 2020-02-23 13:55:45 +09:00
stefanprodan
0c2d7da136 Use Contour 1.2 in e2e tests 2020-02-22 00:50:38 +02:00
stefanprodan
890365c189 ci: List PRs in release notes 2020-02-17 16:48:53 +02:00
stefanprodan
3a5a0faa4f build: List PRs in release notes 2020-02-15 00:45:50 +02:00
stefanprodan
33d57af233 e2e: Install CRDs with Helm v3 2020-02-14 12:43:21 +02:00
stefanprodan
39e44e6a7a e2e: Update Istio to v1.4.4 2020-02-13 17:42:58 +02:00
stefanprodan
67ba14e438 e2e: Update Linkerd to v2.7.0 2020-02-13 17:22:30 +02:00
stefanprodan
0bd66f4603 e2e: Update Gloo gateway proxy address 2020-02-13 12:19:36 +02:00
stefanprodan
78dacc98fa e2e: Fix NGINX helm uninstall 2020-02-13 12:17:30 +02:00
stefanprodan
71a220d432 e2e: Fix Gloo routes 2020-02-13 11:54:36 +02:00
stefanprodan
089aa1fe22 e2e: Create namespaces for Helm v3 2020-02-13 11:23:10 +02:00
stefanprodan
c88fa5d882 e2e: Update Gloo to v1.3.5 2020-02-13 11:14:26 +02:00
stefanprodan
14214bc2fe e2e: Update Helm to v3.0.3 2020-02-13 11:14:07 +02:00
stefanprodan
e4e92b3353 Add metric threshold range to e2e tests 2020-02-08 15:14:52 +02:00
stefanprodan
95b389a8fa Add e2e tests for metric templates 2020-02-06 15:07:53 +02:00
stefanprodan
e00d9962d6 Use service name override in Kubernetes e2e tests 2020-01-26 12:59:51 +02:00
stefanprodan
3d7091a56b Use Kubernetes v1.17.0 in e2e tests 2020-01-16 19:33:17 +02:00
stefanprodan
bc3256e1c5 Update Contour to v1.1 2020-01-16 11:08:55 +02:00
stefanprodan
9d765feb38 Remove deprecated Kind command from e2e 2020-01-14 13:12:54 +02:00
stefanprodan
7e6a70bdbf Update Kubernetes Kind to v0.7.0 2020-01-14 12:55:20 +02:00
stefanprodan
8d7d5e6810 Update Istio e2e to v1.4.3 2020-01-11 20:59:00 +02:00
stefanprodan
b49d63bdfe Update e2e tests to Linkerd 2.6.1 2020-01-06 12:02:53 +02:00
stefanprodan
1544610203 Add Contour e2e test for canary rollback 2019-12-20 14:38:06 +02:00
stefanprodan
ae9cf57fd5 Add e2e tests for Contour header routing 2019-12-19 12:22:57 +02:00
stefanprodan
38b04f2690 Add Contour canary e2e tests 2019-12-19 09:38:23 +02:00
stefanprodan
a59901aaa9 Update e2e tests to Kubernetes 1.16 2019-12-04 15:35:36 +07:00
stefanprodan
89d7cb1b04 Update nginx-ingress to 1.26.0 2019-11-27 17:48:37 +02:00
Yusuke Kuoka
1ba595bc6f feat: Canary-release anything behind K8s service
Resolves #371

---

This adds the support for `corev1.Service` as the `targetRef.kind`, so that we can use Flagger just for canary analysis and traffic-shifting on existing and pre-created services. Flagger doesn't touch deployments and HPAs in this mode.

This is useful for keeping your full-control on the resources backing the service to be canary-released, including pods(behind a ClusterIP service) and external services(behind an ExternalName service).

Major use-case in my mind are:

- Canary-release a K8s cluster. You create two clusters and a master cluster. In the master cluster, you create two `ExternalName` services pointing to (the hostname of the loadbalancer of the targeted app instance in) each cluster. Flagger runs on the master cluster and helps safely rolling-out a new K8s cluster by doing a canary release on the `ExternalName` service.
- You want annotations and labels added to the service for integrating with things like external lbs(without extending Flagger to support customizing any aspect of the K8s service it manages

**Design**:

A canary release on a K8s service is almost the same as one on a K8s deployment. The only fundamental difference is that it operates only on a set of K8s services.

For example, one may start by creating two Helm releases for `podinfo-blue` and `podinfo-green`, and a K8s service `podinfo`. The `podinfo` service should initially have the same `Spec` as that of  `podinfo-blue`.

On a new release, you update `podinfo-green`, then trigger Flagger by updating the K8s service `podinfo` so that it points to pods or `externalName` as declared in `podinfo-green`. Flagger does the rest. The end result is the traffic to `podinfo` is gradually and safely shifted from `podinfo-blue` to `podinfo-green`.

**How it works**:

Under the hood, Flagger maintains two K8s services, `podinfo-primary` and `podinfo-canary`. Compared to canaries on K8s deployments, it doesn't create the service named `podinfo`, as it is already provided by YOU.

Once Flagger detects the change in the `podinfo` service, it updates the `podinfo-canary` service and the routes, then analyzes the canary. On successful analysis, it promotes the canary service to the `podinfo-primary` service. You expose the `podinfo` service via any L7 ingress solution or a service mesh so that the traffic is managed by Flagger for safe deployments.

**Giving it a try**:

To give it a try, create a `Canary` as usual, but its `targetRef` pointed to a K8s service:

```
apiVersion: flagger.app/v1alpha3
kind: Canary
metadata:
  name: podinfo
spec:
  provider: kubernetes
  targetRef:
    apiVersion: core/v1
    kind: Service
    name: podinfo
  service:
    port: 9898
  canaryAnalysis:
    # schedule interval (default 60s)
    interval: 10s
    # max number of failed checks before rollback
    threshold: 2
    # number of checks to run before rollback
    iterations: 2
    # Prometheus checks based on
    # http_request_duration_seconds histogram
    metrics: []
```

Create a K8s service named `podinfo`, and update it. Now watch for the services `podinfo`, `podinfo-primary`, `podinfo-canary`.

Flagger tracks `podinfo` service for changes. Upon any change, it reconciles `podinfo-primary` and `podinfo-canary` services. `podinfo-canary` always replicate the latest `podinfo`. In contract, `podinfo-primary` replicates the latest successful `podinfo-canary`.

**Notes**:

- For the canary cluster use-case, we would need to write a K8s operator to, e.g. for App Mesh, sync `ExternalName` services to AppMesh `VirtualNode`s. But that's another story!
2019-11-27 09:07:29 +09:00
stefanprodan
eeea3123ac Update e2e NGINX ingress to v1.24.4 2019-10-28 16:08:00 +02:00
stefanprodan
51fe43e169 Update e2e Helm to v2.15.1 2019-10-28 15:32:02 +02:00
stefanprodan
c9bacdfe05 Update Istio to v1.3.3 2019-10-28 15:19:17 +02:00
stefanprodan
f56a69770c Update Linkerd to v2.6.0 2019-10-28 14:42:16 +02:00
stefanprodan
46579d2ee6 Refactor Gloo integration
- build Gloo UpstreamGroup clientset
- drop solo-io, envoyproxy, hcl, consul, opencensus, apiextensions deps
- use the native routers with supergloo
2019-10-21 16:33:47 +03:00
stefanprodan
dff9287c75 Add target port to NGINX e2e tests 2019-10-07 10:01:28 +03:00