-
Notifications
You must be signed in to change notification settings - Fork 160
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
init: azure rbac aks service discovery #1311
init: azure rbac aks service discovery #1311
Conversation
56f0943
to
29cc384
Compare
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
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.
Looking good, added some feedback
akka-discovery-azure-api/src/main/scala/akka/discovery/azureapi/Settings.scala
Outdated
Show resolved
Hide resolved
port = maybePort, | ||
address = Some(InetAddress.getByName(ip)) | ||
) | ||
} |
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.
Would be nice if you could split this huge for comprehension into somewhat more digestible pieces, not exactly sure how, maybe some helper methods like runningPods(...), portFor(...)
to get a bit higher level operations you can then use in a for comprehension?
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
* INTERNAL API | ||
*/ | ||
@InternalApi private[azureapi] object JsonFormat extends SprayJsonSupport with DefaultJsonProtocol { | ||
// If adding more formats here, remember to also add in META-INF/native-image reflect 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.
Not entirely sure we need to support native image with this module, but if we should, there should be a META-INF/native-image/com.lightbend.akka.management.akka-discovery-azure-api/reflect-config.json
listing the model classes. You can look at the corresponding reflect-config.json
in lease-kubernetes for an example.
jsonFormatN
inspects them using reflection so must explicitly be made available for native image/graal through such 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.
I plan on doing native image later in a different PR.
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.
Looking good
...iscovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAKSServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
b29c597
to
cd52a08
Compare
cd52a08
to
2d02c43
Compare
2d02c43
to
d304117
Compare
discovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
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.
I read through the PR changes and gave some comments on the code.
Would probably have some way of testing this as well.
discovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
import system.dispatcher |
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.
Should probably be another dispatcher
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.
I'm not sure about it 🤔
discovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
discovery-azure-api/src/main/scala/akka/discovery/azureapi/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
discovery-azure-api/src/main/scala/akka/discovery/azureapi/JsonFormat.scala
Outdated
Show resolved
Hide resolved
15839b5
to
76743d7
Compare
add: License file refactor: general clean up
76743d7
to
148202e
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.
looking good, just something minor...
...azure-api/src/main/scala/akka/discovery/azureapi/rbac/aks/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...azure-api/src/main/scala/akka/discovery/azureapi/rbac/aks/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...azure-api/src/main/scala/akka/discovery/azureapi/rbac/aks/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
...azure-api/src/main/scala/akka/discovery/azureapi/rbac/aks/AzureRbacAksServiceDiscovery.scala
Outdated
Show resolved
Hide resolved
discovery-azure-api/src/test/scala/akka/discovery/azureapi/AzureApiSpec.scala
Outdated
Show resolved
Hide resolved
discovery-azure-api/src/test/scala/akka/discovery/azureapi/rbac/aks/JsonFormatSpec.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Johan Andrén <[email protected]>
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, great work!
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, great work @girdharshubham
Checklist