-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7bb7146
commit e20b537
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
documentation/src/main/minisite/content/_partials/ci.jshell.main.java
This file contains 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,21 @@ | ||
import io.yupiik.kubernetes.bindings.v1_24_3.v1.*; | ||
|
||
class Generator { | ||
public void generate() { | ||
final var output = Files.createDirectories(Path.of("target/k8s-descriptors")); | ||
|
||
final var deployment = new Deployment() | ||
.spec(new DeploymentSpec() | ||
/* ... */); | ||
|
||
Files.writeString( | ||
output.resolve("my-deployment.json"), | ||
deployment.asJson()); | ||
} | ||
} | ||
|
||
class Runner { // enables to code in an IDE even if not needed by JShell | ||
public static void main(final String... args) throws Exception { | ||
new Generator().generate(); | ||
} | ||
} |
This file contains 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