Skip to content

Commit

Permalink
Add support for traffic segments. (#495)
Browse files Browse the repository at this point in the history
* Debug e2es.

Signed-off-by: Rodrigo Reis <[email protected]>

* Add segment routegroup and ingress.

Signed-off-by: Rodrigo Reis <[email protected]>

* Add ingress segments to resources; compute new segments on traffic updates.

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix decimals; cleanup; fix regex.

Signed-off-by: Rodrigo Reis <[email protected]>

* More cleanup.

Signed-off-by: Rodrigo Reis <[email protected]>

* More cleanup.

Signed-off-by: Rodrigo Reis <[email protected]>

* Move segment computing to stack reconciliation.

Signed-off-by: Rodrigo Reis <[email protected]>

* Move segment reconciliation to the end.

Signed-off-by: Rodrigo Reis <[email protected]>

* Collect routegroup segments.

Signed-off-by: Rodrigo Reis <[email protected]>

* Support routegroups (unfinished).

Signed-off-by: Rodrigo Reis <[email protected]>

* Fixed checking up to date resources

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix unit tests.

Signed-off-by: Rodrigo Reis <[email protected]>

* Remove deprecated linters.

Signed-off-by: Rodrigo Reis <[email protected]>

* Switchs e2es to teapot, for now.

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix switching e2es to teapot.

Signed-off-by: Rodrigo Reis <[email protected]>

* Wait on traffic segments.

Signed-off-by: Rodrigo Reis <[email protected]>

* Adapt routegroup verification for segments; fix E2E docs

Signed-off-by: Rodrigo Reis <[email protected]>

* Refactor routegroup and ingress verification on E2Es; start fixing RouteGroup to Ingress (and vice-versa) E2Es

Signed-off-by: Rodrigo Reis <[email protected]>

* Force stackset e2e to use traffic segments

Signed-off-by: Rodrigo Reis <[email protected]>

* e2es back to stups-test; remove unused var.

Signed-off-by: Rodrigo Reis <[email protected]>

* Extract Traffic Segment struct.

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix sorting; move segment manipulation to trafficsegment struct,

Signed-off-by: Rodrigo Reis <[email protected]>

* Support both traffic segments and central traffic management.

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix traffic switch.

Signed-off-by: Rodrigo Reis <[email protected]>

* Reset e2es.

Signed-off-by: Rodrigo Reis <[email protected]>

* Newlines.

Signed-off-by: Rodrigo Reis <[email protected]>

* Convert to traffic segments.

Signed-off-by: Rodrigo Reis <[email protected]>

* Revert to legacy StackSet.

Signed-off-by: Rodrigo Reis <[email protected]>

* Fix e2e cluster targeting to stups-test.

Signed-off-by: Rodrigo Reis <[email protected]>

* E2E for traffic segment stackset.

Signed-off-by: Rodrigo Reis <[email protected]>

* Rearrange code, run goimports.

Signed-off-by: Rodrigo Reis <[email protected]>

* goimports

Signed-off-by: Rodrigo Reis <[email protected]>

* Delete central ingress considering TTL timeout.

* Update ingress type resources from stack spec, not stackset.

Signed-off-by: Rodrigo Reis <[email protected]>

* Don't override backend port when no ingress resource.

Signed-off-by: Rodrigo Reis <[email protected]>

* E2E tests also segments (Part 1).

* Test stackset creation also with segments.

* Test stackset updates also with segments.

* Add option to enable traffic segments by default. Improve convertion to segments end-2-end test.

* Flip unit tests to use segments by default.

* Ensure controller injects segment annotation when needed.

* Fix e2e.

* Backslashes to shell commands.

* Fix comment typo.

* Improve error message.

* Improve veriable naming.

* Move annotation injection to reconciler logic.

* Ensure create/update traffic segments when reconciling stack.

* Check if update is needed based on resource state

Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>

* Format.

* Generate actual segment in cluster.

* Decouple segment computing and generation; configure options to completely disable segments.

* Add more context to logs.

* Add missing ConfigMap code.

---------

Signed-off-by: Rodrigo Reis <[email protected]>
Signed-off-by: Rodrigo Reis <[email protected]>
Signed-off-by: Mikkel Oscar Lyderik Larsen <[email protected]>
Co-authored-by: Rodrigo Reis <[email protected]>
Co-authored-by: Mikkel Oscar Lyderik Larsen <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2023
1 parent 83ce20f commit 4278725
Show file tree
Hide file tree
Showing 19 changed files with 2,637 additions and 283 deletions.
4 changes: 3 additions & 1 deletion cmd/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ watch -n 10 "kubectl get -n foo stackset,stack,ing,ep,deployment"
```
kubectl delete namespace foo; kubectl create namespace foo
make
./build/stackset-controller --apiserver=http://127.0.0.1:8001 --controller-id=foo
./build/stackset-controller --apiserver=http://127.0.0.1:8001 \
--enable-routegroup-support --controller-id=foo \
--cluster-domain=${CLUSTER_DOMAIN} --cluster-domain=${CLUSTER_DOMAIN_INTERNAL}
```
4. rebuild e2e test and run e2e tests in `foo` namespace
```
Expand Down
Loading

0 comments on commit 4278725

Please sign in to comment.