Skip to content

Commit

Permalink
fix typo, update comments for why we don't include ent meta for query
Browse files Browse the repository at this point in the history
options
  • Loading branch information
jm96441n committed Jul 11, 2024
1 parent eee639b commit 255d58e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changelog/4153.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:bug
terminating-gateway: Fix generated acl policy for external services to include the namespace and parition block if they are enabled.
terminating-gateway: Fix generated acl policy for external services to include the namespace and partition block if they are enabled.
```
5 changes: 3 additions & 2 deletions control-plane/catalog/registration/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (c *RegistrationCache) run(log logr.Logger, namespace string) {

if err := c.k8sClient.Get(c.ctx, types.NamespacedName{Name: svc, Namespace: namespace}, registration); err != nil {
if !k8serrors.IsNotFound(err) {
log.Error(err, "unable to get registration", "svcName", svc)
log.Error(err, "unable to get registration", "svcName", svc, "namespace", namespace)
}
continue
}
Expand Down Expand Up @@ -263,6 +263,7 @@ func (c *RegistrationCache) updateTermGWACLRole(log logr.Logger, registration *v
return err
}

// we don't need to include the namespace/partition here because all roles and policies are created in the default namespace for consul-k8s managed resources.
writeOpts := &capi.WriteOptions{}

if existingPolicy == nil {
Expand Down Expand Up @@ -335,8 +336,8 @@ func (c *RegistrationCache) removeTermGWACLRole(log logr.Logger, registration *v
var mErr error
for _, termGW := range termGWsToUpdate {

// we don't need to include the namespace/partition here because all roles and policies are created in the default namespace for consul-k8s managed resources.
queryOpts := &capi.QueryOptions{}

writeOpts := &capi.WriteOptions{}

roles, _, err := client.ACL().RoleList(queryOpts)
Expand Down

0 comments on commit 255d58e

Please sign in to comment.