-
Notifications
You must be signed in to change notification settings - Fork 469
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
more cleanup #10413
more cleanup #10413
Conversation
don't start gloo anymore. use upstream go control plane remove gloov1 objects from gateway (settings still remain)
…needs to propagate to the listener. also need to make sure we don't override status of other gateway-api controllers
provides GME-style snapshots for debugging etc but is dependent on the gloov1 apiSnapshot schema. |
…added gw alpha2 (always add it instead)
restConfig *rest.Config, | ||
uccBuilder krtcollections.UniquelyConnectedClientsBulider, | ||
extraPlugins []extensionsplug.Plugin, | ||
extraGwClasses []string, // TODO: we can remove this and replace with something that watches all GW classes with our controller name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
FWIW, I think the initial point of this was to allow extensions to provide classnames
func NewControlPlane(ctx context.Context, | ||
bindAddr net.Addr, | ||
callbacks xdsserver.Callbacks) (envoycache.SnapshotCache, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nits: ctx
on a new line, return signature on new line; same for NewControlPlaneWithListener
@@ -128,23 +146,18 @@ func StartGGv2WithConfig(ctx context.Context, | |||
}, krt.WithName("GlooSettingsSingleton")) | |||
|
|||
logger.Info("creating reporter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.Info("creating reporter") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, good iteration on cleanup, will continue to be an ongoing process
tests are failing so can reapprove if larger changes are needed to get things passing
re failing tests:
|
@@ -1,4 +1,4 @@ | |||
package translator | |||
package gatewaytranslator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we name the package gateway
(same as directory name) otherwise we will get confused when importing it
@@ -1,4 +1,4 @@ | |||
package translator_test | |||
package gatewaytranslator_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment - gateway_test
@@ -1,4 +1,4 @@ | |||
package translator_test | |||
package gatewaytranslator_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package gatewaytranslator_test | |
package gateway_test |
same comment
@@ -288,8 +289,8 @@ func (v *validator) validateProxiesAndExtensions(ctx context.Context, snapshot * | |||
|
|||
validatingK8sGateway := isK8sGatewayProxy(opts.Resource) | |||
if validatingK8sGateway { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic seems wrong? why are we translating gloo edge proxies if it's a k8sgateway proxy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this code will get deleted anyway (its from ggv2 validation where a gateway is translated to a proxy); just didn't want to do this in this PR.
@@ -26,6 +26,10 @@ const ( | |||
) | |||
|
|||
func NewPlugin(ctx context.Context, commoncol *common.CommonCollections) extensionsplug.Plugin { | |||
if !commoncol.InitialSettings.Spec.GetGloo().GetIstioOptions().GetEnableIntegration().GetValue() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here why we return empty plugin if istio integration is enabled?
|
||
import "github.com/solo-io/gloo/projects/gateway2/ir" | ||
|
||
func (h *RoutesIndex) TEST() []ir.HttpRouteIR { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this file for, do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can deleted that, i used it temporary for a test
@@ -33,20 +32,7 @@ func (s *ProxyTranslator) syncXds( | |||
// TODO: me may need to copy this to not change krt cache. | |||
// TODO: this is also may not be needed now that envoy has | |||
// a default initial fetch timeout | |||
snap.MakeConsistent() | |||
s.xdsCache.SetSnapshot(proxyKey, snap) | |||
// snap.MakeConsistent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add this back later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think not, but we can discuss.
i think we can build the code such that, we no longer need sanitizers
return p.snap.Equal(in.snap) | ||
// check that all the versions are the equal | ||
for i, r := range p.snap.Resources { | ||
if r.Version != in.snap.Resources[i].Version { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the snapshot resources guaranteed to be sorted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, its an array where the index is the resource type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm good with merging so we can iterate
bring in control plane to gateway
don't start gloo anymore.
use upstream go control plane
remove gloov1 objects from gateway (settings still remain)
Note : now that gloo doesn't start anymore we lose the gloo features that are not the control plane. these come to mind:
opencensus
. so this is an opportunity to useotel
instead. Stats should be served on their own port.