コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the V2beta1PodsMetricSource class.
 /// </summary>
 /// <param name="metricName">metricName is the name of the metric in
 /// question</param>
 /// <param name="targetAverageValue">targetAverageValue is the target
 /// value of the average of the metric across all relevant pods (as a
 /// quantity)</param>
 /// <param name="selector">selector is the string-encoded form of a
 /// standard kubernetes label selector for the given metric When set,
 /// it is passed as an additional parameter to the metrics server for
 /// more specific metrics scoping When unset, just the metricName will
 /// be used to gather metrics.</param>
 public V2beta1PodsMetricSource(string metricName, ResourceQuantity targetAverageValue, V1LabelSelector selector = default(V1LabelSelector))
 {
     MetricName         = metricName;
     Selector           = selector;
     TargetAverageValue = targetAverageValue;
     CustomInit();
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ResourceMetricStatus
 /// class.
 /// </summary>
 /// <param name="currentAverageValue">currentAverageValue is the
 /// current value of the average of the resource metric across all
 /// relevant pods, as a raw value (instead of as a percentage of the
 /// request), similar to the "pods" metric source type. It will always
 /// be set, regardless of the corresponding metric
 /// specification.</param>
 /// <param name="name">name is the name of the resource in
 /// question.</param>
 /// <param name="currentAverageUtilization">currentAverageUtilization
 /// is the current value of the average of the resource metric across
 /// all relevant pods, represented as a percentage of the requested
 /// value of the resource for the pods.  It will only be present if
 /// `targetAverageValue` was set in the corresponding metric
 /// specification.</param>
 public V2beta1ResourceMetricStatus(ResourceQuantity currentAverageValue, string name, int?currentAverageUtilization = default(int?))
 {
     CurrentAverageUtilization = currentAverageUtilization;
     CurrentAverageValue       = currentAverageValue;
     Name = name;
     CustomInit();
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the V2beta2MetricValueStatus class.
 /// </summary>
 /// <param name="averageUtilization">currentAverageUtilization is the
 /// current value of the average of the resource metric across all
 /// relevant pods, represented as a percentage of the requested value
 /// of the resource for the pods.</param>
 /// <param name="averageValue">averageValue is the current value of the
 /// average of the metric across all relevant pods (as a
 /// quantity)</param>
 /// <param name="value">value is the current value of the metric (as a
 /// quantity).</param>
 public V2beta2MetricValueStatus(int?averageUtilization = default(int?), ResourceQuantity averageValue = default(ResourceQuantity), ResourceQuantity value = default(ResourceQuantity))
 {
     AverageUtilization = averageUtilization;
     AverageValue       = averageValue;
     Value = value;
     CustomInit();
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ObjectMetricSource class.
 /// </summary>
 /// <param name="metricName">metricName is the name of the metric in
 /// question.</param>
 /// <param name="target">target is the described Kubernetes
 /// object.</param>
 /// <param name="targetValue">targetValue is the target value of the
 /// metric (as a quantity).</param>
 public V2beta1ObjectMetricSource(string metricName, V2beta1CrossVersionObjectReference target, ResourceQuantity targetValue)
 {
     MetricName  = metricName;
     Target      = target;
     TargetValue = targetValue;
     CustomInit();
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the V1ResourceFieldSelector class.
 /// </summary>
 /// <param name="resource">Required: resource to select</param>
 /// <param name="containerName">Container name: required for volumes,
 /// optional for env vars</param>
 /// <param name="divisor">Specifies the output format of the exposed
 /// resources, defaults to "1"</param>
 public V1ResourceFieldSelector(string resource, string containerName = default(string), ResourceQuantity divisor = default(ResourceQuantity))
 {
     ContainerName = containerName;
     Divisor       = divisor;
     Resource      = resource;
     CustomInit();
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ObjectMetricStatus class.
 /// </summary>
 /// <param name="currentValue">currentValue is the current value of the
 /// metric (as a quantity).</param>
 /// <param name="metricName">metricName is the name of the metric in
 /// question.</param>
 /// <param name="target">target is the described Kubernetes
 /// object.</param>
 public V2beta1ObjectMetricStatus(ResourceQuantity currentValue, string metricName, V2beta1CrossVersionObjectReference target)
 {
     CurrentValue = currentValue;
     MetricName   = metricName;
     Target       = target;
     CustomInit();
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ResourceMetricSource
 /// class.
 /// </summary>
 /// <param name="name">name is the name of the resource in
 /// question.</param>
 /// <param name="targetAverageUtilization">targetAverageUtilization is
 /// the target value of the average of the resource metric across all
 /// relevant pods, represented as a percentage of the requested value
 /// of the resource for the pods.</param>
 /// <param name="targetAverageValue">targetAverageValue is the target
 /// value of the average of the resource metric across all relevant
 /// pods, as a raw value (instead of as a percentage of the request),
 /// similar to the "pods" metric source type.</param>
 public V2beta1ResourceMetricSource(string name, int?targetAverageUtilization = default(int?), ResourceQuantity targetAverageValue = default(ResourceQuantity))
 {
     Name = name;
     TargetAverageUtilization = targetAverageUtilization;
     TargetAverageValue       = targetAverageValue;
     CustomInit();
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the V2beta1PodsMetricStatus class.
 /// </summary>
 /// <param name="currentAverageValue">currentAverageValue is the
 /// current value of the average of the metric across all relevant pods
 /// (as a quantity)</param>
 /// <param name="metricName">metricName is the name of the metric in
 /// question</param>
 /// <param name="selector">selector is the string-encoded form of a
 /// standard kubernetes label selector for the given metric When set in
 /// the PodsMetricSource, it is passed as an additional parameter to
 /// the metrics server for more specific metrics scoping. When unset,
 /// just the metricName will be used to gather metrics.</param>
 public V2beta1PodsMetricStatus(ResourceQuantity currentAverageValue, string metricName, V1LabelSelector selector = default(V1LabelSelector))
 {
     CurrentAverageValue = currentAverageValue;
     MetricName          = metricName;
     Selector            = selector;
     CustomInit();
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ExternalMetricSource
 /// class.
 /// </summary>
 /// <param name="metricName">metricName is the name of the metric in
 /// question.</param>
 /// <param name="metricSelector">metricSelector is used to identify a
 /// specific time series within a given metric.</param>
 /// <param name="targetAverageValue">targetAverageValue is the target
 /// per-pod value of global metric (as a quantity). Mutually exclusive
 /// with TargetValue.</param>
 /// <param name="targetValue">targetValue is the target value of the
 /// metric (as a quantity). Mutually exclusive with
 /// TargetAverageValue.</param>
 public V2beta1ExternalMetricSource(string metricName, V1LabelSelector metricSelector = default(V1LabelSelector), ResourceQuantity targetAverageValue = default(ResourceQuantity), ResourceQuantity targetValue = default(ResourceQuantity))
 {
     MetricName         = metricName;
     MetricSelector     = metricSelector;
     TargetAverageValue = targetAverageValue;
     TargetValue        = targetValue;
     CustomInit();
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ExternalMetricStatus
 /// class.
 /// </summary>
 /// <param name="currentValue">currentValue is the current value of the
 /// metric (as a quantity)</param>
 /// <param name="metricName">metricName is the name of a metric used
 /// for autoscaling in metric system.</param>
 /// <param name="currentAverageValue">currentAverageValue is the
 /// current value of metric averaged over autoscaled pods.</param>
 /// <param name="metricSelector">metricSelector is used to identify a
 /// specific time series within a given metric.</param>
 public V2beta1ExternalMetricStatus(ResourceQuantity currentValue, string metricName, ResourceQuantity currentAverageValue = default(ResourceQuantity), V1LabelSelector metricSelector = default(V1LabelSelector))
 {
     CurrentAverageValue = currentAverageValue;
     CurrentValue        = currentValue;
     MetricName          = metricName;
     MetricSelector      = metricSelector;
     CustomInit();
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the V2beta2MetricTarget class.
 /// </summary>
 /// <param name="type">type represents whether the metric type is
 /// Utilization, Value, or AverageValue</param>
 /// <param name="averageUtilization">averageUtilization is the target
 /// value of the average of the resource metric across all relevant
 /// pods, represented as a percentage of the requested value of the
 /// resource for the pods. Currently only valid for Resource metric
 /// source type</param>
 /// <param name="averageValue">averageValue is the target value of the
 /// average of the metric across all relevant pods (as a
 /// quantity)</param>
 /// <param name="value">value is the target value of the metric (as a
 /// quantity).</param>
 public V2beta2MetricTarget(string type, int?averageUtilization = default(int?), ResourceQuantity averageValue = default(ResourceQuantity), ResourceQuantity value = default(ResourceQuantity))
 {
     AverageUtilization = averageUtilization;
     AverageValue       = averageValue;
     Type  = type;
     Value = value;
     CustomInit();
 }
コード例 #12
0
 /// <summary>
 /// Initializes a new instance of the V2beta1ObjectMetricStatus class.
 /// </summary>
 /// <param name="currentValue">currentValue is the current value of the
 /// metric (as a quantity).</param>
 /// <param name="metricName">metricName is the name of the metric in
 /// question.</param>
 /// <param name="target">target is the described Kubernetes
 /// object.</param>
 /// <param name="averageValue">averageValue is the current value of the
 /// average of the metric across all relevant pods (as a
 /// quantity)</param>
 /// <param name="selector">selector is the string-encoded form of a
 /// standard kubernetes label selector for the given metric When set in
 /// the ObjectMetricSource, it is passed as an additional parameter to
 /// the metrics server for more specific metrics scoping. When unset,
 /// just the metricName will be used to gather metrics.</param>
 public V2beta1ObjectMetricStatus(ResourceQuantity currentValue, string metricName, V2beta1CrossVersionObjectReference target, ResourceQuantity averageValue = default(ResourceQuantity), V1LabelSelector selector = default(V1LabelSelector))
 {
     AverageValue = averageValue;
     CurrentValue = currentValue;
     MetricName   = metricName;
     Selector     = selector;
     Target       = target;
     CustomInit();
 }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the V1beta1CSIStorageCapacity class.
 /// </summary>
 /// <param name="storageClassName">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.</param>
 /// <param name="apiVersion">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</param>
 /// <param name="capacity">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.</param>
 /// <param name="kind">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</param>
 /// <param name="maximumVolumeSize">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.</param>
 /// <param name="metadata">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-&lt;uuid&gt;, 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</param>
 /// <param name="nodeTopology">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.</param>
 public V1beta1CSIStorageCapacity(string storageClassName, string apiVersion = default(string), ResourceQuantity capacity = default(ResourceQuantity), string kind = default(string), ResourceQuantity maximumVolumeSize = default(ResourceQuantity), V1ObjectMeta metadata = default(V1ObjectMeta), V1LabelSelector nodeTopology = default(V1LabelSelector))
 {
     ApiVersion        = apiVersion;
     Capacity          = capacity;
     Kind              = kind;
     MaximumVolumeSize = maximumVolumeSize;
     Metadata          = metadata;
     NodeTopology      = nodeTopology;
     StorageClassName  = storageClassName;
     CustomInit();
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the V2beta1PodsMetricSource class.
 /// </summary>
 /// <param name="metricName">metricName is the name of the metric in
 /// question</param>
 /// <param name="targetAverageValue">targetAverageValue is the target
 /// value of the average of the metric across all relevant pods (as a
 /// quantity)</param>
 public V2beta1PodsMetricSource(string metricName, ResourceQuantity targetAverageValue)
 {
     MetricName         = metricName;
     TargetAverageValue = targetAverageValue;
     CustomInit();
 }
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the V1EmptyDirVolumeSource class.
 /// </summary>
 /// <param name="medium">What type of storage medium should back this
 /// directory. The default is "" which means to use the node's default
 /// medium. Must be an empty string (default) or Memory. More info:
 /// https://kubernetes.io/docs/concepts/storage/volumes#emptydir</param>
 /// <param name="sizeLimit">Total amount of local storage required for
 /// this EmptyDir volume. The size limit is also applicable for memory
 /// medium. The maximum usage on memory medium EmptyDir would be the
 /// minimum value between the SizeLimit specified here and the sum of
 /// memory limits of all containers in a pod. The default is nil which
 /// means that the limit is undefined. More info:
 /// http://kubernetes.io/docs/user-guide/volumes#emptydir</param>
 public V1EmptyDirVolumeSource(string medium = default(string), ResourceQuantity sizeLimit = default(ResourceQuantity))
 {
     Medium    = medium;
     SizeLimit = sizeLimit;
     CustomInit();
 }
コード例 #16
0
 protected bool Equals(ResourceQuantity other)
 {
     return(Format == other?.Format && _unitlessValue.Equals(other._unitlessValue));
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the V2beta1PodsMetricStatus class.
 /// </summary>
 /// <param name="currentAverageValue">currentAverageValue is the
 /// current value of the average of the metric across all relevant pods
 /// (as a quantity)</param>
 /// <param name="metricName">metricName is the name of the metric in
 /// question</param>
 public V2beta1PodsMetricStatus(ResourceQuantity currentAverageValue, string metricName)
 {
     CurrentAverageValue = currentAverageValue;
     MetricName          = metricName;
     CustomInit();
 }