Package org.cdk8s

Class Chart

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
               date="2023-07-17T00:29:41.256Z")
    @Stability(Stable)
    public class Chart
    extends software.constructs.Construct
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Chart.Builder
      A fluent builder for Chart.
      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Chart​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected Chart​(software.amazon.jsii.JsiiObjectRef objRef)  
        Chart​(software.constructs.Construct scope, String id)  
        Chart​(software.constructs.Construct scope, String id, ChartProps props)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDependency​(@NotNull software.constructs.IConstruct... dependencies)
      Create a dependency between this Chart and other constructs.
      String generateObjectName​(ApiObject apiObject)
      Generates a app-unique name for an object given it's construct node path.
      Map<String,​String> getLabels()
      Labels applied to all resources in this chart.
      String getNamespace()
      The default namespace for all objects in this chart.
      static Boolean isChart​(Object x)
      Return whether the given object is a Chart.
      static Chart of​(software.constructs.IConstruct c)
      Finds the chart in which a node is defined.
      List<Object> toJson()
      Renders this chart to a set of Kubernetes JSON resources.
      • Methods inherited from class software.constructs.Construct

        getNode, isConstruct, toString
      • Methods inherited from class software.amazon.jsii.JsiiObject

        jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
      • Methods inherited from interface software.amazon.jsii.JsiiSerializable

        $jsii$toJson
    • Constructor Detail

      • Chart

        protected Chart​(software.amazon.jsii.JsiiObjectRef objRef)
      • Chart

        protected Chart​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Chart

        @Stability(Stable)
        public Chart​(@NotNull
                     software.constructs.Construct scope,
                     @NotNull
                     String id,
                     @Nullable
                     ChartProps props)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
        props -
      • Chart

        @Stability(Stable)
        public Chart​(@NotNull
                     software.constructs.Construct scope,
                     @NotNull
                     String id)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
    • Method Detail

      • isChart

        @Stability(Stable)
        @NotNull
        public static Boolean isChart​(@NotNull
                                      Object x)
        Return whether the given object is a Chart.

        We do attribute detection since we can't reliably use 'instanceof'.

        Parameters:
        x - This parameter is required.
      • of

        @Stability(Stable)
        @NotNull
        public static Chart of​(@NotNull
                               software.constructs.IConstruct c)
        Finds the chart in which a node is defined.

        Parameters:
        c - a construct node. This parameter is required.
      • addDependency

        @Stability(Stable)
        public void addDependency​(@NotNull
                                  @NotNull software.constructs.IConstruct... dependencies)
        Create a dependency between this Chart and other constructs.

        These can be other ApiObjects, Charts, or custom.

        Parameters:
        dependencies - the dependencies to add. This parameter is required.
      • generateObjectName

        @Stability(Stable)
        @NotNull
        public String generateObjectName​(@NotNull
                                         ApiObject apiObject)
        Generates a app-unique name for an object given it's construct node path.

        Different resource types may have different constraints on names (metadata.name). The previous version of the name generator was compatible with DNS_SUBDOMAIN but not with DNS_LABEL.

        For example, Deployment names must comply with DNS_SUBDOMAIN while Service names must comply with DNS_LABEL.

        Since there is no formal specification for this, the default name generation scheme for kubernetes objects in cdk8s was changed to DNS_LABEL, since it’s the common denominator for all kubernetes resources (supposedly).

        You can override this method if you wish to customize object names at the chart level.

        Parameters:
        apiObject - The API object to generate a name for. This parameter is required.
      • toJson

        @Stability(Stable)
        @NotNull
        public List<Object> toJson()
        Renders this chart to a set of Kubernetes JSON resources.

        Returns:
        array of resource manifests
      • getLabels

        @Stability(Stable)
        @NotNull
        public Map<String,​String> getLabels()
        Labels applied to all resources in this chart.

        This is an immutable copy.

      • getNamespace

        @Stability(Stable)
        @Nullable
        public String getNamespace()
        The default namespace for all objects in this chart.