Package org.cdk8s

Class App.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<App>
    Enclosing class:
    App

    @Stability(Stable)
    public static final class App.Builder
    extends Object
    implements software.amazon.jsii.Builder<App>
    A fluent builder for App.
    • Method Detail

      • 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 the output property in the cdk8s.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 a construct-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 a construct-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
      • build

        @Stability(Stable)
        public App build()
        Specified by:
        build in interface software.amazon.jsii.Builder<App>
        Returns:
        a newly built instance of App.