Package org.cdk8s
Class App.Builder
- java.lang.Object
-
- org.cdk8s.App.Builder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description App
build()
static App.Builder
create()
App.Builder
outdir(String outdir)
The directory to output Kubernetes manifests.App.Builder
outputFileExtension(String outputFileExtension)
The file extension to use for rendered YAML files.App.Builder
recordConstructMetadata(Boolean recordConstructMetadata)
When set to true, the output directory will contain aconstruct-metadata.json
file that holds construct related metadata on every resource in the app.App.Builder
resolvers(List<? extends IResolver> resolvers)
A list of resolvers that can be used to replace property values before they are written to the manifest file.App.Builder
yamlOutputType(YamlOutputType yamlOutputType)
How to divide the YAML output into files.
-
-
-
Method Detail
-
create
@Stability(Stable) public static App.Builder create()
- Returns:
- a new instance of
App.Builder
.
-
outdir
@Stability(Stable) public App.Builder outdir(String outdir)
The directory to output Kubernetes manifests.If you synthesize your application using
cdk8s synth
, you must also pass this value to the CLI using the--output
option or theoutput
property in thecdk8s.yaml
configuration file. Otherwise, the CLI will not know about the output directory, and synthesis will fail.This property is intended for internal and testing use.
Default: - CDK8S_OUTDIR if defined, otherwise "dist"
- Parameters:
outdir
- The directory to output Kubernetes manifests. This parameter is required.- Returns:
this
-
outputFileExtension
@Stability(Stable) public App.Builder outputFileExtension(String outputFileExtension)
The file extension to use for rendered YAML files.Default: .k8s.yaml
- Parameters:
outputFileExtension
- The file extension to use for rendered YAML files. This parameter is required.- Returns:
this
-
recordConstructMetadata
@Stability(Stable) public App.Builder recordConstructMetadata(Boolean recordConstructMetadata)
When set to true, the output directory will contain aconstruct-metadata.json
file that holds construct related metadata on every resource in the app.Default: false
- Parameters:
recordConstructMetadata
- When set to true, the output directory will contain aconstruct-metadata.json
file that holds construct related metadata on every resource in the app. This parameter is required.- Returns:
this
-
resolvers
@Stability(Stable) public App.Builder resolvers(List<? extends IResolver> resolvers)
A list of resolvers that can be used to replace property values before they are written to the manifest file.When multiple resolvers are passed, they are invoked by order in the list, and only the first one that applies (e.g calls
context.replaceValue
) is invoked.Default: - no resolvers.
- Parameters:
resolvers
- A list of resolvers that can be used to replace property values before they are written to the manifest file. This parameter is required.- Returns:
this
- See Also:
- https://cdk8s.io/docs/latest/basics/app/#resolvers
-
yamlOutputType
@Stability(Stable) public App.Builder yamlOutputType(YamlOutputType yamlOutputType)
How to divide the YAML output into files.Default: YamlOutputType.FILE_PER_CHART
- Parameters:
yamlOutputType
- How to divide the YAML output into files. This parameter is required.- Returns:
this
-
-