Options
All
  • Public
  • Public/Protected
  • All
Menu

@fpk/k8s

Index

Interfaces

Type Aliases

Variables

Functions

Type Aliases

DeepPartial<T>: T extends Function ? T : T extends object ? { [ P in keyof T]?: DeepPartial<T[P]> } : T

Type Parameters

  • T

TContainerSelector: ((fn: ((c: Container) => Container)) => TResourceTransformer)

Type declaration

TContainerTransform: ((container: Container) => Container)

Type declaration

    • (container: Container): Container
    • Parameters

      • container: Container

      Returns Container

TDaemonSetTransform: ((d: DaemonSet) => DaemonSet)

Type declaration

    • (d: DaemonSet): DaemonSet
    • Parameters

      • d: DaemonSet

      Returns DaemonSet

TDeploymentTransform: ((d: Deployment) => Deployment)

Type declaration

    • (d: Deployment): Deployment
    • Parameters

      • d: Deployment

      Returns Deployment

TIngressSpecTransformer: ((i: IngressSpec) => IngressSpec)

Type declaration

    • (i: IngressSpec): IngressSpec
    • Parameters

      • i: IngressSpec

      Returns IngressSpec

TResourceTransformer: (<T>(resource: T) => T)

Type declaration

    • <T>(resource: T): T
    • Type Parameters

      Parameters

      • resource: T

      Returns T

TResourceViewer<T>: ((resource: IResource) => T)

Type Parameters

  • T

Type declaration

TStatefulSetTransform: ((d: StatefulSet) => StatefulSet)

Type declaration

    • (d: StatefulSet): StatefulSet
    • Parameters

      • d: StatefulSet

      Returns StatefulSet

Variables

nonNamespacedResources: string[] = ...

A list of non namespaced resource kinds.

