-
Notifications
You must be signed in to change notification settings - Fork 277
[HOLD] chore: convert ServiceIdentity to struct #3732
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3732 +/- ##
==========================================
+ Coverage 67.65% 69.87% +2.21%
==========================================
Files 181 185 +4
Lines 8772 8986 +214
==========================================
+ Hits 5935 6279 +344
+ Misses 2804 2658 -146
- Partials 33 49 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
b6530ef
to
d8c5ae4
Compare
Signed-off-by: Allen Leigh <allenlsy@gmail.com>
d8c5ae4
to
5c6126a
Compare
type ServiceIdentity struct { | ||
ServiceAccount string | ||
Namespace string | ||
ClusterDomain string |
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.
In the future, we will need to support non k8s env such as VMs. We most likely will continue to use a ServiceAccount to map non k8s identity types (such as service principals).
ClusterDomain string | |
TrustDomain string |
serviceIdentity := lb.serviceIdentity | ||
proxyIdentity := identity.ServiceIdentity{ | ||
ServiceAccount: serviceIdentity.ServiceAccount, | ||
Namespace: serviceIdentity.Namespace, | ||
ClusterDomain: serviceIdentity.ClusterDomain, | ||
} | ||
trafficTargets, err := lb.meshCatalog.ListInboundTrafficTargetsWithRoutes(serviceIdentity) |
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.
serviceIdentity := lb.serviceIdentity | |
proxyIdentity := identity.ServiceIdentity{ | |
ServiceAccount: serviceIdentity.ServiceAccount, | |
Namespace: serviceIdentity.Namespace, | |
ClusterDomain: serviceIdentity.ClusterDomain, | |
} | |
trafficTargets, err := lb.meshCatalog.ListInboundTrafficTargetsWithRoutes(serviceIdentity) | |
trafficTargets, err := lb.meshCatalog.ListInboundTrafficTargetsWithRoutes(lb.serviceIdentity) |
Namespace: serviceIdentity.Namespace, | ||
ClusterDomain: serviceIdentity.ClusterDomain, | ||
} | ||
trafficTargets, err := lb.meshCatalog.ListInboundTrafficTargetsWithRoutes(serviceIdentity) | ||
if err != nil { | ||
log.Error().Err(err).Msgf("Error listing allowed inbound traffic targets for proxy identity %s", proxyIdentity) |
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.
s/proxyIdentity/lb.serviceIdentity
Signed-off-by: Allen Leigh allenlsy@gmail.com
Description:
Use struct to define ServiceIdentity, to provide more context.
Issue #3188
Affected area:
Please answer the following questions with yes/no.
No
No