@pulumi/kubernetesx
Version:
Pulumi Kubernetes Extensions
107 lines (106 loc) • 5.46 kB
TypeScript
import * as k8s from "@pulumi/kubernetes";
import * as pulumi from "@pulumi/pulumi";
export declare namespace types {
type EnvMap = Record<string, pulumi.Input<string | k8s.types.input.core.v1.EnvVarSource>>;
type PortMap = Record<string, pulumi.Input<number>>;
enum ServiceType {
ClusterIP = "ClusterIP",
LoadBalancer = "LoadBalancer"
}
type VolumeMount = {
volume: pulumi.Input<k8s.types.input.core.v1.Volume>;
destPath: pulumi.Input<string>;
srcPath?: pulumi.Input<string>;
};
type Container = Omit<k8s.types.input.core.v1.Container, "env" | "name" | "ports" | "volumeMounts"> & {
env?: pulumi.Input<pulumi.Input<k8s.types.input.core.v1.EnvVar>[] | EnvMap>;
name?: pulumi.Input<string>;
ports?: pulumi.Input<pulumi.Input<k8s.types.input.core.v1.ContainerPort>[] | PortMap>;
volumeMounts?: pulumi.Input<pulumi.Input<k8s.types.input.core.v1.VolumeMount | VolumeMount>[]>;
};
type PodSpec = Omit<k8s.types.input.core.v1.PodSpec, "containers" | "initContainers"> & {
containers: pulumi.Input<pulumi.Input<Container>[]>;
initContainers?: pulumi.Input<pulumi.Input<Container>[]>;
};
type Pod = Omit<k8s.types.input.core.v1.Pod, "spec"> & {
spec: pulumi.Input<PodSpec | PodBuilder>;
};
type DeploymentSpec = Omit<k8s.types.input.apps.v1.DeploymentSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type Deployment = Omit<k8s.types.input.apps.v1.Deployment, "spec"> & {
spec: pulumi.Input<DeploymentSpec | k8s.types.input.apps.v1.DeploymentSpec>;
};
type ServiceSpec = Omit<k8s.types.input.core.v1.ServiceSpec, "ports" | "type"> & {
ports?: pulumi.Input<pulumi.Input<k8s.types.input.core.v1.ServicePort>[] | PortMap>;
type?: pulumi.Input<ServiceType | string>;
};
type Service = Omit<k8s.types.input.core.v1.Service, "spec"> & {
spec: pulumi.Input<ServiceSpec>;
};
type StatefulSetSpec = Omit<k8s.types.input.apps.v1.StatefulSetSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type StatefulSet = Omit<k8s.types.input.apps.v1.StatefulSet, "spec"> & {
spec: pulumi.Input<StatefulSetSpec | k8s.types.input.apps.v1.StatefulSetSpec>;
};
type JobSpec = Omit<k8s.types.input.batch.v1.JobSpec, "template"> & {
template: pulumi.Input<Pod>;
};
type Job = Omit<k8s.types.input.batch.v1.Job, "spec"> & {
spec: pulumi.Input<JobSpec | k8s.types.input.batch.v1.JobSpec>;
};
type PodBuilderDeploymentSpec = Omit<k8s.types.input.apps.v1.DeploymentSpec, "selector" | "template">;
type PodBuilderJobSpec = Omit<k8s.types.input.batch.v1.JobSpec, "template">;
}
export declare class PodBuilder {
readonly podSpec: pulumi.Output<k8s.types.input.core.v1.PodSpec>;
private readonly podName;
constructor(args: types.PodSpec);
asDeploymentSpec(args?: types.PodBuilderDeploymentSpec): pulumi.Output<k8s.types.input.apps.v1.DeploymentSpec>;
asStatefulSetSpec(args?: {
replicas?: number;
}): pulumi.Output<k8s.types.input.apps.v1.StatefulSetSpec>;
asJobSpec(args?: types.PodBuilderJobSpec): pulumi.Output<k8s.types.input.batch.v1.JobSpec>;
}
export declare class Pod extends k8s.core.v1.Pod {
constructor(name: string, args: types.Pod, opts?: pulumi.CustomResourceOptions);
}
export declare class Deployment extends k8s.apps.v1.Deployment {
private readonly name;
private readonly opts?;
constructor(name: string, args: types.Deployment, opts?: pulumi.CustomResourceOptions);
createService(args?: types.ServiceSpec): Service;
}
export declare class Service extends k8s.core.v1.Service {
constructor(name: string, args: types.Service, opts?: pulumi.CustomResourceOptions);
/**
* Endpoint of the Service. This can be either an IP address or a hostname,
* depending on the k8s cluster provider.
*/
get endpoint(): pulumi.Output<string>;
}
export declare class StatefulSet extends pulumi.ComponentResource {
private readonly name;
private readonly opts?;
constructor(name: string, args: types.StatefulSet, opts?: pulumi.CustomResourceOptions);
}
export declare class Job extends k8s.batch.v1.Job {
private readonly name;
private readonly opts?;
constructor(name: string, args: types.Job, opts?: pulumi.CustomResourceOptions);
}
export declare class PersistentVolumeClaim extends k8s.core.v1.PersistentVolumeClaim {
constructor(name: string, args: k8s.types.input.core.v1.PersistentVolumeClaim, opts?: pulumi.CustomResourceOptions);
mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>;
}
export declare class ConfigMap extends k8s.core.v1.ConfigMap {
constructor(name: string, args: k8s.types.input.core.v1.ConfigMap, opts?: pulumi.CustomResourceOptions);
mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>;
asEnvValue(key: pulumi.Input<string>): pulumi.Output<k8s.types.input.core.v1.EnvVarSource>;
}
export declare class Secret extends k8s.core.v1.Secret {
constructor(name: string, args: k8s.types.input.core.v1.Secret, opts?: pulumi.CustomResourceOptions);
mount(destPath: pulumi.Input<string>, srcPath?: pulumi.Input<string>): pulumi.Output<types.VolumeMount>;
asEnvValue(key: pulumi.Input<string>): pulumi.Output<k8s.types.input.core.v1.EnvVarSource>;
}