connect components using watchable#197
Conversation
45987f3 to
376ae4a
Compare
There was a problem hiding this comment.
Instead of passing in logger logr.Logger, consider using a context and then calling logr.FromContext(ctx), xref.
There was a problem hiding this comment.
I always prefer using function args to pass data around over context unless I absolutely need to ( and when the data is tied to a context rather than the package).
I can change the function signature and use a Config object instead to reduce the number of params passed to it
There was a problem hiding this comment.
Each controller should have a unique name. This is typically used to tie logging messages back to a specific controller, xref.
There was a problem hiding this comment.
this ties to gwapiv1b1.GatewayController(name) / class controller, not the same of the sw controller/reconciler
There was a problem hiding this comment.
The value of controller should continue to be exposed to users to support running multiple Envoy Gateways in a cluster.
There was a problem hiding this comment.
not sure what you are referring to here
LukeShu
left a comment
There was a problem hiding this comment.
Yeah, this is basically how I think watchable should be used. I left a suggestion to simplify the simple cases. If we think we'll have a lot of non-map uses, adding a watchable.Value would be good.
There was a problem hiding this comment.
Do we expect to track multiple sets of resources, and this is a short-term hack? Or is this a hack around not being able to have a single "watchable.Value" without wrapping it in a map?
There was a problem hiding this comment.
its the latter, wrapping it to return a single value embedded in a map (with a single key-value pair)
youngnick
left a comment
There was a problem hiding this comment.
Took a really quick look over this and had one naming thing, sorry to be picky, but I think it could really bite us down the line if we don't fix it now.
I'll have more of a look at the rest later.
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
from envoyproxy#189 Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
|
this PR is ready to be reviewed now. I'd prefer not to increase the size of this PR anymore and address other issues in a follow up PR Two issue I'd like to highlight
from here
but im wondering if this is by design @LukeShu ? |
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
|
looks like the 1st error highlighted in #197 (comment) is not an issue, reverted the code, and installed the right version of GAPI CRDs(0.5.0) which installed the v1beta1 version for HTTPRoute which is used internally in the code, thank you @chauhanshubham for pointing this out 🙇 |
danehans
left a comment
There was a problem hiding this comment.
Please review my feedback. I'm not opposed to approving the PR with the suggested changes or filing issues to track the suggested changes.
| // setupServices starts all the services required for the Envoy Gateway to | ||
| // fulfill its tasks. |
There was a problem hiding this comment.
The func name states it starts all the services but it's starting runners. I'm not going to block the PR on this but I prefer we use service instead of runner, e.g. providerService. I find it easier to build a mental model around service.
There was a problem hiding this comment.
I reverted all the code based on @youngnick's suggestion, I'll rename this function to setupRunners make this more logical. This name is not final and would prefer if we can revisit this in the near future.
| kind: Deployment | ||
| metadata: | ||
| name: envoy-gateway | ||
| namespace: system |
There was a problem hiding this comment.
This change is unneeded due to https://github.com/envoyproxy/gateway/blob/main/internal/provider/kubernetes/config/default/kustomization.yaml#L1-L2
| - name: envoy-gateway | ||
| args: | ||
| - "--health-probe-bind-address=:8081" | ||
| - "--metrics-bind-address=127.0.0.1:8080" | ||
| - "--leader-elect" |
There was a problem hiding this comment.
Why are these changes required?
There was a problem hiding this comment.
these args were being appended to the envoy-gateway container, which I dont think is the intent
| metadata: | ||
| name: envoy-gateway | ||
| namespace: system | ||
| namespace: envoy-gateway-system |
There was a problem hiding this comment.
This change is unneeded due to https://github.com/envoyproxy/gateway/blob/main/internal/provider/kubernetes/config/default/kustomization.yaml#L1-L2
There was a problem hiding this comment.
uncommenting the above line changes the name of the envoy-gateway pod to envoy-gateway-envoy-gateway, do we want that ?
| # Note that it should also match with the prefix (text before '-') of the namespace | ||
| # field above. | ||
| namePrefix: envoy-gateway- | ||
| # namePrefix: envoy-gateway- |
There was a problem hiding this comment.
See my other comments in reference to changing this. Not sure why this change is needed.
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
|
Wait, is there no CI checking that |
not yet, raised #213 to track it |
plan on fixing additional issues in follow up PRs
Signed-off-by: Arko Dasgupta arko@tetrate.io