Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "pack/k8s/deploy/cluster"

Index

Functions

cleanFulfillment

  • cleanFulfillment(fulfillment: string): string

envString

  • envString(environment: string): string

getCluster

  • getCluster(environment: string, fulfillment?: string): string
  • Determine cluster name from goal environment and fulfillment. If the fulfillment is provided, the cluster name is parsed from the goal fulfillment name, stripping any NPM scope and everything before the first underscore, _, if they exist.

    If there is no fulfillment, the cluster name derived from the goal environment. An environment of StagingEnvironment or ProductionEnvironment is mapped to an appropriate string. Any other goal environment is simplified to the name of the environment. If the environment is not truthy an empty string is returned. Otherwise the environment string is returned unchanged.

    Parameters

    • environment: string

      FulfillableGoalDetails.environment

    • Optional fulfillment: string

      GoalFulfillment.name

    Returns string

    cluster name

getClusterLabel

  • getClusterLabel(environment: string, fulfillment?: string): string
  • Generate the tail of a goal label using getCluster to determine an appropriate deployment target.

    Parameters

    • environment: string

      FulfillableGoalDetails.environment

    • Optional fulfillment: string

      GoalFulfillment.name

    Returns string

    Formatted phrase including cluster name

Generated using TypeDoc