Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert to proxy ir #8945

Merged
merged 10 commits into from
Dec 7, 2023
Merged

Revert to proxy ir #8945

merged 10 commits into from
Dec 7, 2023

Conversation

lgadban
Copy link
Contributor

@lgadban lgadban commented Dec 4, 2023

The PR keeps all the existing functionality that was in the v2.0.x branch but reverts all changes related to native translation for xds. In other words, it uses the Gloo Proxy IR to represent the model to then be translated to xds for envoy.

The native translation mode is preserved in https://github.com/solo-io/gloo/tree/v2.0.x-native-translation

Nadine2016 and others added 4 commits November 29, 2023 16:21
* Adding quickstart for Helm

* Update README.md
patch modified off PR (#8886) as we no longer want the native translation
updates.

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Lawrence Gadban <lawrence.gadban@solo.io>
Updated for Gloo Edge Proxy IR

---------

Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
@lgadban lgadban changed the base branch from v2.0.x to v2.0.x-pre-native-xlate December 4, 2023 15:40
lgadban and others added 5 commits December 4, 2023 10:03
* use types.NN for GatewayReports

* consolidate report creation

* reduce visibility of GatewayReport fields

* extract status building from syncer

* more narrowing viz, add Getters, first unit test for status building

* factor out condition boilerplate, more tests

* fix missed compile issue in translator tests

* add basic test for LastTransitionTime

* better testing

* cleanup

* Update projects/gateway2/reports/status.go

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* consolidate reporting components

---------

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
extracted from previous PR: make go test ./... work again (#8907)
above PR also fixed the CLI tests (e.g. glooctl check) to work with
GGv2. TODO has been added to add this back in later, but did not want to
take this on as the existing patches remove the v1 tests.
cherry-pick of refactor route status (#8912)
.PHONY: test
test:
go test -ldflags=$(LDFLAGS) ./...

.PHONY: test-full
test-full:
go test -ldflags=$(LDFLAGS) -count=1 ./...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference here?

Copy link
Contributor Author

@lgadban lgadban Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the -count=1 flag is a way of preventing go from caching test results; I ran into several instances where test results were cached and didn't accurately reflect the state of the codebase.

As there are valid reasons for caching tests, @yuval-k suggested that rather than modifying the existing test target, we can add a separate target specifically for the non-cached behavior.

edit: useful stackoverflow for posterity -- https://stackoverflow.com/a/48882892

Copy link
Member

@EItanya EItanya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes LGTM, just awaiting reset of HEAD branch

@lgadban lgadban changed the base branch from v2.0.x-pre-native-xlate to v2.0.x December 6, 2023 17:07
@lgadban lgadban marked this pull request as ready for review December 6, 2023 17:08
@EItanya EItanya merged commit 200abc6 into v2.0.x Dec 7, 2023
2 of 3 checks passed
@EItanya EItanya deleted the revert-to-proxy-ir branch December 7, 2023 15:41
jenshu pushed a commit that referenced this pull request Jan 18, 2024
* Adding quickstart for Helm (#8884)

* Adding quickstart for Helm

* Update README.md

* add logs

patch modified off PR (#8886) as we no longer want the native translation
updates.

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Lawrence Gadban <lawrence.gadban@solo.io>

* fix no match (#8879)

* Add Request Mirror Gateway API Filter (#8890)

Updated for Gloo Edge Proxy IR

---------

Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* add logs from previous PR #8892

* first drop of status cleanup (#8889)

* use types.NN for GatewayReports

* consolidate report creation

* reduce visibility of GatewayReport fields

* extract status building from syncer

* more narrowing viz, add Getters, first unit test for status building

* factor out condition boilerplate, more tests

* fix missed compile issue in translator tests

* add basic test for LastTransitionTime

* better testing

* cleanup

* Update projects/gateway2/reports/status.go

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* consolidate reporting components

---------

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* add label helper to helm templates

extracted from previous PR: make go test ./... work again (#8907)
above PR also fixed the CLI tests (e.g. glooctl check) to work with
GGv2. TODO has been added to add this back in later, but did not want to
take this on as the existing patches remove the v1 tests.

* refactor route status

cherry-pick of refactor route status (#8912)

* add missed conformance args from orig. PR (#8890)

* kick ci

---------

Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.com>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
soloio-bulldozer bot added a commit that referenced this pull request Feb 1, 2024
* Sketch controller (#45)

* controller sketch

* controllers

* helper functions, indexers

* maincompile

* main

* wip

* query

* gen-cli

* query secrets

* example-code

* git mv edge2/ gateway2

* cleanup

* cleanup2

* cleanup3

* Improve CI for gateway-main (#46)

* rename .github to disable github actions

* change cloudbuild.yaml to prevent build-bot running

* change query to have object in the args (#47)

* change query to have object in the args

To confirm that we use the right "from" field, ask for the whole object in the query args, and not just the ns

* use obj and infer gk

* fix comment

comments are bad

* singular

* some tests for query (#49)

* some tests for query

* more tests and pr comments

* more tests and fixes

* mroe test

* build + docker +helm + comformance (#51)

* ability to deploy to kind so we can run conformance

not yet working

* helming around, accepting status for gw class

* set observed generation on condition

* don't create gw for conformance test

* minor changes

* cleanup

* separate cp and dp

* cleanup

* allow more than one ports

* pr comments

* controlPlane.enabled

* fix makefile

* Gw main/ listener translation (#61)

* solo gw stubs

* wip: translator

* wip: http gwv2 translation

* wip: listener tx complete, ready for vhost + validation

* merge http filter chain

* finish core listener tx; stub vhost tx

* remove unused

* Auto provision gateway resources (#62)

* initial code to create GW

* auto provision by default
add ports to deployer

* fixes and some PR comments

* fix event filtering

* write addresses to gw; need to add tests

* only reconcile gw when generation changes

* support provisioning with different releases

* try approach 2 for statues

* env test for status setting

* pr comments

* update to v1 (#63)

* fix gw route query to make sure the http routes match (#64)

* fix gw route query to make sure the http routes match

* add and pass ci

* more ci

* make in g2 dir

* naming

* naming

* xds syncer (#60)

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* Initial validate (#67)

* solo gw stubs

* wip: translator

* wip: http gwv2 translation

* wip: listener tx complete, ready for vhost + validation

* merge http filter chain

* wip: initial impl of GW/Listener validation

* wip: working sketch of reporter; passing tests

* wip: begin testing for conditions

* simplify condition type on reporter

* add status checks to tests

* move listener validation back to listener package

* add gateway structure to report impl

* use ListenerStatus api type

* add support for allowedRoutes

* cleaup

* add tests for explicit allowedRoutes

* cleanup and reorg

* correctly track invalid listeners & routes

* more cleanup

* todo

---------

Co-authored-by: Scott Weiss <sdw35@cornell.edu>

* Gw main/translation httproute (#65)

* solo gw stubs

* wip: translator

* wip: http gwv2 translation

* wip: listener tx complete, ready for vhost + validation

* merge http filter chain

* finish core listener tx; stub vhost tx

* remove unused

* wip: route translator

* http route translator, fixes for http listener

* clean up todos

* Stub Out Endpoints and Upstream Discovery (#59)

* Add simple uds transslator

* goimports -w .

* format plugin

* update kube plugin to export a function that our new discvoery can rely on

* add stubs for translator for discovery

* add placeholder for legacy impl

* formatting

* simplify code

* add changelog

* query part 2 (#66)

* query part 2

* add parentref

* add conditions

* compile fix

* compile fix after merge

* simple secrets reconciler (#68)

* first pass route validation, handle nil hostnames on listeners (#70)

* create ListenerCondition type

* fix unnecessary guard on map access (go-static)

* add initial route validation

* handle empty/nil hostnames on listeners

* Gw main/translation yaml test (#72)

* testing and fixes for http translation

* get test passing

* nit

* fix import cycle, gofmt

* remove workaround

* add a server to tie everything together (#71)

* add a server to tie everything together

* more wiring

* enabled devmode

* de-pike

* Eitanya/single translation (#74)

* single translation spot

* compiles and runs

* fix compile issue in tests

* Eitanya/route sorting (#75)

* initial route-sorting

* tests are passing

* update golden

* swapped it all to use the httpRoute and idx as fallbacks

* also check NS/NAME

* oops

* move sortable to separate package

* initial sync status (#78)

* first drop working listener status

* handle gateway top-level conditions

* make xds work (#77)

* make xds work
main bug is there were 2 caches

* use envoy-gloo; use unprivileged port

* use rc2 for conformance to work

* pr comments

* tidy

* add no conflicts to healthy listeners (#79)

* add no conflicts to healthy listeners

* add resolvedrefs to healthy listeners

* add per-conditionType logic for missing conditions

* ssl termination (#76)

* ssl termination

* add ssl secret validation

* add ssl secret validation

* Eitanya/check v2 (#73)

* gateway checking is done

* compiles

* route status code

* with v1 changes

* a couple more changes

* remove ingress/knative

* also apply CRDs with glooctl

* pike

* install/uninstall work

* oops

* fix conditions for Gateway Class

* change back protocol on svc

* removed default gateway from the chart

* default to LB

* oops

* fix env tests with svc status hack due to LB

* naming

* use index func logic

* check for existence of the CRDs

* upped template to v1, changed logic to be more permissinve

* gatewayName

* simple version of port translation (#83)

* Sync route status (#82)

* init route report

* cleanup

* switch to per-parentRef reporting on routes

* report on route-parent relationship errors

* sync route status

* cleanup

* don't checkout gw repo for tests (#84)

* don't checkout gw repo for tests

* add conformance build tag; simplify kind

* fmt

* rename helm-chart (#80)

* rename helm-chart

* rename folder

* change dir name

* updated values/versions

* add labels so that glooctl version works

* make new commands more flexible

* file for CRDs, add programmed condition

* bad comment

* change version to alpha1 instead

* comments

* rename the gateway class name

* use standar

* use relative dir

* attached routes (#87)

* Fixes statuses temporarily (#88)

* re-add glooctl proxy commands

* various status fixes

* report tls errors on listeners (#86)

* report tls errors on listeners

* check specific errors on cert validation

* fix make (#89)

* more ci (#90)

* dont pre-check secret ref (#91)

* first translator plugin: header modifier (#85)

* implement plugin arch, w/ header modifier

* fix compile

* fix test

* redirect plugin

* add plugin

* add unit tests

* whoops

* rename compoenents to official naming scheme (#92)

* rename compoenents to official naming scheme

* fix unit tests

---------

Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* make conformance-GatewayWithAttachedRoutes passing (#93)

* make conformance-GatewayWithAttachedRoutes passing

* set status for listener with meta

* fix reason

* update to ghcr (#94)

* set gwNs for ML and reverse cert/key for TLS validation (#96)

* Revert "rename compoenents to official naming scheme (#92)" (#97)

This reverts commit b79b0e2.

* fix header order and match type (#102)

* support all hostnames (#98)

* i think this was a bad merge (#99)

* i think this was a bad merge

* fix test

* fix conformance-HTTPRouteInvalidNonExistentBackendRef (#100)

* listeners with more than one port are working now (#101)

* add unknown kind error if kind not in scheme (#103)

Co-authored-by: Lawrence G <lawrence.gadban@solo.io>

* gw semantics (#104)

* fix edge case (#106)

* fix empty backedRef with filters (#107)

* testing release on tag (#105)

* update release-1.0.0 (that includes kubernetes-sigs/gateway-api#2548) (#108)

* version fixes (#109)

* release glooctl

* oops

* Makefile

* no windows

* add https redirect hopefully

* url rewrite basic

* fix redirect and run conformnce

* add more conformance tests

* upload SHA

* use proper rewrite

* change regex

* works

* fix Makefile phony targets

* Gloo Gateway v2 readme (#8866)

* Gloo Gateway v2 readme

* added quickstart instructions

* added notes

* Update README.md

* some fixes

* Add files via upload

* Update README.md

* Update README.md

* fixed the ordering and added local HTTPBIN

* switched to local file

* Update README.md

---------

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* make README even simpler

* Logo and description update (#8872)

* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* remove old flags from glooctl (#8871)

* Logo update (#8878)

* Add files via upload

* Add files via upload

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Revert to proxy ir (#8945)

* Adding quickstart for Helm (#8884)

* Adding quickstart for Helm

* Update README.md

* add logs

patch modified off PR (#8886) as we no longer want the native translation
updates.

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Lawrence Gadban <lawrence.gadban@solo.io>

* fix no match (#8879)

* Add Request Mirror Gateway API Filter (#8890)

Updated for Gloo Edge Proxy IR

---------

Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* add logs from previous PR #8892

* first drop of status cleanup (#8889)

* use types.NN for GatewayReports

* consolidate report creation

* reduce visibility of GatewayReport fields

* extract status building from syncer

* more narrowing viz, add Getters, first unit test for status building

* factor out condition boilerplate, more tests

* fix missed compile issue in translator tests

* add basic test for LastTransitionTime

* better testing

* cleanup

* Update projects/gateway2/reports/status.go

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* consolidate reporting components

---------

Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>

* add label helper to helm templates

extracted from previous PR: make go test ./... work again (#8907)
above PR also fixed the CLI tests (e.g. glooctl check) to work with
GGv2. TODO has been added to add this back in later, but did not want to
take this on as the existing patches remove the v1 tests.

* refactor route status

cherry-pick of refactor route status (#8912)

* add missed conformance args from orig. PR (#8890)

* kick ci

---------

Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.com>
Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>

* add RoutePlugins (#9021)

* wip: working RouteOptions as ExtensionRef

* add new format for extensionplugins

* extract extensionplugins to a discrete registry

* review feedback

* cleaup

* cleanup

* condense filter/plugin apply

* move routeoptions extension plugin to correct package structure

* cleanup

* introduce RoutePlugins with the impl for HTTPFilterPlugins

* remove extensionRef for now

* package structure re-org

* remove RouteOptions work for now

* localize httpfilterpluginregistry

* convert filterplugins to RoutePlugins

* generalize PluginRegistry (#9025)

* generalize PluginRegistry

* commentary

* add compile-time type assertions for plugins

* update name of RoutePlugin method

* use full type definition for base plugin interface

* track generation at report time (#8996)

* cleanup

* track generation at report time

* use common buildRoutesPerHost() for http & https

* enforce reports must be initialized for translated object

* handle missing reports gracefully

* commentary

* chore: reduce plugins visibility

* add RouteOption route plugin (#9040)

* add RouteOption route plugin

* cleanup

* commentary

* graceful & correct error handling

* reenable gh workflows

* add back some files

* remove changelogs

* revert changelogs

* remove changelogs for now

* add back cli stuff

* add back deleted stuff

* fix lint errors

* add back ingress

* docs gen

* v1 vs v2

* skip gateway2 for now

* fix?

* try reverting

* remove cl

* add back portredirect

* only set port redirect if not 0

* merge from main

* add translation mode

* more descriptive

* use new flag

* add field to test proxy

* remove new field from Proxy

* use label

* remove cl

* delete file

* add labels to test

* revert changelogs

* try again

* fix changelogs

* Adding changelog file to new location

* Deleting changelog file from old location

* codegen

* add back knative delete func

* change port_redirect to UInt32Value

* Adding changelog file to new location

* Deleting changelog file from old location

* some cleanup

* use context

* Update README.md

---------

Co-authored-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Co-authored-by: Sam Heilbron <SamHeilbron@gmail.com>
Co-authored-by: ilackarms <sdw35@cornell.edu>
Co-authored-by: Eitan Yarmush <eitan.yarmush@solo.io>
Co-authored-by: Lawrence G <lawrence.gadban@solo.io>
Co-authored-by: Nadine Spies <17709352+Nadine2016@users.noreply.github.com>
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: changelog-bot <changelog-bot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants