Class KubeStorageClass.Builder

    • Method Detail

      • create

        @Stability(Stable)
        public static KubeStorageClass.Builder create​(software.constructs.Construct scope,
                                                      String id)
        Parameters:
        scope - the scope in which to define this object. This parameter is required.
        id - a scope-local name for the object. This parameter is required.
        Returns:
        a new instance of KubeStorageClass.Builder.
      • provisioner

        @Stability(Stable)
        public KubeStorageClass.Builder provisioner​(String provisioner)
        Provisioner indicates the type of the provisioner.

        Parameters:
        provisioner - Provisioner indicates the type of the provisioner. This parameter is required.
        Returns:
        this
      • allowedTopologies

        @Stability(Stable)
        public KubeStorageClass.Builder allowedTopologies​(List<? extends TopologySelectorTerm> allowedTopologies)
        Restrict the node topologies where volumes can be dynamically provisioned.

        Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.

        Parameters:
        allowedTopologies - Restrict the node topologies where volumes can be dynamically provisioned. This parameter is required.
        Returns:
        this
      • allowVolumeExpansion

        @Stability(Stable)
        public KubeStorageClass.Builder allowVolumeExpansion​(Boolean allowVolumeExpansion)
        AllowVolumeExpansion shows whether the storage class allow volume expand.

        Parameters:
        allowVolumeExpansion - AllowVolumeExpansion shows whether the storage class allow volume expand. This parameter is required.
        Returns:
        this
      • metadata

        @Stability(Stable)
        public KubeStorageClass.Builder metadata​(ObjectMeta metadata)
        Standard object's metadata.

        More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

        Parameters:
        metadata - Standard object's metadata. This parameter is required.
        Returns:
        this
      • mountOptions

        @Stability(Stable)
        public KubeStorageClass.Builder mountOptions​(List<String> mountOptions)
        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.

        Parameters:
        mountOptions - 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. This parameter is required.
        Returns:
        this
      • parameters

        @Stability(Stable)
        public KubeStorageClass.Builder parameters​(Map<String,​String> parameters)
        Parameters holds the parameters for the provisioner that should create volumes of this storage class.

        Parameters:
        parameters - Parameters holds the parameters for the provisioner that should create volumes of this storage class. This parameter is required.
        Returns:
        this
      • reclaimPolicy

        @Stability(Stable)
        public KubeStorageClass.Builder reclaimPolicy​(String reclaimPolicy)
        Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy.

        Defaults to Delete.

        Default: Delete.

        Parameters:
        reclaimPolicy - Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. This parameter is required.
        Returns:
        this
      • volumeBindingMode

        @Stability(Stable)
        public KubeStorageClass.Builder volumeBindingMode​(String volumeBindingMode)
        VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.

        When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.

        Parameters:
        volumeBindingMode - VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. This parameter is required.
        Returns:
        this