Functions

  • addAutoscalerCPUTarget(target: MetricTarget): (<T>(resource: T) => T)
  • Parameters

    • target: MetricTarget

    Returns (<T>(resource: T) => T)

      • <T>(resource: T): T
      • Type Parameters

        • T extends { spec?: { metrics?: ({ containerResource?: { container?: string | undefined; name?: string | undefined; target?: { averageUtilization?: number | undefined; averageValue?: string | undefined; type?: string | undefined; value?: string | undefined; } | undefined; } | undefined; ... 4 more ...; type?: string | undefined; } | un... }

        Parameters

        • resource: T

        Returns T

  • addAutoscalerMetric(metric: MetricSpec): (<T>(resource: T) => T)
  • Parameters

    • metric: MetricSpec

    Returns (<T>(resource: T) => T)

      • <T>(resource: T): T
      • Type Parameters

        • T extends { spec?: { metrics?: ({ containerResource?: { container?: string | undefined; name?: string | undefined; target?: { averageUtilization?: number | undefined; averageValue?: string | undefined; type?: string | undefined; value?: string | undefined; } | undefined; } | undefined; ... 4 more ...; type?: string | undefined; } | un... }

        Parameters

        • resource: T

        Returns T

  • addTargetCPUUtilization(averageUtilization: number): (<T>(resource: T) => T)
  • Parameters

    • averageUtilization: number

    Returns (<T>(resource: T) => T)

      • <T>(resource: T): T
      • Type Parameters

        • T extends { spec?: { metrics?: ({ containerResource?: { container?: string | undefined; name?: string | undefined; target?: { averageUtilization?: number | undefined; averageValue?: string | undefined; type?: string | undefined; value?: string | undefined; } | undefined; } | undefined; ... 4 more ...; type?: string | undefined; } | un... }

        Parameters

        • resource: T

        Returns T

  • annotate(key: string, value: string): ((value: any) => any)
  • Returns a function that adds a metadata annotation to a resource

    Parameters

    • key: string
    • value: string

    Returns ((value: any) => any)

      • (value: any): any
      • Parameters

        • value: any

        Returns any

  • Returns a function that appends the container to the given resource.

    const containerPusher = appendContainer({ image: "fancyimage" });

    containerPusher(deployment);
    containerPusher(daemonSet);

    Parameters

    • container: Container

    Returns TResourceTransformer

  • Returns a function that appends the init container to the given resource.

    const containerPusher = appendInitContainer({ image: "fancyimage" });

    containerPusher(deployment);
    containerPusher(daemonSet);

    Parameters

    • container: Container

    Returns TResourceTransformer

  • appendServicePort(name: string, targetPort: number, port?: number): ((value: any) => any)
  • Parameters

    • name: string
    • targetPort: number
    • port: number = targetPort

    Returns ((value: any) => any)

      • (value: any): any
      • Parameters

        • value: any

        Returns any

  • appendVolumeAndMount(__namedParameters: { mount?: { mountPath?: string; mountPropagation?: string; name?: string; readOnly?: boolean; subPath?: string; subPathExpr?: string }; mountPath: string; overContainer?: TContainerSelector; volume: Volume }): TResourceTransformer
  • Returns a function that adds a volume and mounts it to a container.

    Parameters

    • __namedParameters: { mount?: { mountPath?: string; mountPropagation?: string; name?: string; readOnly?: boolean; subPath?: string; subPathExpr?: string }; mountPath: string; overContainer?: TContainerSelector; volume: Volume }
      • Optional mount?: { mountPath?: string; mountPropagation?: string; name?: string; readOnly?: boolean; subPath?: string; subPathExpr?: string }
        • Optional mountPath?: string

          Path within the container at which the volume should be mounted. Must not contain ':'.

        • Optional mountPropagation?: string

          mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.

        • Optional name?: string

          This must match the Name of a Volume.

        • Optional readOnly?: boolean

          Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.

        • Optional subPath?: string

          Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

        • Optional subPathExpr?: string

          Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.

      • mountPath: string
      • Optional overContainer?: TContainerSelector
      • volume: Volume

    Returns TResourceTransformer

  • appendVolumeMount(volumeName: string, mountPath: string, merge?: { mountPath?: string; mountPropagation?: string; name?: string; readOnly?: boolean; subPath?: string; subPathExpr?: string }): TContainerTransform
  • Returns a function that appends a volume mount to a container.

    Parameters

    • volumeName: string
    • mountPath: string
    • Optional merge: { mountPath?: string; mountPropagation?: string; name?: string; readOnly?: boolean; subPath?: string; subPathExpr?: string }
      • Optional mountPath?: string

        Path within the container at which the volume should be mounted. Must not contain ':'.

      • Optional mountPropagation?: string

        mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.

      • Optional name?: string

        This must match the Name of a Volume.

      • Optional readOnly?: boolean

        Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.

      • Optional subPath?: string

        Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

      • Optional subPathExpr?: string

        Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive.

    Returns TContainerTransform

  • bundleFromFile(file: string, prefix?: number): Record<string, unknown>
  • Returns a function that concats a list of containers to the given resource.

    const containerPusher = concatContainers([{ image: "fancyimage" }]);

    containerPusher(deployment);
    containerPusher(daemonSet);

    Parameters

    • containers: Container[]

    Returns TResourceTransformer

  • Returns a function that concats a list of init containers to the given resource.

    const containerPusher = concatInitContainers([{ image: "fancyimage" }]);

    containerPusher(deployment);
    containerPusher(daemonSet);

    Parameters

    • containers: Container[]

    Returns TResourceTransformer

  • configMap(name: string, data: {}, toMerge?: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }): ConfigMap
  • Creates a configmap resource from some data

    Parameters

    • name: string
    • data: {}
      • [name: string]: string
    • Optional toMerge: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional binaryData?: { [x: string]: string | undefined; }

        BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "ConfigMap"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }

    Returns ConfigMap

  • configMapFromDir(name: string, dir: string, toMerge?: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }): ConfigMap
  • Create a configmap from a directory. Each file in the directory will have its own entry

    Parameters

    • name: string
    • dir: string
    • Optional toMerge: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional binaryData?: { [x: string]: string | undefined; }

        BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "ConfigMap"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }

    Returns ConfigMap

  • configMapFromFile(name: string, file: string, filename?: string, toMerge?: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }): ConfigMap
  • Create a configmap from a file

    Parameters

    • name: string
    • file: string
    • Optional filename: string
    • Optional toMerge: { apiVersion?: "v1"; binaryData?: { [x: string]: string | undefined; }; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "ConfigMap"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; } }
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional binaryData?: { [x: string]: string | undefined; }

        BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "ConfigMap"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }

    Returns ConfigMap

  • container(name: string, image: string, toMerge?: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }): Container
  • Creates a container with the provided name and image

    Parameters

    • name: string
    • image: string
    • Optional toMerge: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }
      • Optional args?: (undefined | string)[]

        Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional command?: (undefined | string)[]

        Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]

        List of environment variables to set in the container. Cannot be updated.

      • Optional envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]

        List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.

      • Optional image?: string

        Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.

      • Optional imagePullPolicy?: string

        Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

      • Optional lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...

        Actions that the management system should take in response to container lifecycle events. Cannot be updated.

      • Optional livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional name?: string

        Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

      • Optional ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]

        List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.

      • Optional readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }

        Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

      • Optional securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }

        SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

      • Optional startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional stdin?: boolean

        Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.

      • Optional stdinOnce?: boolean

        Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false

      • Optional terminationMessagePath?: string

        Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

      • Optional terminationMessagePolicy?: string

        Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

      • Optional tty?: boolean

        Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.

      • Optional volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]

        volumeDevices is the list of block devices to be used by the container.

      • Optional volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]

        Pod volumes to mount into the container's filesystem. Cannot be updated.

      • Optional workingDir?: string

        Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.

    Returns Container

  • containerWithPort(name: string, image: string, containerPort: number, toMerge?: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }): Container
  • Creates a container with the provided name, image and port.

    Parameters

    • name: string
    • image: string
    • containerPort: number
    • Optional toMerge: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }
      • Optional args?: (undefined | string)[]

        Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional command?: (undefined | string)[]

        Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]

        List of environment variables to set in the container. Cannot be updated.

      • Optional envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]

        List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.

      • Optional image?: string

        Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.

      • Optional imagePullPolicy?: string

        Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

      • Optional lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...

        Actions that the management system should take in response to container lifecycle events. Cannot be updated.

      • Optional livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional name?: string

        Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

      • Optional ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]

        List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.

      • Optional readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }

        Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

      • Optional securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }

        SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

      • Optional startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional stdin?: boolean

        Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.

      • Optional stdinOnce?: boolean

        Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false

      • Optional terminationMessagePath?: string

        Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

      • Optional terminationMessagePolicy?: string

        Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

      • Optional tty?: boolean

        Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.

      • Optional volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]

        volumeDevices is the list of block devices to be used by the container.

      • Optional volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]

        Pod volumes to mount into the container's filesystem. Cannot be updated.

      • Optional workingDir?: string

        Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.

    Returns Container

  • containerWithPorts(name: string, image: string, ports: {}, toMerge?: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }): Container
  • Creates a container with the provided name, image and ports.

    Parameters

    • name: string
    • image: string
    • ports: {}
      • [name: string]: number
    • Optional toMerge: { args?: (undefined | string)[]; command?: (undefined | string)[]; env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]; envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]; image?: string; imagePullPolicy?: string; lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...; livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; name?: string; ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]; readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }; securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }; startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }; stdin?: boolean; stdinOnce?: boolean; terminationMessagePath?: string; terminationMessagePolicy?: string; tty?: boolean; volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]; volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]; workingDir?: string }
      • Optional args?: (undefined | string)[]

        Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional command?: (undefined | string)[]

        Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell

      • Optional env?: (undefined | ({ name?: string | undefined; value?: string | undefined; valueFrom?: { configMapKeyRef?: { key?: string | undefined; name?: string | undefined; optional?: boolean | undefined; } | undefined; fieldRef?: { ...; } | undefined; resourceFieldRef?: { ...; } | undefined; secretKeyRef?: { ...; } | undefined; } | undefined; }))[]

        List of environment variables to set in the container. Cannot be updated.

      • Optional envFrom?: (undefined | ({ configMapRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; prefix?: string | undefined; secretRef?: { name?: string | undefined; optional?: boolean | undefined; } | undefined; }))[]

        List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.

      • Optional image?: string

        Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.

      • Optional imagePullPolicy?: string

        Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images

      • Optional lifecycle?: { postStart?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | ... 1 more ... | undefined; scheme?: string | u...

        Actions that the management system should take in response to container lifecycle events. Cannot be updated.

      • Optional livenessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional name?: string

        Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.

      • Optional ports?: (undefined | ({ containerPort?: number | undefined; hostIP?: string | undefined; hostPort?: number | undefined; name?: string | undefined; protocol?: string | undefined; }))[]

        List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.

      • Optional readinessProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional resources?: { claims?: ({ name?: string | undefined; } | undefined)[] | undefined; limits?: { [x: string]: string | undefined; } | undefined; requests?: { [x: string]: string | undefined; } | undefined; }

        Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

      • Optional securityContext?: { allowPrivilegeEscalation?: boolean | undefined; capabilities?: { add?: (string | undefined)[] | undefined; drop?: (string | undefined)[] | undefined; } | undefined; privileged?: boolean | undefined; ... 7 more ...; windowsOptions?: { ...; } | undefined; }

        SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/

      • Optional startupProbe?: { exec?: { command?: (string | undefined)[] | undefined; } | undefined; failureThreshold?: number | undefined; grpc?: { port?: number | undefined; service?: string | undefined; } | undefined; ... 6 more ...; timeoutSeconds?: number | undefined; }

        StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional stdin?: boolean

        Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.

      • Optional stdinOnce?: boolean

        Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false

      • Optional terminationMessagePath?: string

        Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.

      • Optional terminationMessagePolicy?: string

        Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.

      • Optional tty?: boolean

        Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.

      • Optional volumeDevices?: (undefined | ({ devicePath?: string | undefined; name?: string | undefined; }))[]

        volumeDevices is the list of block devices to be used by the container.

      • Optional volumeMounts?: (undefined | ({ mountPath?: string | undefined; mountPropagation?: string | undefined; name?: string | undefined; readOnly?: boolean | undefined; subPath?: string | undefined; subPathExpr?: string | undefined; }))[]

        Pod volumes to mount into the container's filesystem. Cannot be updated.

      • Optional workingDir?: string

        Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.

    Returns Container

  • cpus(n: number): string
  • cronJob(name: string, schedule: string, job: Job, toMerge?: { apiVersion?: "batch/v1"; kind?: "CronJob"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { concurrencyPolicy?: string | undefined; failedJobsHistoryLimit?: number | undefined; jobTemplate?: { metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; ... 13 more ...; readonly uid?: string | undefined; } | undefined; spec?: { ...; } | undefined; } | undefined; ... 4 more ...; timeZone?:...; status?: { active?: ({ apiVersion?: string | undefined; fieldPath?: string | undefined; kind?: string | undefined; name?: string | undefined; namespace?: string | undefined; resourceVersion?: string | undefined; uid?: string | undefined; } | undefined)[] | undefined; lastScheduleTime?: string | undefined; lastSuccessfulTime?... }): CronJob
  • Create a cron job from a job

    Parameters

    • name: string
    • schedule: string
    • job: Job
    • Optional toMerge: { apiVersion?: "batch/v1"; kind?: "CronJob"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { concurrencyPolicy?: string | undefined; failedJobsHistoryLimit?: number | undefined; jobTemplate?: { metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; ... 13 more ...; readonly uid?: string | undefined; } | undefined; spec?: { ...; } | undefined; } | undefined; ... 4 more ...; timeZone?:...; status?: { active?: ({ apiVersion?: string | undefined; fieldPath?: string | undefined; kind?: string | undefined; name?: string | undefined; namespace?: string | undefined; resourceVersion?: string | undefined; uid?: string | undefined; } | undefined)[] | undefined; lastScheduleTime?: string | undefined; lastSuccessfulTime?... }

    Returns CronJob

  • daemonSet(name: string, toMerge?: { apiVersion?: "apps/v1"; kind?: "DaemonSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { matchExpressions?: ({ key?: string | undefined; operator?: string | undefined; values?: (string | undefined)[] | undefined; } | undefined)[] | undefined; matchLabels?: { ...; } | undefined; } | undefined; template?: { ......; status?: { collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 7 more ...; updatedNumberScheduled?: number | undefined; } }): DaemonSet
  • Create a deployment resource with the given name. The second argument is deep merged into the deployment.

    Parameters

    • name: string
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "DaemonSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { matchExpressions?: ({ key?: string | undefined; operator?: string | undefined; values?: (string | undefined)[] | undefined; } | undefined)[] | undefined; matchLabels?: { ...; } | undefined; } | undefined; template?: { ......; status?: { collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 7 more ...; updatedNumberScheduled?: number | undefined; } }

    Returns DaemonSet

  • daemonSetWithContainer(name: string, container: Container, toMerge?: { apiVersion?: "apps/v1"; kind?: "DaemonSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { matchExpressions?: ({ key?: string | undefined; operator?: string | undefined; values?: (string | undefined)[] | undefined; } | undefined)[] | undefined; matchLabels?: { ...; } | undefined; } | undefined; template?: { ......; status?: { collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 7 more ...; updatedNumberScheduled?: number | undefined; } }): DaemonSet
  • Creates a daemonset with a single container. Has a couple options to help make creating daemonsets easier.

    Parameters

    • name: string
    • container: Container
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "DaemonSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { matchExpressions?: ({ key?: string | undefined; operator?: string | undefined; values?: (string | undefined)[] | undefined; } | undefined)[] | undefined; matchLabels?: { ...; } | undefined; } | undefined; template?: { ......; status?: { collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 7 more ...; updatedNumberScheduled?: number | undefined; } }

    Returns DaemonSet

  • deployment(name: string, toMerge?: { apiVersion?: "apps/v1"; kind?: "Deployment"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;... }): Deployment
  • Create a deployment resource with the given name. The second argument is deep merged into the deployment.

    Parameters

    • name: string
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "Deployment"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;... }
      • Optional apiVersion?: "apps/v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional kind?: "Deployment"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }

        Specification of the desired behavior of the Deployment.

      • Optional status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;...

        Most recently observed status of the Deployment.

    Returns Deployment

  • deploymentWithContainer(name: string, container: Container, toMerge?: { apiVersion?: "apps/v1"; kind?: "Deployment"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;... }): Deployment
  • Creates a deployment with a single container. Has a couple options to help make creating deployments easier.

    Parameters

    • name: string
    • container: Container
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "Deployment"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;... }
      • Optional apiVersion?: "apps/v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional kind?: "Deployment"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { minReadySeconds?: number | undefined; paused?: boolean | undefined; progressDeadlineSeconds?: number | undefined; replicas?: number | undefined; revisionHistoryLimit?: number | undefined; selector?: { ...; } | undefined; strategy?: { ...; } | undefined; template?: { ...; } | undefined; }

        Specification of the desired behavior of the Deployment.

      • Optional status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; lastUpdateTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined;...

        Most recently observed status of the Deployment.

    Returns Deployment

  • hpa(name: string, targetRef: CrossVersionObjectReference, toMerge?: { apiVersion?: "autoscaling/v2"; kind?: "HorizontalPodAutoscaler"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { behavior?: { scaleDown?: { policies?: ({ periodSeconds?: number | undefined; type?: string | undefined; value?: number | undefined; } | undefined)[] | undefined; selectPolicy?: string | undefined; stabilizationWindowSeconds?: number | undefined; } | undefined; scaleUp?: { ...; } | undefined; } | undefined; maxRepl...; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 4 more ...; observedGeneration?: number | undefined; } }): HorizontalPodAutoscaler
  • Parameters

    • name: string
    • targetRef: CrossVersionObjectReference
    • Optional toMerge: { apiVersion?: "autoscaling/v2"; kind?: "HorizontalPodAutoscaler"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { behavior?: { scaleDown?: { policies?: ({ periodSeconds?: number | undefined; type?: string | undefined; value?: number | undefined; } | undefined)[] | undefined; selectPolicy?: string | undefined; stabilizationWindowSeconds?: number | undefined; } | undefined; scaleUp?: { ...; } | undefined; } | undefined; maxRepl...; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 4 more ...; observedGeneration?: number | undefined; } }
      • Optional apiVersion?: "autoscaling/v2"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional kind?: "HorizontalPodAutoscaler"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { behavior?: { scaleDown?: { policies?: ({ periodSeconds?: number | undefined; type?: string | undefined; value?: number | undefined; } | undefined)[] | undefined; selectPolicy?: string | undefined; stabilizationWindowSeconds?: number | undefined; } | undefined; scaleUp?: { ...; } | undefined; } | undefined; maxRepl...

        spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.

      • Optional status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 4 more ...; observedGeneration?: number | undefined; }

        status is the current information about the autoscaler.

    Returns HorizontalPodAutoscaler

  • ingress(name: string, spec: IngressSpec, toMerge?: { apiVersion?: "networking.k8s.io/v1"; kind?: "Ingress"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { defaultBackend?: { resource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; service?: { name?: string | undefined; port?: { name?: string | undefined; number?: number | undefined; } | undefined; } | undefined; } | undefined; ingressClassName?: string | undefi...; status?: { loadBalancer?: { ingress?: ({ hostname?: string | undefined; ip?: string | undefined; ports?: ({ error?: string | undefined; port?: number | undefined; protocol?: string | undefined; } | undefined)[] | undefined; } | undefined)[] | undefined; } | undefined; } }): Ingress
  • Parameters

    • name: string
    • spec: IngressSpec
    • Optional toMerge: { apiVersion?: "networking.k8s.io/v1"; kind?: "Ingress"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { defaultBackend?: { resource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; service?: { name?: string | undefined; port?: { name?: string | undefined; number?: number | undefined; } | undefined; } | undefined; } | undefined; ingressClassName?: string | undefi...; status?: { loadBalancer?: { ingress?: ({ hostname?: string | undefined; ip?: string | undefined; ports?: ({ error?: string | undefined; port?: number | undefined; protocol?: string | undefined; } | undefined)[] | undefined; } | undefined)[] | undefined; } | undefined; } }

    Returns Ingress

  • ingressFromService(name: string, hosts: string[], svc: Service, tls?: boolean): Ingress
  • Create an ingress from a Service

    Parameters

    • name: string
    • hosts: string[]
    • svc: Service
    • tls: boolean = true

    Returns Ingress

  • ingressSimple(name: string, rules: IIngressRules, toMerge?: { apiVersion?: "networking.k8s.io/v1"; kind?: "Ingress"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { defaultBackend?: { resource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; service?: { name?: string | undefined; port?: { name?: string | undefined; number?: number | undefined; } | undefined; } | undefined; } | undefined; ingressClassName?: string | undefi...; status?: { loadBalancer?: { ingress?: ({ hostname?: string | undefined; ip?: string | undefined; ports?: ({ error?: string | undefined; port?: number | undefined; protocol?: string | undefined; } | undefined)[] | undefined; } | undefined)[] | undefined; } | undefined; } }): Ingress
  • Create an ingress with a simplier API

    Parameters

    • name: string
    • rules: IIngressRules
    • Optional toMerge: { apiVersion?: "networking.k8s.io/v1"; kind?: "Ingress"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { defaultBackend?: { resource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; service?: { name?: string | undefined; port?: { name?: string | undefined; number?: number | undefined; } | undefined; } | undefined; } | undefined; ingressClassName?: string | undefi...; status?: { loadBalancer?: { ingress?: ({ hostname?: string | undefined; ip?: string | undefined; ports?: ({ error?: string | undefined; port?: number | undefined; protocol?: string | undefined; } | undefined)[] | undefined; } | undefined)[] | undefined; } | undefined; } }

    Returns Ingress

  • job(name: string, toMerge?: { apiVersion?: "batch/v1"; kind?: "Job"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { activeDeadlineSeconds?: number | undefined; backoffLimit?: number | undefined; completionMode?: string | undefined; completions?: number | undefined; manualSelector?: boolean | undefined; ... 5 more ...; ttlSecondsAfterFinished?: number | undefined; }; status?: { active?: number | undefined; completedIndexes?: string | undefined; completionTime?: string | undefined; conditions?: ({ lastProbeTime?: string | undefined; lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } ... }): Job
  • Creates a job resource

    Parameters

    • name: string
    • Optional toMerge: { apiVersion?: "batch/v1"; kind?: "Job"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { activeDeadlineSeconds?: number | undefined; backoffLimit?: number | undefined; completionMode?: string | undefined; completions?: number | undefined; manualSelector?: boolean | undefined; ... 5 more ...; ttlSecondsAfterFinished?: number | undefined; }; status?: { active?: number | undefined; completedIndexes?: string | undefined; completionTime?: string | undefined; conditions?: ({ lastProbeTime?: string | undefined; lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } ... }

    Returns Job

  • jobWithContainer(name: string, container: Container, toMerge?: { apiVersion?: "batch/v1"; kind?: "Job"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { activeDeadlineSeconds?: number | undefined; backoffLimit?: number | undefined; completionMode?: string | undefined; completions?: number | undefined; manualSelector?: boolean | undefined; ... 5 more ...; ttlSecondsAfterFinished?: number | undefined; }; status?: { active?: number | undefined; completedIndexes?: string | undefined; completionTime?: string | undefined; conditions?: ({ lastProbeTime?: string | undefined; lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } ... }): Job
  • Creates a job with a single container. Has a couple options to help make creating jobs easier.

    Parameters

    • name: string
    • container: Container
    • Optional toMerge: { apiVersion?: "batch/v1"; kind?: "Job"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { activeDeadlineSeconds?: number | undefined; backoffLimit?: number | undefined; completionMode?: string | undefined; completions?: number | undefined; manualSelector?: boolean | undefined; ... 5 more ...; ttlSecondsAfterFinished?: number | undefined; }; status?: { active?: number | undefined; completedIndexes?: string | undefined; completionTime?: string | undefined; conditions?: ({ lastProbeTime?: string | undefined; lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } ... }

    Returns Job

  • matches<R>(kind: string, name?: string): ((r: R) => boolean)
  • Returns a function that can be used to find matching resources.

    Type Parameters

    Parameters

    • kind: string
    • Optional name: string

    Returns ((r: R) => boolean)

      • (r: R): boolean
      • Parameters

        • r: R

        Returns boolean

  • maybeMergeResource<T>(input: T, toMerge?: DeepPartial<T>): T
  • milliCpus(n: number): string
  • namespace(name: string, toMerge?: { apiVersion?: "v1"; kind?: "Namespace"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { finalizers?: (string | undefined)[] | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; phase?: string | undefined; } }): Namespace
  • objectRef(resource: IResource): CrossVersionObjectReference
  • Returns a function that runs the given containers transformer in a resource.

    Parameters

    • fn: ((containers: Container[]) => Container[])
        • (containers: Container[]): Container[]
        • Parameters

          • containers: Container[]

          Returns Container[]

    Returns TResourceTransformer

  • Returns a function that finds the first container, and runs the transformer over it in a resource.

    Parameters

    • fn: ((container: Container) => Container)
        • (container: Container): Container
        • Parameters

          • container: Container

          Returns Container

    Returns TResourceTransformer

  • Returns a function that finds the first init container, and runs the transformer over it in a resource.

    Parameters

    • fn: ((container: Container) => Container)
        • (container: Container): Container
        • Parameters

          • container: Container

          Returns Container

    Returns TResourceTransformer

  • overInitContainer(name: string): ((fn: ((container: Container) => Container)) => TResourceTransformer)
  • Returns a function that runs the given init containers transformer in a resource.

    Parameters

    • fn: ((containers: Container[]) => Container[])
        • (containers: Container[]): Container[]
        • Parameters

          • containers: Container[]

          Returns Container[]

    Returns TResourceTransformer

  • Returns a function that will run the given pod transformer over the supplied resource. Useful for updating pod templates for various resource types.

    const setEmptyContainers = overPodTemplate((pod) => ({...pod, spec: {containers: []}}));

    setEmptyContainers(deployment)
    setEmptyContainers(daemonSet)
    setEmptyContainers(cronjob)

    Parameters

    • fn: ((pod: PodTemplateSpec) => PodTemplateSpec)
        • (pod: PodTemplateSpec): PodTemplateSpec
        • Parameters

          • pod: PodTemplateSpec

          Returns PodTemplateSpec

    Returns TResourceTransformer

  • overResource<R>(kind: R["kind"], name?: string): ((fn: ((resource: R) => R)) => ((obj: {}) => Record<string, R>))
  • Returns a function that finds a matching resource, then runs the transform function over it.

    Type Parameters

    Parameters

    • kind: R["kind"]
    • Optional name: string

    Returns ((fn: ((resource: R) => R)) => ((obj: {}) => Record<string, R>))

      • (fn: ((resource: R) => R)): ((obj: {}) => Record<string, R>)
      • Parameters

        • fn: ((resource: R) => R)
            • (resource: R): R
            • Parameters

              • resource: R

              Returns R

        Returns ((obj: {}) => Record<string, R>)

          • (obj: {}): Record<string, R>
          • Parameters

            • obj: {}
              • [key: string]: any

            Returns Record<string, R>

  • pvc(name: string, storage: string, toMerge?: { apiVersion?: "v1"; kind?: "PersistentVolumeClaim"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { accessModes?: (string | undefined)[] | undefined; dataSource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; dataSourceRef?: { ...; } | undefined; ... 4 more ...; volumeName?: string | undefined; }; status?: { accessModes?: (string | undefined)[] | undefined; allocatedResources?: { [x: string]: string | undefined; } | undefined; capacity?: { [x: string]: string | undefined; } | undefined; conditions?: ({ ...; } | undefined)[] | undefined; phase?: string | undefined; resizeStatus?: string | undefined; } }): PersistentVolumeClaim
  • Parameters

    • name: string
    • storage: string
    • Optional toMerge: { apiVersion?: "v1"; kind?: "PersistentVolumeClaim"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { accessModes?: (string | undefined)[] | undefined; dataSource?: { apiGroup?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; dataSourceRef?: { ...; } | undefined; ... 4 more ...; volumeName?: string | undefined; }; status?: { accessModes?: (string | undefined)[] | undefined; allocatedResources?: { [x: string]: string | undefined; } | undefined; capacity?: { [x: string]: string | undefined; } | undefined; conditions?: ({ ...; } | undefined)[] | undefined; phase?: string | undefined; resizeStatus?: string | undefined; } }

    Returns PersistentVolumeClaim

  • rbac<T>(kind: T["kind"], name: string, toMerge?: DeepPartial<T>): T
  • resource<T>(apiVersion: T["apiVersion"], kind: T["kind"], name: string, extra?: Partial<T>): T
  • Create a kubernetes resource with the given apiVersion, kind and name.

    Type Parameters

    Parameters

    • apiVersion: T["apiVersion"]
    • kind: T["kind"]
    • name: string
    • extra: Partial<T> = {}

    Returns T

  • secret(name: string, data: {}, toMerge?: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string }): Secret
  • Creates a secret resource from some data. This function automatically base64 encodes the values for you.

    Parameters

    • name: string
    • data: {}
      • [name: string]: string
    • Optional toMerge: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string }
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "Secret"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional stringData?: { [x: string]: string | undefined; }

        stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.

      • Optional type?: string

        Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

    Returns Secret

  • secretFromDir(name: string, dir: string, toMerge?: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string }): Secret
  • Create a secret from a directory

    Parameters

    • name: string
    • dir: string
    • toMerge: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string } = {}
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "Secret"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional stringData?: { [x: string]: string | undefined; }

        stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.

      • Optional type?: string

        Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

    Returns Secret

  • secretFromFile(name: string, file: string, filename?: string, toMerge?: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string }): Secret
  • Create a secret from a file

    Parameters

    • name: string
    • file: string
    • Optional filename: string
    • toMerge: { apiVersion?: "v1"; data?: { [x: string]: string | undefined; }; immutable?: boolean; kind?: "Secret"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; stringData?: { [x: string]: string | undefined; }; type?: string } = {}
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional data?: { [x: string]: string | undefined; }

        Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4

      • Optional immutable?: boolean

        Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.

      • Optional kind?: "Secret"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional stringData?: { [x: string]: string | undefined; }

        stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.

      • Optional type?: string

        Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

    Returns Secret

  • service(name: string, selector: undefined | {}, toMerge?: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }): Service
  • Creates a service resource

    Parameters

    • name: string
    • selector: undefined | {}
    • Optional toMerge: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }

    Returns Service

  • serviceAccount(name: string, toMerge?: { apiVersion?: "v1"; automountServiceAccountToken?: boolean; imagePullSecrets?: (undefined | ({ name?: string | undefined; }))[]; kind?: "ServiceAccount"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; secrets?: (undefined | ({ apiVersion?: string | undefined; fieldPath?: string | undefined; kind?: string | undefined; name?: string | undefined; namespace?: string | undefined; resourceVersion?: string | undefined; uid?: string | undefined; }))[] }): ServiceAccount
  • Creates a ServiceAccount resource.

    Parameters

    • name: string
    • Optional toMerge: { apiVersion?: "v1"; automountServiceAccountToken?: boolean; imagePullSecrets?: (undefined | ({ name?: string | undefined; }))[]; kind?: "ServiceAccount"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; secrets?: (undefined | ({ apiVersion?: string | undefined; fieldPath?: string | undefined; kind?: string | undefined; name?: string | undefined; namespace?: string | undefined; resourceVersion?: string | undefined; uid?: string | undefined; }))[] }
      • Optional apiVersion?: "v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional automountServiceAccountToken?: boolean

        AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.

      • Optional imagePullSecrets?: (undefined | ({ name?: string | undefined; }))[]

        ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod

      • Optional kind?: "ServiceAccount"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional secrets?: (undefined | ({ apiVersion?: string | undefined; fieldPath?: string | undefined; kind?: string | undefined; name?: string | undefined; namespace?: string | undefined; resourceVersion?: string | undefined; uid?: string | undefined; }))[]

        Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. Pods are only limited to this list if this service account has a "kubernetes.io/enforce-mountable-secrets" annotation set to "true". This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret

    Returns ServiceAccount

  • serviceFromPod<T>(name: string, r: T, toMerge?: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }): Service
  • Type Parameters

    Parameters

    • name: string
    • r: T
    • Optional toMerge: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }

    Returns Service

  • serviceWithPorts(name: string, selector: undefined | {}, ports: {}, toMerge?: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }): Service
  • Parameters

    • name: string
    • selector: undefined | {}
    • ports: {}
      • [name: string]: number
    • Optional toMerge: { apiVersion?: "v1"; kind?: "Service"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { allocateLoadBalancerNodePorts?: boolean | undefined; clusterIP?: string | undefined; clusterIPs?: (string | undefined)[] | undefined; externalIPs?: (string | undefined)[] | undefined; ... 14 more ...; type?: string | undefined; }; status?: { conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; observedGeneration?: number | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; loadBalancer?: { ...; } | undefined; } }

    Returns Service

  • setBasicAuth(secretName: string): ((i: Ingress) => Ingress)
  • Returns a function that sets basic auth annotations on the ingress.

    Parameters

    • secretName: string

    Returns ((i: Ingress) => Ingress)

      • (i: Ingress): Ingress
      • Parameters

        • i: Ingress

        Returns Ingress

  • setIngressClass(ingressClass: string): ((i: Ingress) => Ingress)
  • Returns a function that sets the ingress class annotation.

    Parameters

    • ingressClass: string

    Returns ((i: Ingress) => Ingress)

      • (i: Ingress): Ingress
      • Parameters

        • i: Ingress

        Returns Ingress

  • setLivenessProbe(probe?: { exec?: { command?: (string | undefined)[] | undefined; }; failureThreshold?: number; grpc?: { port?: number | undefined; service?: string | undefined; }; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }; initialDelaySeconds?: number; periodSeconds?: number; successThreshold?: number; tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }; terminationGracePeriodSeconds?: number; timeoutSeconds?: number }): TContainerTransform
  • Returns a function that sets the livenessProbe on a container.

    Parameters

    • Optional probe: { exec?: { command?: (string | undefined)[] | undefined; }; failureThreshold?: number; grpc?: { port?: number | undefined; service?: string | undefined; }; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }; initialDelaySeconds?: number; periodSeconds?: number; successThreshold?: number; tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }; terminationGracePeriodSeconds?: number; timeoutSeconds?: number }
      • Optional exec?: { command?: (string | undefined)[] | undefined; }

        Exec specifies the action to take.

      • Optional failureThreshold?: number

        Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

      • Optional grpc?: { port?: number | undefined; service?: string | undefined; }

        GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.

      • Optional httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }

        HTTPGet specifies the http request to perform.

      • Optional initialDelaySeconds?: number

        Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional periodSeconds?: number

        How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

      • Optional successThreshold?: number

        Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.

      • Optional tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }

        TCPSocket specifies an action involving a TCP port.

      • Optional terminationGracePeriodSeconds?: number

        Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.

      • Optional timeoutSeconds?: number

        Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

    Returns TContainerTransform

  • setReadinessProbe(probe?: { exec?: { command?: (string | undefined)[] | undefined; }; failureThreshold?: number; grpc?: { port?: number | undefined; service?: string | undefined; }; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }; initialDelaySeconds?: number; periodSeconds?: number; successThreshold?: number; tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }; terminationGracePeriodSeconds?: number; timeoutSeconds?: number }): TContainerTransform
  • Returns a function that sets the readinessProbe on a container.

    Parameters

    • Optional probe: { exec?: { command?: (string | undefined)[] | undefined; }; failureThreshold?: number; grpc?: { port?: number | undefined; service?: string | undefined; }; httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }; initialDelaySeconds?: number; periodSeconds?: number; successThreshold?: number; tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }; terminationGracePeriodSeconds?: number; timeoutSeconds?: number }
      • Optional exec?: { command?: (string | undefined)[] | undefined; }

        Exec specifies the action to take.

      • Optional failureThreshold?: number

        Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

      • Optional grpc?: { port?: number | undefined; service?: string | undefined; }

        GRPC specifies an action involving a GRPC port. This is a beta field and requires enabling GRPCContainerProbe feature gate.

      • Optional httpGet?: { host?: string | undefined; httpHeaders?: ({ name?: string | undefined; value?: string | undefined; } | undefined)[] | undefined; path?: string | undefined; port?: string | number | undefined; scheme?: string | undefined; }

        HTTPGet specifies the http request to perform.

      • Optional initialDelaySeconds?: number

        Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

      • Optional periodSeconds?: number

        How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.

      • Optional successThreshold?: number

        Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.

      • Optional tcpSocket?: { host?: string | undefined; port?: string | number | undefined; }

        TCPSocket specifies an action involving a TCP port.

      • Optional terminationGracePeriodSeconds?: number

        Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.

      • Optional timeoutSeconds?: number

        Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

    Returns TContainerTransform

  • setReplicaRange(min: number, max: number): (<T>(input: T) => T)
  • Parameters

    • min: number
    • max: number

    Returns (<T>(input: T) => T)

      • <T>(input: T): T
      • Type Parameters

        • T extends IReplicaRangeCompatable

        Parameters

        • input: T

        Returns T

  • statefulSet(name: string, serviceName: string, toMerge?: { apiVersion?: "apps/v1"; kind?: "StatefulSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu... }): StatefulSet
  • Create a stateful set resource with the given name. The second argument is deep merged into the stateful set.

    Parameters

    • name: string
    • serviceName: string
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "StatefulSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu... }
      • Optional apiVersion?: "apps/v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional kind?: "StatefulSet"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }

        Spec defines the desired identities of pods in this set.

      • Optional status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu...

        Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.

    Returns StatefulSet

  • statefulSetWithContainer(name: string, serviceName: string, container: Container, toMerge?: { apiVersion?: "apps/v1"; kind?: "StatefulSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu... }): StatefulSet
  • Creates a stateful set with a single container.

    Parameters

    • name: string
    • serviceName: string
    • container: Container
    • Optional toMerge: { apiVersion?: "apps/v1"; kind?: "StatefulSet"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }; status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu... }
      • Optional apiVersion?: "apps/v1"

        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

      • Optional kind?: "StatefulSet"

        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { minReadySeconds?: number | undefined; ordinals?: { start?: number | undefined; } | undefined; persistentVolumeClaimRetentionPolicy?: { whenDeleted?: string | undefined; whenScaled?: string | undefined; } | undefined; ... 7 more ...; volumeClaimTemplates?: ({ ...; } | undefined)[] | undefined; }

        Spec defines the desired identities of pods in this set.

      • Optional status?: { availableReplicas?: number | undefined; collisionCount?: number | undefined; conditions?: ({ lastTransitionTime?: string | undefined; message?: string | undefined; reason?: string | undefined; status?: string | undefined; type?: string | undefined; } | undefined)[] | undefined; ... 6 more ...; updatedReplicas?: nu...

        Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.

    Returns StatefulSet

  • viewPodContainers(resource: IResource): Container[]
  • viewPodPorts(resource: IResource): ContainerPort[]
  • viewPodTemplate<T>(object: T): Option<PodTemplateSpec>
  • volumeFromConfigMap(name: string, cm: ConfigMap, toMerge?: { defaultMode?: number; items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]; name?: string; optional?: boolean }): Volume
  • Create a volume from a configmap

    Parameters

    • name: string
    • cm: ConfigMap
    • Optional toMerge: { defaultMode?: number; items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]; name?: string; optional?: boolean }
      • Optional defaultMode?: number

        defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

      • Optional items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]

        items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.

      • Optional name?: string
      • Optional optional?: boolean

        optional specify whether the ConfigMap or its keys must be defined

    Returns Volume

  • volumeFromHostPath(name: string, path: string, toMerge?: { path?: string; type?: string }): Volume
  • volumeFromPvc(name: string, pvc: PersistentVolumeClaim, toMerge?: { claimName?: string; readOnly?: boolean }): Volume
  • volumeFromSecret(name: string, secret: Secret, toMerge?: { defaultMode?: number; items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]; optional?: boolean; secretName?: string }): Volume
  • Create a volume from a secret

    Parameters

    • name: string
    • secret: Secret
    • Optional toMerge: { defaultMode?: number; items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]; optional?: boolean; secretName?: string }
      • Optional defaultMode?: number

        defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

      • Optional items?: (undefined | ({ key?: string | undefined; mode?: number | undefined; path?: string | undefined; }))[]

        items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.

      • Optional optional?: boolean

        optional field specify whether the Secret or its keys must be defined

      • Optional secretName?: string

        secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret

    Returns Volume

  • vpa(name: string, targetRef: CrossVersionObjectReference, updateMode?: undefined | "Recreate" | "Auto" | "Initial", toMerge?: { apiVersion?: "autoscaling.k8s.io/v1beta2"; kind?: "VerticalPodAutoscaler"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { targetRef?: { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; updatePolicy?: { updateMode?: "Recreate" | "Auto" | "Initial" | undefined; } | undefined; resourcePolicy?: any; } }): IVerticalPodAutoscaler
  • Creates a vertical pod autoscaler

    Parameters

    • name: string
    • targetRef: CrossVersionObjectReference
    • updateMode: undefined | "Recreate" | "Auto" | "Initial" = "Auto"
    • Optional toMerge: { apiVersion?: "autoscaling.k8s.io/v1beta2"; kind?: "VerticalPodAutoscaler"; metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }; spec?: { targetRef?: { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; updatePolicy?: { updateMode?: "Recreate" | "Auto" | "Initial" | undefined; } | undefined; resourcePolicy?: any; } }
      • Optional apiVersion?: "autoscaling.k8s.io/v1beta2"
      • Optional kind?: "VerticalPodAutoscaler"
      • Optional metadata?: { annotations?: { [x: string]: string | undefined; } | undefined; readonly creationTimestamp?: string | undefined; readonly deletionGracePeriodSeconds?: number | undefined; readonly deletionTimestamp?: string | undefined; ... 10 more ...; readonly uid?: string | undefined; }
      • Optional spec?: { targetRef?: { apiVersion?: string | undefined; kind?: string | undefined; name?: string | undefined; } | undefined; updatePolicy?: { updateMode?: "Recreate" | "Auto" | "Initial" | undefined; } | undefined; resourcePolicy?: any; }

    Returns IVerticalPodAutoscaler

  • withNamespace(name: string, filename?: string, toMerge?: Namespace): (<M>(object: TContents<M>) => Promise<M>)
  • Returns a function that add's a 00-namespace resource to the object, then adds a matching metadata.namespace to each item in the object.

    Parameters

    • name: string
    • filename: string = "00-namespace"
    • Optional toMerge: Namespace

    Returns (<M>(object: TContents<M>) => Promise<M>)

      • <M>(object: TContents<M>): Promise<M>
      • Type Parameters

        • M extends {}

        Parameters

        • object: TContents<M>

        Returns Promise<M>

Generated using TypeDoc