Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "pack/k8s/KubernetesGoalScheduler"

Index

Variables

Const K8sNamespaceFile

K8sNamespaceFile: "/var/run/secrets/kubernetes.io/serviceaccount/namespace" = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"

Functions

cleanCompletedJobs

  • cleanCompletedJobs(): Promise<void>

createJobSpec

  • createJobSpec(podSpec: V1Pod, podNs: string, gi: GoalInvocation): V1Job

createJobSpecWithAffinity

  • createJobSpecWithAffinity(podSpec: V1Pod, gi: GoalInvocation): V1Job

deleteJob

  • deleteJob(job: object): Promise<void>

deletePods

  • deletePods(job: object): Promise<void>

isConfiguredInEnv

  • isConfiguredInEnv(...values: string[]): boolean
  • Checks if one of the provided values is configured in ATOMIST_GOAL_SCHEDULER or - for backwards compatibility reasons - ATOMIST_GOAL_LAUNCHER.

    Parameters

    • Rest ...values: string[]

    Returns boolean

k8sJobEnv

  • k8sJobEnv(podSpec: V1Pod, goalEvent: SdmGoalEvent, context: HandlerContext): V1EnvVar[]
  • Kubernetes container spec environment variables that specify an SDM running in single-goal mode.

    Parameters

    • podSpec: V1Pod
    • goalEvent: SdmGoalEvent
    • context: HandlerContext

    Returns V1EnvVar[]

k8sJobGoalName

  • k8sJobGoalName(goalEvent: SdmGoalEvent): string

k8sJobName

  • k8sJobName(podSpec: V1Pod, goalEvent: SdmGoalEvent): string

listJobs

  • listJobs(labelSelector?: string): Promise<V1Job[]>
  • List k8s jobs for a single namespace or cluster-wide depending on evn configuration

    Parameters

    • Optional labelSelector: string

    Returns Promise<V1Job[]>

prettyPrintError

  • prettyPrintError(e: any): string

readNamespace

  • readNamespace(): Promise<string>
  • Read the namespace of the deployment from environment and k8s service account files. Falls back to the default namespace and no other configuration can be found.

    Returns Promise<string>

rewriteCachePath

  • rewriteCachePath(jobSpec: V1Job, workspaceId: string): void
  • Rewrite the volume host path to include the workspace id to prevent cross workspace content ending up in the same directory.

    Parameters

    • jobSpec: V1Job
    • workspaceId: string

    Returns void

sanitizeName

  • sanitizeName(name: string): string

Generated using TypeDoc