• Public
  • Public/Protected
  • All


  • Chart
    • PennLabsChart




  • new PennLabsChart(scope: Construct, name?: string, props?: ChartProps): PennLabsChart
  • Parameters

    • scope: Construct
    • Optional name: string
    • Optional props: ChartProps

    Returns PennLabsChart


Optional Readonly namespace

namespace: string

The default namespace for all objects in this chart.

Readonly node

node: Node

The tree node.



  • get labels(): {}
  • Labels applied to all resources in this chart.

    This is an immutable copy.

    Returns {}

    • [name: string]: string



  • addDependency(...dependencies: IConstruct[]): void
  • Create a dependency between this Chart and other constructs. These can be other ApiObjects, Charts, or custom.


    • Rest ...dependencies: IConstruct[]

      the dependencies to add.

    Returns void


  • generateObjectName(apiObject: ApiObject): string
  • 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.


    • apiObject: ApiObject

      The API object to generate a name for.

    Returns string


  • toJson(): any[]
  • Renders this chart to a set of Kubernetes JSON resources.

    Returns any[]

    array of resource manifests


  • toString(): string
  • Returns a string representation of this construct.

    Returns string

Static isChart

  • isChart(x: any): x is Chart
  • Return whether the given object is a Chart.

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


    • x: any

    Returns x is Chart

Static isConstruct

  • isConstruct(x: any): x is Construct
  • Checks if x is a construct.

    Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

    Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.


    • x: any

      Any object

    Returns x is Construct

    true if x is an object created from a class which extends Construct.

Static of

  • of(c: IConstruct): Chart
  • Finds the chart in which a node is defined.


    • c: IConstruct

      a construct node

    Returns Chart

Generated using TypeDoc