-
Notifications
You must be signed in to change notification settings - Fork 160
feat: Native-image metadata and docs #1264
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
434cb7d
feat: Native-image metadata and docs
johanandren ceceaa3
figured out a way to test
johanandren b0a94fa
Fix JMX link
johanandren 6bd8ff2
Test coverage for k8 lease and rolling update
johanandren 04bf0ae
bump Akka 2.9.2 and Akka HTTP 10.6.1
johanandren c77f7c4
better logic to pick up snapshot/local version
johanandren 6ef752c
Update native-image.md
johanandren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...image/com.lightbend.akka.management/akka-management-cluster-bootstrap/reflect-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[ | ||
{ | ||
"name": "akka.management.cluster.bootstrap.LowestAddressJoinDecider", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.actor.ActorSystem", "akka.management.cluster.bootstrap.ClusterBootstrapSettings"] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.bootstrap.ClusterBootstrap$", | ||
"fields": [ | ||
{ | ||
"name": "MODULE$" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.bootstrap.ClusterBootstrap", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.actor.ExtendedActorSystem"] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.bootstrap.contactpoint.HttpBootstrapJsonProtocol$SeedNode", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.bootstrap.contactpoint.HttpBootstrapJsonProtocol$ClusterMember", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.bootstrap.contactpoint.HttpBootstrapJsonProtocol$SeedNodes", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
} | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...tive-image/com.lightbend.akka.management/akka-management-cluster-http/reflect-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[ | ||
{ | ||
"name": "akka.management.cluster.ClusterHttpManagementRouteProvider$", | ||
"fields": [ { | ||
"name": "MODULE$" | ||
} ] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.javadsl.ClusterMembershipCheck", | ||
"methods": [{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.actor.ActorSystem"] | ||
}] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.scaladsl.ClusterMembershipCheck", | ||
"methods": [{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.actor.ActorSystem"] | ||
}] | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ClusterUnreachableMember", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ClusterMember", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ClusterMembers", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ClusterHttpManagementMessage", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ShardEntityTypeKeys", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ShardRegionInfo", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.management.cluster.ShardDetails", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
} | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ive-image/com.lightbend.akka.management/akka-discovery-kubernetes-api/reflect-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[ | ||
{ | ||
"name": "akka.discovery.kubernetes.KubernetesApiServiceDiscovery", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": [ | ||
"akka.actor.ActorSystem" | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList$ContainerPort", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.Container", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.PodSpec", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.ContainerStatus", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.PodStatus", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.Pod", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.discovery.kubernetes.PodList.Metadata", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
} | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Built-in JMX Management | ||
|
||
Akka has built-in JMX beans which you can use to manage the cluster, read more about them in the Akka | ||
documentation: @extref:[Cluster Usage: JMX](akka:cluster-usage.html#cluster-jmx) | ||
documentation: @extref:[Cluster Usage: JMX](akka:additional/operations.html#jmx) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Building Native Images | ||
|
||
Building native images with Akka HTTP is supported out of the box for the following modules: | ||
|
||
* akka-management | ||
* akka-management-cluster-bootstrap | ||
* akka-management-cluster-http | ||
* akka-discovery-kubernetes-api | ||
* akka-lease-kubernetes | ||
* akka-rolling-update-kubernetes | ||
|
||
Other modules can likely be used but will require figuring out and adding additional native-image metadata. | ||
|
||
For details about building native images with Akka in general, see the @extref[Akka Documentation](akka:additional/native-image.html). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...-INF/native-image/com.lightbend.akka.management/akka-lease-kubernetes/reflect-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"name": "akka.coordination.lease.kubernetes.KubernetesLease", | ||
"methods": [ | ||
{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.coordination.lease.LeaseSettings", "akka.actor.ExtendedActorSystem"] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "akka.coordination.lease.kubernetes.internal.LeaseCustomResource", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.coordination.lease.kubernetes.internal.Metadata", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
}, | ||
{ | ||
"name": "akka.coordination.lease.kubernetes.internal.Spec", | ||
"allDeclaredFields": true, | ||
"queryAllPublicMethods": true | ||
} | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...s/META-INF/native-image/com.lightbend.akka.management/akka-management/reflect-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"name": "akka.management.scaladsl.AkkaManagement$", | ||
"fields": [ { | ||
"name": "MODULE$" | ||
} ] | ||
}, | ||
{ | ||
"name": "akka.management.HealthCheckRoutes", | ||
"methods": [{ | ||
"name": "<init>", | ||
"parameterTypes": ["akka.actor.ExtendedActorSystem"] | ||
}] | ||
} | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
target/ | ||
|
||
.settings | ||
.project | ||
.classpath | ||
|
||
.idea | ||
*.iml | ||
|
||
.metals | ||
.bloop | ||
.bsp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name := "native-image-tests" | ||
|
||
version := "1.0" | ||
|
||
scalaVersion := "2.13.12" | ||
|
||
resolvers += "Akka library repository".at("https://repo.akka.io/maven") | ||
|
||
lazy val akkaVersion = sys.props.getOrElse("akka.version", "2.9.2") | ||
lazy val akkaHttpVersion = sys.props.getOrElse("akka.http.version", "10.6.1") | ||
|
||
// Note: this default isn't really used anywhere so not important to bump | ||
lazy val akkaManagementVersion = sys.props.getOrElse("akka.management.version", "1.5.0") | ||
|
||
// Run in a separate JVM, to make sure sbt waits until all threads have | ||
// finished before returning. | ||
// If you want to keep the application running while executing other | ||
// sbt tasks, consider https://github.com/spray/sbt-revolver/ | ||
fork := true | ||
|
||
libraryDependencies ++= Seq( | ||
"com.typesafe.akka" %% "akka-actor-typed" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-cluster-typed" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-cluster" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-discovery" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-persistence" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-remote" % akkaVersion, | ||
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion, | ||
"com.typesafe.akka" %% "akka-http-core" % akkaHttpVersion, | ||
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion, | ||
"com.lightbend.akka.management" %% "akka-management" % akkaManagementVersion, | ||
"com.lightbend.akka.management" %% "akka-management-cluster-bootstrap" % akkaManagementVersion, | ||
"com.lightbend.akka.management" %% "akka-management-cluster-http" % akkaManagementVersion, | ||
"com.lightbend.akka.discovery" %% "akka-discovery-kubernetes-api" % akkaManagementVersion, | ||
"com.lightbend.akka.management" %% "akka-lease-kubernetes" % akkaManagementVersion, | ||
"com.lightbend.akka.management" %% "akka-rolling-update-kubernetes" % akkaManagementVersion, | ||
"ch.qos.logback" % "logback-classic" % "1.2.13" | ||
) | ||
|
||
// useful for investigations: sbt nativeImageRunAgent | ||
|
||
// GraalVM native image build | ||
enablePlugins(NativeImagePlugin) | ||
nativeImageJvm := "graalvm-community" | ||
nativeImageVersion := "21.0.2" | ||
nativeImageOptions := Seq( | ||
"--no-fallback", | ||
"--verbose", | ||
"--initialize-at-build-time=ch.qos.logback", | ||
"-Dakka.native-image.debug=true" | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.3.4") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.