Commit Graph

49 Commits

Author SHA1 Message Date
Alexey Kubrinsky 4932527464 Istio Canary TCP service support
Signed-off-by: Alexey Kubrinsky <akubrinsky@zetaglobal.com>
2024-02-07 14:51:30 +01:00
Sanskar Jaiswal c0e2096f92
gatewayapi: add support for route rule filters
Add support for [`Filters`](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRouteFilter)
in the HTTPRoute API. We reuse most of the existing fields used for
Istio to construct the appopriate filter. A new API
`.spec.service.mirror` is added to allow for request mirroring. The
`.spec.service.rewrite` API has been changed to a custom `HTTPRewrite`
API instead of importing it from Istio, to allow covering all features
that Gateway API provides.

Support for the [`RequestRedirect`](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRequestRedirectFilter)
Filter has been left out on purpose, since it's not possible to specify
it if the same rule also specifies `.backendRefs` (which Flagger does).

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-09-22 16:10:09 +05:30
jonny.langefeld e8aba087ac
Enable updates for labels and annotations
Fix #1386

Signed-off-by: jonny.langefeld <jonnylangefeld@gmail.com>
Signed-off-by: Jonny Langefeld <jonnylangefeld@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-04-12 16:04:28 +05:30
Sanskar Jaiswal 202b6e7eb1 use regex to match against headers in istio
Use regex filtering to match against session affinity cookie headers
when using Istio instead of an exact match.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2023-02-08 21:41:19 +05:30
Sanskar Jaiswal a496b99d6e add session affinity support for weighted routing with istio
Add `.spec.analysis.sessionAffinity` to configure session affinity for
weighted routing. Add support for session affinity in the Istio router,
using the `Set-Cookie` and `Cookie` headers.

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-11-10 13:17:16 +05:30
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
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
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 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 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
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 cd75c5fa25
Copyright Flux authors
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-12-21 19:44:52 +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
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
Kazuki Nitta a624a2977e
Add support for Istio VirtualService delegation (#715)
Add support for Istio VirtualService delegation
2020-10-28 11:38:54 +02:00
sayboras c0515fc6ff Upgrade to kube 1.18 2020-04-04 23:46:38 +11:00
mathetake ef8b6fe9b8 finalizer: refactoring 2020-03-29 17:07:18 +09: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
Tanner Altares 92937a8f48 kubectl annotation support
rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

add unit tests for finalizing

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

run fmt to clean up formatting

review changes

add kubectl annotation

add kubectl annotation support

introduction of finalizer

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

add unit tests for finalizing

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

run fmt to clean up formatting

review changes

introduction of finalizer

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

add unit tests for finalizing

introduction of finalizer

rebase and squash

fix fmt issues

revert Dockerfile

revert go.mod and go.sum

introduction of finalizer

introduction of finalizer

remove test for finalizer add istio tests

fix fmt issues

revert go.mod and go.sum

revert Dockerfile and main.go

fmt deployment controller

run fmt to clean up formatting

review changes
2020-03-20 15:13:51 -05:00
mathetake 7380dbb8ab make MirrorWeight's type int, not float64 2020-03-10 15:47:46 +09:00
mathetake 3425d6e965 pkg/router/istio: use canary.GetAnalysis to prevent nil pointer 2020-03-10 15:28:20 +09:00
mathetake aec0010b14 ignore MirrorPercentage in reconcileVirtualService 2020-03-10 14:54:57 +09:00
mathetake 8242e7691a pkg/router/istio: set mirrorWeight if provided 2020-03-10 09:53:53 +09:00
mathetake 23ab1bdb4b pkg/router: improve error handling messages 2020-03-08 11:45:09 +09:00
stefanprodan 287977c2b5 Deprecate spec.canaryAnalysis replaced by spec.analysis
- add analysis field to Canary spec
- deprecate canaryAnalysis filed (to be removed in the next API version)
- maintain backwards compatibility with v1alpha3 by using spec.canaryAnalysis if spec.analysis is nil
- set analysis threshold default value to 1
2020-02-28 11:24:38 +02:00
stefanprodan 172c4f56dd Use header operations in Istio router
- remove deprecated appendHeaders from Istio client
- propagate header operations from canary service headers to Istio virtual service
- add Istio router tests for request/response header removal
- update header operations examples in docs
2020-02-14 13:59:36 +02:00
stefanprodan ea4d9ba58d Set destination port for Istio ingress gateways 2020-02-11 17:07:10 +02:00
stefanprodan 448c210324 Release API version v1beta1
- bump Canary and MetricTemplate version to v1beta1
- regenerate clientset and CRD
2020-02-07 12:35:56 +02:00
stefanprodan 940e547e88 Implement service name override
Use targetRef.name as the Kubernetes service name prefix only if service name is not specified
Warn about routing conflicts when service name changes
2020-01-26 12:48:49 +02:00
stefanprodan 45df96ff3c Format imports 2019-10-06 12:54:01 +03:00
Andrew Jenkins 2e079ba7a1 Add mirror to router interface and implement for istio router
The mirror option will be used to tell routers to configure traffic
mirroring.  Implement mirror for GetRoutes and SetRoutes for Istio.  For
other routers, GetRoutes always returns mirror == false, and SetRoutes
ignores mirror.

After this change there is no behavior change because no code sets
mirror true (yet).

Enhanced TestIstioRouter_SetRoutes and TestIstioRouter_GetRoutes.
2019-09-24 16:15:45 -06:00
Félix Cantournet 0ca48d77be Fix Port discovery with multiple port services
This fixes issue https://github.com/weaveworks/flagger/issues/263

We actually don't need to specify any ports in the VirtualService
and DestinationRules.
Istio will create clusters/listerners for each named port we have declared in
the kubernetes services and the router can be shared as it operates only on L7 criterias

Also contains a tiny clean-up of imports
2019-08-02 10:07:00 +02:00
stefanprodan 88c450e3bd Implement port discovery
If port discovery is enabled, Flagger scans the deployment pod template and extracts the container ports excluding the port specified in the canary service spec and Istio proxy ports. All the extra ports will be used when generation the ClusterIP services.
2019-06-15 16:34:32 +03:00
stefanprodan 2285bd210e Add traffic policy to canary service spec
Attach traffic policy to canary and primary destination rules
2019-06-07 13:58:59 +03:00
stefanprodan 3fa9f37192 Reconcile Istio destination rule
Remove port selector from virtual service destinations
Ignore the destination weight field when diffing the virtual service spec
2019-06-07 13:31:07 +03:00
stefanprodan c92230c109 Fix duplicate hosts error when using wildcard 2019-05-02 19:05:54 +03:00
stefanprodan 126b68559e Set default mesh gateway if no gateway is specified 2019-04-06 12:21:30 +03:00
stefanprodan ca074ef13f Rename router sync to reconcile 2019-03-26 17:12:46 +02:00
stefanprodan b4ae060122 Move to weaveworks org 2019-03-20 18:26:04 +02:00
stefanprodan 881387e522 Fix HTTP URI match conditions 2019-03-11 14:54:17 +02:00
stefanprodan bf1ca293dc Implement fix routing for canary analysis
Allow A/B testing scenarios where instead of weighted routing the traffic is split between the primary and canary based on HTTP headers or cookies.
2019-03-08 11:54:41 +02:00
stefanprodan 9adc0698bb Add CORS policy to Istio router 2019-03-06 15:34:36 +02:00
stefanprodan eab7f126a6 Use request.add for header append operation 2019-03-06 13:45:46 +02:00
stefanprodan 7d0df82861 Add header manipulation rules to Canary CRD 2019-03-06 12:41:53 +02:00
stefanprodan b0b6198ec8 Add Istio virtual service and signal packages 2019-03-06 01:43:09 +02:00
stefanprodan 9a9964c968 Add ClusterIP host to virtual service 2019-03-05 02:27:56 +02:00
stefanprodan 9680ca98f2 Rename service router to Kubernetes router 2019-03-05 02:12:52 +02:00
stefanprodan 3f5c22d863 Extract routing to dedicated package
- split routing management into Kubernetes service router and Istio Virtual service router
2019-03-05 02:02:58 +02:00