Class V1beta1Storage.CSIStorageCapacity

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.kubernetes.client.proto.V1beta1Storage.CSIStorageCapacity
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, V1beta1Storage.CSIStorageCapacityOrBuilder, Serializable
Enclosing class:
V1beta1Storage

public static final class V1beta1Storage.CSIStorageCapacity extends com.google.protobuf.GeneratedMessageV3 implements V1beta1Storage.CSIStorageCapacityOrBuilder
 CSIStorageCapacity stores the result of one CSI GetCapacity call.
 For a given StorageClass, this describes the available capacity in a
 particular topology segment.  This can be used when considering where to
 instantiate new PersistentVolumes.
 For example this can express things like:
 - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1"
 - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123"
 The following three cases all imply that no capacity is available for
 a certain combination:
 - no object exists with suitable topology and storage class name
 - such an object exists, but the capacity is unset
 - such an object exists, but the capacity is zero
 The producer of these objects can decide which approach is more suitable.
 They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate
 is enabled there and a CSI driver opts into capacity-aware scheduling with
 CSIDriver.StorageCapacity.
 
Protobuf type k8s.io.api.storage.v1beta1.CSIStorageCapacity
See Also:
  • Field Details

  • Method Details

    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasMetadata

      public boolean hasMetadata()
       Standard object's metadata. The name has no particular meaning. It must be
       be a DNS subdomain (dots allowed, 253 characters). To ensure that
       there are no conflicts with other CSI drivers on the cluster, the recommendation
       is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends
       with the unique CSI driver name.
       Objects are namespaced.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      Specified by:
      hasMetadata in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getMetadata

      public Meta.ObjectMeta getMetadata()
       Standard object's metadata. The name has no particular meaning. It must be
       be a DNS subdomain (dots allowed, 253 characters). To ensure that
       there are no conflicts with other CSI drivers on the cluster, the recommendation
       is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends
       with the unique CSI driver name.
       Objects are namespaced.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      Specified by:
      getMetadata in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getMetadataOrBuilder

      public Meta.ObjectMetaOrBuilder getMetadataOrBuilder()
       Standard object's metadata. The name has no particular meaning. It must be
       be a DNS subdomain (dots allowed, 253 characters). To ensure that
       there are no conflicts with other CSI drivers on the cluster, the recommendation
       is to use csisc-<uuid>, a generated name, or a reverse-domain name which ends
       with the unique CSI driver name.
       Objects are namespaced.
       More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
      Specified by:
      getMetadataOrBuilder in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • hasNodeTopology

      public boolean hasNodeTopology()
       NodeTopology defines which nodes have access to the storage
       for which capacity was reported. If not set, the storage is
       not accessible from any node in the cluster. If empty, the
       storage is accessible from all nodes. This field is
       immutable.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2;
      Specified by:
      hasNodeTopology in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getNodeTopology

      public Meta.LabelSelector getNodeTopology()
       NodeTopology defines which nodes have access to the storage
       for which capacity was reported. If not set, the storage is
       not accessible from any node in the cluster. If empty, the
       storage is accessible from all nodes. This field is
       immutable.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2;
      Specified by:
      getNodeTopology in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getNodeTopologyOrBuilder

      public Meta.LabelSelectorOrBuilder getNodeTopologyOrBuilder()
       NodeTopology defines which nodes have access to the storage
       for which capacity was reported. If not set, the storage is
       not accessible from any node in the cluster. If empty, the
       storage is accessible from all nodes. This field is
       immutable.
       +optional
       
      optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector nodeTopology = 2;
      Specified by:
      getNodeTopologyOrBuilder in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • hasStorageClassName

      public boolean hasStorageClassName()
       The name of the StorageClass that the reported capacity applies to.
       It must meet the same requirements as the name of a StorageClass
       object (non-empty, DNS subdomain). If that object no longer exists,
       the CSIStorageCapacity object is obsolete and should be removed by its
       creator.
       This field is immutable.
       
      optional string storageClassName = 3;
      Specified by:
      hasStorageClassName in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getStorageClassName

      public String getStorageClassName()
       The name of the StorageClass that the reported capacity applies to.
       It must meet the same requirements as the name of a StorageClass
       object (non-empty, DNS subdomain). If that object no longer exists,
       the CSIStorageCapacity object is obsolete and should be removed by its
       creator.
       This field is immutable.
       
      optional string storageClassName = 3;
      Specified by:
      getStorageClassName in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getStorageClassNameBytes

      public com.google.protobuf.ByteString getStorageClassNameBytes()
       The name of the StorageClass that the reported capacity applies to.
       It must meet the same requirements as the name of a StorageClass
       object (non-empty, DNS subdomain). If that object no longer exists,
       the CSIStorageCapacity object is obsolete and should be removed by its
       creator.
       This field is immutable.
       
      optional string storageClassName = 3;
      Specified by:
      getStorageClassNameBytes in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • hasCapacity

      public boolean hasCapacity()
       Capacity is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       The semantic is currently (CSI spec 1.2) defined as:
       The available capacity, in bytes, of the storage that can be used
       to provision volumes. If not set, that information is currently
       unavailable and treated like zero capacity.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4;
      Specified by:
      hasCapacity in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getCapacity

      public Resource.Quantity getCapacity()
       Capacity is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       The semantic is currently (CSI spec 1.2) defined as:
       The available capacity, in bytes, of the storage that can be used
       to provision volumes. If not set, that information is currently
       unavailable and treated like zero capacity.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4;
      Specified by:
      getCapacity in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getCapacityOrBuilder

      public Resource.QuantityOrBuilder getCapacityOrBuilder()
       Capacity is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       The semantic is currently (CSI spec 1.2) defined as:
       The available capacity, in bytes, of the storage that can be used
       to provision volumes. If not set, that information is currently
       unavailable and treated like zero capacity.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity capacity = 4;
      Specified by:
      getCapacityOrBuilder in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • hasMaximumVolumeSize

      public boolean hasMaximumVolumeSize()
       MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       This is defined since CSI spec 1.4.0 as the largest size
       that may be used in a
       CreateVolumeRequest.capacity_range.required_bytes field to
       create a volume with the same parameters as those in
       GetCapacityRequest. The corresponding value in the Kubernetes
       API is ResourceRequirements.Requests in a volume claim.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity maximumVolumeSize = 5;
      Specified by:
      hasMaximumVolumeSize in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getMaximumVolumeSize

      public Resource.Quantity getMaximumVolumeSize()
       MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       This is defined since CSI spec 1.4.0 as the largest size
       that may be used in a
       CreateVolumeRequest.capacity_range.required_bytes field to
       create a volume with the same parameters as those in
       GetCapacityRequest. The corresponding value in the Kubernetes
       API is ResourceRequirements.Requests in a volume claim.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity maximumVolumeSize = 5;
      Specified by:
      getMaximumVolumeSize in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • getMaximumVolumeSizeOrBuilder

      public Resource.QuantityOrBuilder getMaximumVolumeSizeOrBuilder()
       MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse
       for a GetCapacityRequest with topology and parameters that match the
       previous fields.
       This is defined since CSI spec 1.4.0 as the largest size
       that may be used in a
       CreateVolumeRequest.capacity_range.required_bytes field to
       create a volume with the same parameters as those in
       GetCapacityRequest. The corresponding value in the Kubernetes
       API is ResourceRequirements.Requests in a volume claim.
       +optional
       
      optional .k8s.io.apimachinery.pkg.api.resource.Quantity maximumVolumeSize = 5;
      Specified by:
      getMaximumVolumeSizeOrBuilder in interface V1beta1Storage.CSIStorageCapacityOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static V1beta1Storage.CSIStorageCapacity parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static V1beta1Storage.CSIStorageCapacity parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static V1beta1Storage.CSIStorageCapacity parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public V1beta1Storage.CSIStorageCapacity.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static V1beta1Storage.CSIStorageCapacity.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected V1beta1Storage.CSIStorageCapacity.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static V1beta1Storage.CSIStorageCapacity getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<V1beta1Storage.CSIStorageCapacity> parser()
    • getParserForType

      public com.google.protobuf.Parser<V1beta1Storage.CSIStorageCapacity> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public V1beta1Storage.CSIStorageCapacity getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder