-
Notifications
You must be signed in to change notification settings - Fork 460
feat: add controller namespace field to infrastructure render #5937
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5937 +/- ##
==========================================
- Coverage 65.78% 65.78% -0.01%
==========================================
Files 217 217
Lines 36077 36056 -21
==========================================
- Hits 23734 23718 -16
+ Misses 10864 10860 -4
+ Partials 1479 1478 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -47,6 +47,9 @@ type Infra struct { | |||
// Namespace is the Namespace used for managed infra. | |||
Namespace string | |||
|
|||
// ControllerNamespace is the Namespace used for Envoy Gateway controller. |
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.
shouldnt this be available in Runner Config ?
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.
Runner config calls the NewInfra, I'm adding this field to be able to differentiate the namespace used for Infra and Controller
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.
referring to
Config |
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.
controller namespace will be fetched from the Config
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.
so, we dont have access to the runner context anymore ? is that the issue ?
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.
@arkodg runner context is not in the Infra, only the needed fields are passed down to the Infra structure.
func NewInfra(cli client.Client, cfg *config.Server) *Infra {
var infraNamespace string
if !cfg.EnvoyGateway.GatewayNamespaceMode() {
infraNamespace = cfg.ControllerNamespace
}
return &Infra{
Namespace: infraNamespace,
ControllerNamespace: cfg.ControllerNamespace, # cfg is runner config
DNSDomain: cfg.DNSDomain,
EnvoyGateway: cfg.EnvoyGateway,
Client: New(cli),
logger: cfg.Logger.WithName(string(egv1a1.LogComponentInfrastructureRunner)),
}
}
3c73692
to
d4f541f
Compare
83dc8ef
to
be1d701
Compare
Can we also rename the
|
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
Signed-off-by: Karol Szwaj <[email protected]>
794b9ae
to
dfc11ce
Compare
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 thanks!
* Add controller namespace to infra Signed-off-by: Karol Szwaj <[email protected]> * make gen Signed-off-by: Karol Szwaj <[email protected]> * rebase code and add controller namespace helper Signed-off-by: Karol Szwaj <[email protected]> * rename to envoy namespace Signed-off-by: Karol Szwaj <[email protected]> * rename to ControllerNamespace Signed-off-by: Karol Szwaj <[email protected]> --------- Signed-off-by: Karol Szwaj <[email protected]> Signed-off-by: melsal13 <[email protected]>
What type of PR is this?
What this PR does / why we need it:
Added new infra resource render field - controller namespace, this helps to distinguish namespace names in the infra processing.
Which issue(s) this PR fixes:
Fixes #2629
Followup to the #5137
Release Notes: No