@pulumi/eks
Version:
[](https://github.com/pulumi/pulumi-eks/actions/workflows/master.yml) [](https://slack.pulumi.com) [![n
82 lines (81 loc) • 3.68 kB
TypeScript
import * as k8s from "@pulumi/kubernetes";
import * as k8sInputs from "@pulumi/kubernetes/types/input";
import * as pulumi from "@pulumi/pulumi";
/**
* EBSVolumeType lists the set of volume types accepted by an EKS storage class.
*/
export type EBSVolumeType = "io1" | "gp2" | "sc1" | "st1";
/**
* StorageClass describes the inputs to a single Kubernetes StorageClass provisioned by AWS. Any number of storage
* classes can be added to a cluster at creation time. One of these storage classes may be configured the default
* storage class for the cluster.
*/
export interface StorageClass {
/**
* The EBS volume type.
*/
type: pulumi.Input<EBSVolumeType>;
/**
* The AWS zone or zones for the EBS volume. If zones is not specified, volumes are generally round-robin-ed across
* all active zones where Kubernetes cluster has a node. zone and zones parameters must not be used at the same
* time.
*/
zones?: pulumi.Input<pulumi.Input<string>[]>;
/**
* I/O operations per second per GiB for "io1" volumes. The AWS volume plugin multiplies this with the size of a
* requested volume to compute IOPS of the volume and caps the result at 20,000 IOPS.
*/
iopsPerGb?: pulumi.Input<number>;
/**
* Denotes whether the EBS volume should be encrypted.
*/
encrypted?: pulumi.Input<boolean>;
/**
* The full Amazon Resource Name of the key to use when encrypting the volume. If none is supplied but encrypted is
* true, a key is generated by AWS.
*/
kmsKeyId?: pulumi.Input<string>;
/**
* True if this storage class should be a default storage class for the cluster.
*
* Note: As of Kubernetes v1.11+ on EKS, a default `gp2` storage class will
* always be created automatically for the cluster by the EKS service. See
* https://docs.aws.amazon.com/eks/latest/userguide/storage-classes.html
*
* Please note that at most one storage class can be marked as default. If
* two or more of them are marked as default, a PersistentVolumeClaim
* without `storageClassName` explicitly specified cannot be created. See:
* https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/#changing-the-default-storageclass
*/
default?: pulumi.Input<boolean>;
/**
* AllowVolumeExpansion shows whether the storage class allow volume expand
*/
allowVolumeExpansion?: pulumi.Input<boolean>;
/**
* Standard object's metadata. More info:
* https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
*/
metadata?: pulumi.Input<k8sInputs.meta.v1.ObjectMeta>;
/**
* Dynamically provisioned PersistentVolumes of this storage class are created with these
* mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one
* is invalid.
*/
mountOptions?: pulumi.Input<string[]>;
/**
* Dynamically provisioned PersistentVolumes of this storage class are created with this
* reclaimPolicy. Defaults to Delete.
*/
reclaimPolicy?: pulumi.Input<string>;
/**
* VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.
* When unset, VolumeBindingImmediate is used. This field is alpha-level and is only honored
* by servers that enable the VolumeScheduling feature.
*/
volumeBindingMode?: pulumi.Input<string>;
}
/**
* Creates a single Kubernetes StorageClass from the given inputs.
*/
export declare function createStorageClass(name: string, storageClass: StorageClass, opts: pulumi.CustomResourceOptions): k8s.storage.v1.StorageClass;