Commit Graph
70 Commits
Author SHA1 Message Date
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 2fb36d58b1 build: generate release notes on disk 2020-03-04 20:48:06 +02:00
stefanprodan 6d4db45d6c build: update Go to v1.14 and Alpine to v3.11 2020-03-04 16:13:49 +02:00
stefanprodan ccd27b4614 Add Chick-fil-A to user list 2020-03-04 10:05:51 +02:00
stefanprodan be4c67540d build: make release compatible with go mod 2020-02-28 18:46:26 +02:00
stefanprodan baadc19a42 build: cleanup makefile 2020-02-28 17:46:43 +02:00
stefanprodan 9a44c5baac build: add goimports to CI 2020-02-28 12:58:49 +02:00
stefanprodan e2b4a3de32 ci: push container for master only 2020-02-27 13:03:58 +02:00
mathetake 336344720c add e2e test for daemonset target type 2020-02-23 13:55:45 +09: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 3d7091a56b Use Kubernetes v1.17.0 in e2e tests 2020-01-16 19:33:17 +02:00
stefanprodan 38b04f2690 Add Contour canary e2e tests 2019-12-19 09:38:23 +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 1b485b3459 Release v0.20.0 2019-10-22 09:39:14 +03:00
stefanprodan dfaa039c9c Update Goo docs 2019-10-22 00:48:15 +03:00
stefanprodan d6027af632 Update go to 1.13 in CI 2019-09-27 16:33:06 +03:00
Anton Kislitcyn f56b6dd6a7 Add annotations prefix for ingresses 2019-09-06 11:36:06 +02:00
stefanprodan 2b3d425b70 Publish Helm chart from CircleCI 2019-08-05 17:08:33 +03:00
stefanprodan e56ba480c7 Add Blue/Green e2e tests 2019-07-30 12:02:15 +03:00
stefanprodan 606754d4a5 Disable supergloo e2e 2019-07-29 15:06:31 +03:00
stefanprodan a58a7cbeeb Update Gloo to 0.14.2 2019-07-01 16:07:38 +03:00
stefanprodan bc613905e9 Add Linkerd edge-19.6.4 e2e testing 2019-06-29 15:20:35 +03:00
stefanprodan 77b3d861e6 Add release workflow to CI 2019-06-24 16:08:56 +03:00
stefanprodan 7a454c005f Use Kind 0.2.1 for supergloo e2e 2019-06-22 15:55:48 +03:00
stefanprodan 7baaaebdd4 Use Kind 0.2.1 for Gloo e2e 2019-06-22 15:28:45 +03:00
stefanprodan 0d4d2ac37b CircleCI: Build and push load tester 2019-06-22 09:51:37 +03:00
stefanprodan d0591916a4 Update k8s packages 2019-06-21 23:42:59 +03:00
stefanprodan a894a7a0ce CircleCI: update code gen package 2019-06-21 20:36:18 +03:00
stefanprodan 0bbe724b8c CircleCI: chmod k8s code gen 2019-06-21 16:43:16 +03:00
stefanprodan bea22c0259 CircleCI: run go mod download 2019-06-21 16:40:25 +03:00
stefanprodan 6fe6a41e3e CircleCI - cleanup branch filters 2019-06-21 15:58:23 +03:00
stefanprodan 91cd2648d9 CircleCI - run goreleaser for git tags 2019-06-21 15:39:56 +03:00
stefanprodan 240591a6b8 CircleCI - run goreleaser 2019-06-21 15:29:38 +03:00
stefanprodan a6b2b1246c CircleCI - add goreleaser job 2019-06-21 15:07:00 +03:00
stefanprodan 31b3fcf906 CircleCI - refactor e2e tests 2019-06-21 14:43:00 +03:00
stefanprodan 767be5b6a8 CircleCI - reset go mod cache 2019-06-21 14:28:29 +03:00
stefanprodan 48834cd8d1 CircleCI - refactor Istio e2e testing 2019-06-21 14:26:12 +03:00
stefanprodan f4bb0ea9c2 CircleCI - add codecov 2019-06-21 13:58:36 +03:00
stefanprodan cf25a9a8a5 CircleCI - fix config 2019-06-21 13:47:06 +03:00
stefanprodan 4f0ad7a067 CircleCI - run Istio e2e 2019-06-21 13:45:16 +03:00
stefanprodan c0fe461a9f CircleCI - push to Docker Hub 2019-06-21 13:33:26 +03:00
stefanprodan 1911143514 CircleCI - run go test 2019-06-21 13:29:32 +03:00
stefanprodan 9b67b360d0 CircleCI - build and push container 2019-06-21 13:26:12 +03:00
stefanprodan 991e01efd2 CircleCI - fix container build 2019-06-21 13:10:27 +03:00
stefanprodan 83b8ae46c9 CircleCI - copy bin to workspace dir 2019-06-21 13:07:59 +03:00
stefanprodan c3b7aee063 CircleCI - make workspace dir 2019-06-21 13:05:16 +03:00
stefanprodan 66d662c085 CircleCI - fix working_directory 2019-06-21 13:01:47 +03:00
stefanprodan 4d5876fb76 CircleCI - fix job name 2019-06-21 13:00:26 +03:00