-
Notifications
You must be signed in to change notification settings - Fork 334
fix: use correct flag when translating namespaces #2353
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ func (t ResourceTranslator) NormalizedResourceReference(kind, namespace string, | |
| } | ||
|
|
||
| func (t ResourceTranslator) Namespace(namespace string) string { | ||
| return namespaces.ConsulNamespace(namespace, t.EnableK8sMirroring, t.ConsulDestNamespace, t.EnableK8sMirroring, t.MirroringPrefix) | ||
| return namespaces.ConsulNamespace(namespace, t.EnableConsulNamespaces, t.ConsulDestNamespace, t.EnableK8sMirroring, t.MirroringPrefix) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was just an oversight. If mirroring wasn't enabled, then the returned namespace would always be Compare to the function signature for |
||
| } | ||
|
|
||
| // ToAPIGateway translates a kuberenetes API gateway into a Consul APIGateway Config Entry. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -212,7 +212,7 @@ func (r *GatewayController) Reconcile(ctx context.Context, req ctrl.Request) (ct | |
| r.gatewayCache.RemoveSubscription(nonNormalizedConsulKey) | ||
| // make sure we have deregister all services even if they haven't | ||
| // hit cache yet | ||
| if err := r.deregisterAllServices(ctx, consulKey); err != nil { | ||
| if err := r.deregisterAllServices(ctx, nonNormalizedConsulKey); err != nil { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use the
|
||
| log.Error(err, "error deregistering services") | ||
| return ctrl.Result{}, err | ||
| } | ||
|
|
||
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.
Just being extra careful when we go to set the namespace on the query