Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

catalog: Simplify GetServicesForServiceAccount() #1568

Merged

Conversation

draychev
Copy link
Contributor

In this PR:

  • remove a level of indentation by using continue in the constants.AzureProviderName check
  • variable service conflicts with imported package - renamed to svc
  • simplified slice allocation and returning of empty slice

No functional code changes in this PR.

Please mark with X for applicable areas.

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ x ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests / CI System [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

@draychev draychev requested a review from ksubrmnn August 18, 2020 03:45
@draychev draychev requested a review from a team as a code owner August 18, 2020 03:45
michelleN
michelleN previously approved these changes Aug 18, 2020
pkg/catalog/service.go Outdated Show resolved Hide resolved
@draychev
Copy link
Contributor Author

Merged from main, removed one log message (seems redundand), rewrote the log messages for clarity.
PTAL

} else {
log.Trace().Msgf("[%s] Found services %v for Name=%s", provider.GetID(), services, sa)
services = append(services, providerServices...)
if provider.GetID() == constants.AzureProviderName {
Copy link
Contributor

@eduser25 eduser25 Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just remove AzureProvider from endpointProviders for the time being instead?

I think it'll look cleaner overall, and once we retake the VM endpoints effort we can always add it back

edit: I'm assuming by this check, this is not currently used by anything at all

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eduser25 - we could inded remove the Azure Endpoint Provider stuff until we have Identity + VM representation in SMI.

@draychev draychev merged commit 5d493c7 into openservicemesh:main Aug 19, 2020
@draychev draychev deleted the simplify-GetServicesForServiceAccount branch August 19, 2020 18:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants