/// <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(); }
/// <summary> /// Initializes a new instance of the V1NetworkPolicyPeer class. /// </summary> /// <param name="ipBlock">IPBlock defines policy on a particular /// IPBlock</param> /// <param name="namespaceSelector">Selects Namespaces using cluster /// scoped-labels. This matches all pods in all namespaces selected by /// this label selector. This field follows standard label selector /// semantics. If present but empty, this selector selects all /// namespaces.</param> /// <param name="podSelector">This is a label selector which selects /// Pods in this namespace. This field follows standard label selector /// semantics. If present but empty, this selector selects all pods in /// this namespace.</param> public V1NetworkPolicyPeer(V1IPBlock ipBlock = default(V1IPBlock), V1LabelSelector namespaceSelector = default(V1LabelSelector), V1LabelSelector podSelector = default(V1LabelSelector)) { IpBlock = ipBlock; NamespaceSelector = namespaceSelector; PodSelector = podSelector; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1PodAffinityTerm class. /// </summary> /// <param name="topologyKey">This pod should be co-located (affinity) /// or not co-located (anti-affinity) with the pods matching the /// labelSelector in the specified namespaces, where co-located is /// defined as running on a node whose value of the label with key /// topologyKey matches that of any node on which any of the selected /// pods is running. Empty topologyKey is not allowed.</param> /// <param name="labelSelector">A label query over a set of resources, /// in this case pods.</param> /// <param name="namespaces">namespaces specifies which namespaces the /// labelSelector applies to (matches against); null or empty list /// means "this pod's namespace"</param> public V1PodAffinityTerm(string topologyKey, V1LabelSelector labelSelector = default(V1LabelSelector), IList <string> namespaces = default(IList <string>)) { LabelSelector = labelSelector; Namespaces = namespaces; TopologyKey = topologyKey; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1PodDisruptionBudgetSpec /// class. /// </summary> /// <param name="maxUnavailable">An eviction is allowed if at most /// "maxUnavailable" pods selected by "selector" are unavailable after /// the eviction, i.e. even in absence of the evicted pod. For example, /// one can prevent all voluntary evictions by specifying 0. This is a /// mutually exclusive setting with "minAvailable".</param> /// <param name="minAvailable">An eviction is allowed if at least /// "minAvailable" pods selected by "selector" will still be available /// after the eviction, i.e. even in the absence of the evicted pod. /// So for example you can prevent all voluntary evictions by /// specifying "100%".</param> /// <param name="selector">Label query over pods whose evictions are /// managed by the disruption budget. A null selector selects no pods. /// An empty selector ({}) also selects no pods, which differs from /// standard behavior of selecting all pods. In policy/v1, an empty /// selector will select all pods in the namespace.</param> public V1beta1PodDisruptionBudgetSpec(IntstrIntOrString maxUnavailable = default(IntstrIntOrString), IntstrIntOrString minAvailable = default(IntstrIntOrString), V1LabelSelector selector = default(V1LabelSelector)) { MaxUnavailable = maxUnavailable; MinAvailable = minAvailable; Selector = selector; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1NetworkPolicySpec class. /// </summary> /// <param name="podSelector">Selects the pods to which this /// NetworkPolicy object applies. The array of ingress rules is applied /// to any pods selected by this field. Multiple network policies can /// select the same set of pods. In this case, the ingress rules for /// each are combined additively. This field is NOT optional and /// follows standard label selector semantics. An empty podSelector /// matches all pods in this namespace.</param> /// <param name="egress">List of egress rules to be applied to the /// selected pods. Outgoing traffic is allowed if there are no /// NetworkPolicies selecting the pod (and cluster policy otherwise /// allows the traffic), OR if the traffic matches at least one egress /// rule across all of the NetworkPolicy objects whose podSelector /// matches the pod. If this field is empty then this NetworkPolicy /// limits all outgoing traffic (and serves solely to ensure that the /// pods it selects are isolated by default). This field is beta-level /// in 1.8</param> /// <param name="ingress">List of ingress rules to be applied to the /// selected pods. Traffic is allowed to a pod if there are no /// NetworkPolicies selecting the pod (and cluster policy otherwise /// allows the traffic), OR if the traffic source is the pod's local /// node, OR if the traffic matches at least one ingress rule across /// all of the NetworkPolicy objects whose podSelector matches the pod. /// If this field is empty then this NetworkPolicy does not allow any /// traffic (and serves solely to ensure that the pods it selects are /// isolated by default)</param> /// <param name="policyTypes">List of rule types that the NetworkPolicy /// relates to. Valid options are Ingress, Egress, or Ingress,Egress. /// If this field is not specified, it will default based on the /// existence of Ingress or Egress rules; policies that contain an /// Egress section are assumed to affect Egress, and all policies /// (whether or not they contain an Ingress section) are assumed to /// affect Ingress. If you want to write an egress-only policy, you /// must explicitly specify policyTypes [ "Egress" ]. Likewise, if you /// want to write a policy that specifies that no egress is allowed, /// you must specify a policyTypes value that include "Egress" (since /// such a policy would not include an Egress section and would /// otherwise default to just [ "Ingress" ]). This field is beta-level /// in 1.8</param> public V1NetworkPolicySpec(V1LabelSelector podSelector, IList <V1NetworkPolicyEgressRule> egress = default(IList <V1NetworkPolicyEgressRule>), IList <V1NetworkPolicyIngressRule> ingress = default(IList <V1NetworkPolicyIngressRule>), IList <string> policyTypes = default(IList <string>)) { Egress = egress; Ingress = ingress; PodSelector = podSelector; PolicyTypes = policyTypes; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1ReplicaSetSpec class. /// </summary> /// <param name="minReadySeconds">Minimum number of seconds for which a /// newly created pod should be ready without any of its container /// crashing, for it to be considered available. Defaults to 0 (pod /// will be considered available as soon as it is ready)</param> /// <param name="replicas">Replicas is the number of desired replicas. /// This is a pointer to distinguish between explicit zero and /// unspecified. Defaults to 1. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller</param> /// <param name="selector">Selector is a label query over pods that /// should match the replica count. If the selector is empty, it is /// defaulted to the labels present on the pod template. Label keys and /// values that must match in order to be controlled by this replica /// set. More info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param> /// <param name="template">Template is the object that describes the /// pod that will be created if insufficient replicas are detected. /// More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template</param> public V1beta1ReplicaSetSpec(int?minReadySeconds = default(int?), int?replicas = default(int?), V1LabelSelector selector = default(V1LabelSelector), V1PodTemplateSpec template = default(V1PodTemplateSpec)) { MinReadySeconds = minReadySeconds; Replicas = replicas; Selector = selector; Template = template; CustomInit(); }
/// <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(); }
/// <summary> /// Initializes a new instance of the V1TopologySpreadConstraint class. /// </summary> /// <param name="maxSkew">MaxSkew describes the degree to which pods /// may be unevenly distributed. When /// `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted /// difference between the number of matching pods in the target /// topology and the global minimum. For example, in a 3-zone cluster, /// MaxSkew is set to 1, and pods with the same labelSelector spread as /// 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if /// MaxSkew is 1, incoming pod can only be scheduled to zone3 to become /// 1/1/1; scheduling it onto zone1(zone2) would make the /// ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is /// 2, incoming pod can be scheduled onto any zone. When /// `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher /// precedence to topologies that satisfy it. It's a required field. /// Default value is 1 and 0 is not allowed.</param> /// <param name="topologyKey">TopologyKey is the key of node labels. /// Nodes that have a label with this key and identical values are /// considered to be in the same topology. We consider each <key, /// value> as a "bucket", and try to put balanced number of pods /// into each bucket. It's a required field.</param> /// <param name="whenUnsatisfiable">WhenUnsatisfiable indicates how to /// deal with a pod if it doesn't satisfy the spread constraint. - /// DoNotSchedule (default) tells the scheduler not to schedule it. - /// ScheduleAnyway tells the scheduler to schedule the pod in any /// location, /// but giving higher precedence to topologies that would help reduce /// the /// skew. /// A constraint is considered "Unsatisfiable" for an incoming pod if /// and only if every possible node assigment for that pod would /// violate "MaxSkew" on some topology. For example, in a 3-zone /// cluster, MaxSkew is set to 1, and pods with the same labelSelector /// spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P /// | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can /// only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as /// ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other /// words, the cluster can still be imbalanced, but scheduler won't /// make it *more* imbalanced. It's a required field.</param> /// <param name="labelSelector">LabelSelector is used to find matching /// pods. Pods that match this label selector are counted to determine /// the number of pods in their corresponding topology domain.</param> public V1TopologySpreadConstraint(int maxSkew, string topologyKey, string whenUnsatisfiable, V1LabelSelector labelSelector = default(V1LabelSelector)) { LabelSelector = labelSelector; MaxSkew = maxSkew; TopologyKey = topologyKey; WhenUnsatisfiable = whenUnsatisfiable; CustomInit(); }
/// <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(); }
/// <summary> /// Initializes a new instance of the V1PersistentVolumeClaimSpec /// class. /// </summary> /// <param name="accessModes">AccessModes contains the desired access /// modes the volume should have. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1</param> /// <param name="resources">Resources represents the minimum resources /// the volume should have. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources</param> /// <param name="selector">A label query over volumes to consider for /// binding.</param> /// <param name="storageClassName">Name of the StorageClass required by /// the claim. More info: /// https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1</param> /// <param name="volumeName">VolumeName is the binding reference to the /// PersistentVolume backing this claim.</param> public V1PersistentVolumeClaimSpec(IList <string> accessModes = default(IList <string>), V1ResourceRequirements resources = default(V1ResourceRequirements), V1LabelSelector selector = default(V1LabelSelector), string storageClassName = default(string), string volumeName = default(string)) { AccessModes = accessModes; Resources = resources; Selector = selector; StorageClassName = storageClassName; VolumeName = volumeName; CustomInit(); }
/// <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(); }
/// <summary> /// Initializes a new instance of the V1alpha1PodPresetSpec class. /// </summary> /// <param name="env">Env defines the collection of EnvVar to inject /// into containers.</param> /// <param name="envFrom">EnvFrom defines the collection of /// EnvFromSource to inject into containers.</param> /// <param name="selector">Selector is a label query over a set of /// resources, in this case pods. Required.</param> /// <param name="volumeMounts">VolumeMounts defines the collection of /// VolumeMount to inject into containers.</param> /// <param name="volumes">Volumes defines the collection of Volume to /// inject into the pod.</param> public V1alpha1PodPresetSpec(IList <V1EnvVar> env = default(IList <V1EnvVar>), IList <V1EnvFromSource> envFrom = default(IList <V1EnvFromSource>), V1LabelSelector selector = default(V1LabelSelector), IList <V1VolumeMount> volumeMounts = default(IList <V1VolumeMount>), IList <V1Volume> volumes = default(IList <V1Volume>)) { Env = env; EnvFrom = envFrom; Selector = selector; VolumeMounts = volumeMounts; Volumes = volumes; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1Webhook class. /// </summary> /// <param name="clientConfig">ClientConfig defines how to communicate /// with the hook. Required</param> /// <param name="name">The name of the admission webhook. Name should /// be fully qualified, e.g., imagepolicy.kubernetes.io, where /// "imagepolicy" is the name of the webhook, and kubernetes.io is the /// name of the organization. Required.</param> /// <param name="failurePolicy">FailurePolicy defines how unrecognized /// errors from the admission endpoint are handled - allowed values are /// Ignore or Fail. Defaults to Ignore.</param> /// <param name="namespaceSelector">NamespaceSelector decides whether /// to run the webhook on an object based on whether the namespace for /// that object matches the selector. If the object itself is a /// namespace, the matching is performed on object.metadata.labels. If /// the object is another cluster scoped resource, it never skips the /// webhook. /// /// For example, to run the webhook on any objects whose namespace is /// not associated with "runlevel" of "0" or "1"; you will set the /// selector as follows: "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "runlevel", /// "operator": "NotIn", /// "values": [ /// "0", /// "1" /// ] /// } /// ] /// } /// /// If instead you want to only run the webhook on any objects whose /// namespace is associated with the "environment" of "prod" or /// "staging"; you will set the selector as follows: /// "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "environment", /// "operator": "In", /// "values": [ /// "prod", /// "staging" /// ] /// } /// ] /// } /// /// See /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ /// for more examples of label selectors. /// /// Default to the empty LabelSelector, which matches /// everything.</param> /// <param name="rules">Rules describes what operations on what /// resources/subresources the webhook cares about. The webhook cares /// about an operation if it matches _any_ Rule. However, in order to /// prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks /// from putting the cluster in a state which cannot be recovered from /// without completely disabling the plugin, /// ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never /// called on admission requests for ValidatingWebhookConfiguration and /// MutatingWebhookConfiguration objects.</param> public V1beta1Webhook(V1beta1WebhookClientConfig clientConfig, string name, string failurePolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), IList <V1beta1RuleWithOperations> rules = default(IList <V1beta1RuleWithOperations>)) { ClientConfig = clientConfig; FailurePolicy = failurePolicy; Name = name; NamespaceSelector = namespaceSelector; Rules = rules; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta2DaemonSetSpec class. /// </summary> /// <param name="selector">A label query over pods that are managed by /// the daemon set. Must match in order to be controlled. It must match /// the pod template's labels. More info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param> /// <param name="template">An object that describes the pod that will /// be created. The DaemonSet will create exactly one copy of this pod /// on every node that matches the template's node selector (or on /// every node if no node selector is specified). More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template</param> /// <param name="minReadySeconds">The minimum number of seconds for /// which a newly created DaemonSet pod should be ready without any of /// its container crashing, for it to be considered available. Defaults /// to 0 (pod will be considered available as soon as it is /// ready).</param> /// <param name="revisionHistoryLimit">The number of old history to /// retain to allow rollback. This is a pointer to distinguish between /// explicit zero and not specified. Defaults to 10.</param> /// <param name="updateStrategy">An update strategy to replace existing /// DaemonSet pods with new pods.</param> public V1beta2DaemonSetSpec(V1LabelSelector selector, V1PodTemplateSpec template, int?minReadySeconds = default(int?), int?revisionHistoryLimit = default(int?), V1beta2DaemonSetUpdateStrategy updateStrategy = default(V1beta2DaemonSetUpdateStrategy)) { MinReadySeconds = minReadySeconds; RevisionHistoryLimit = revisionHistoryLimit; Selector = selector; Template = template; UpdateStrategy = updateStrategy; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1JobSpec class. /// </summary> /// <param name="template">Describes the pod that will be created when /// executing a job. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="activeDeadlineSeconds">Specifies the duration in /// seconds relative to the startTime that the job may be active before /// the system tries to terminate it; value must be positive /// integer</param> /// <param name="backoffLimit">Specifies the number of retries before /// marking this job failed. Defaults to 6</param> /// <param name="completions">Specifies the desired number of /// successfully finished pods the job should be run with. Setting to /// nil means that the success of any pod signals the success of all /// pods, and allows parallelism to have any positive value. Setting /// to 1 means that parallelism is limited to 1 and the success of that /// pod signals the success of the job. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="manualSelector">manualSelector controls generation of /// pod labels and pod selectors. Leave `manualSelector` unset unless /// you are certain what you are doing. When false or unset, the system /// pick labels unique to this job and appends those labels to the pod /// template. When true, the user is responsible for picking unique /// labels and specifying the selector. Failure to pick a unique label /// may cause this and other jobs to not function correctly. However, /// You may see `manualSelector=true` in jobs that were created with /// the old `extensions/v1beta1` API. More info: /// https://git.k8s.io/community/contributors/design-proposals/selector-generation.md</param> /// <param name="parallelism">Specifies the maximum desired number of /// pods the job should run at any given time. The actual number of /// pods running in steady state will be less than this number when /// ((.spec.completions - .status.successful) < .spec.parallelism), /// i.e. when the work left to do is less than max parallelism. More /// info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="selector">A label query over pods that should match /// the pod count. Normally, the system sets this field for you. More /// info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param> public V1JobSpec(V1PodTemplateSpec template, long?activeDeadlineSeconds = default(long?), int?backoffLimit = default(int?), int?completions = default(int?), bool?manualSelector = default(bool?), int?parallelism = default(int?), V1LabelSelector selector = default(V1LabelSelector)) { ActiveDeadlineSeconds = activeDeadlineSeconds; BackoffLimit = backoffLimit; Completions = completions; ManualSelector = manualSelector; Parallelism = parallelism; Selector = selector; Template = template; CustomInit(); }
/// <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-<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</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(); }
/// <summary> /// Initializes a new instance of the V1beta2StatefulSetSpec class. /// </summary> /// <param name="selector">selector is a label query over pods that /// should match the replica count. It must match the pod template's /// labels. More info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param> /// <param name="serviceName">serviceName is the name of the service /// that governs this StatefulSet. This service must exist before the /// StatefulSet, and is responsible for the network identity of the /// set. Pods get DNS/hostnames that follow the pattern: /// pod-specific-string.serviceName.default.svc.cluster.local where /// "pod-specific-string" is managed by the StatefulSet /// controller.</param> /// <param name="template">template is the object that describes the /// pod that will be created if insufficient replicas are detected. /// Each pod stamped out by the StatefulSet will fulfill this Template, /// but have a unique identity from the rest of the /// StatefulSet.</param> /// <param name="podManagementPolicy">podManagementPolicy controls how /// pods are created during initial scale up, when replacing pods on /// nodes, or when scaling down. The default policy is `OrderedReady`, /// where pods are created in increasing order (pod-0, then pod-1, etc) /// and the controller will wait until each pod is ready before /// continuing. When scaling down, the pods are removed in the opposite /// order. The alternative policy is `Parallel` which will create pods /// in parallel to match the desired scale without waiting, and on /// scale down will delete all pods at once.</param> /// <param name="replicas">replicas is the desired number of replicas /// of the given Template. These are replicas in the sense that they /// are instantiations of the same Template, but individual replicas /// also have a consistent identity. If unspecified, defaults to /// 1.</param> /// <param name="revisionHistoryLimit">revisionHistoryLimit is the /// maximum number of revisions that will be maintained in the /// StatefulSet's revision history. The revision history consists of /// all revisions not represented by a currently applied /// StatefulSetSpec version. The default value is 10.</param> /// <param name="updateStrategy">updateStrategy indicates the /// StatefulSetUpdateStrategy that will be employed to update Pods in /// the StatefulSet when a revision is made to Template.</param> /// <param name="volumeClaimTemplates">volumeClaimTemplates is a list /// of claims that pods are allowed to reference. The StatefulSet /// controller is responsible for mapping network identities to claims /// in a way that maintains the identity of a pod. Every claim in this /// list must have at least one matching (by name) volumeMount in one /// container in the template. A claim in this list takes precedence /// over any volumes in the template, with the same name.</param> public V1beta2StatefulSetSpec(V1LabelSelector selector, string serviceName, V1PodTemplateSpec template, string podManagementPolicy = default(string), int?replicas = default(int?), int?revisionHistoryLimit = default(int?), V1beta2StatefulSetUpdateStrategy updateStrategy = default(V1beta2StatefulSetUpdateStrategy), IList <V1PersistentVolumeClaim> volumeClaimTemplates = default(IList <V1PersistentVolumeClaim>)) { PodManagementPolicy = podManagementPolicy; Replicas = replicas; RevisionHistoryLimit = revisionHistoryLimit; Selector = selector; ServiceName = serviceName; Template = template; UpdateStrategy = updateStrategy; VolumeClaimTemplates = volumeClaimTemplates; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta2DeploymentSpec class. /// </summary> /// <param name="template">Template describes the pods that will be /// created.</param> /// <param name="minReadySeconds">Minimum number of seconds for which a /// newly created pod should be ready without any of its container /// crashing, for it to be considered available. Defaults to 0 (pod /// will be considered available as soon as it is ready)</param> /// <param name="paused">Indicates that the deployment is /// paused.</param> /// <param name="progressDeadlineSeconds">The maximum time in seconds /// for a deployment to make progress before it is considered to be /// failed. The deployment controller will continue to process failed /// deployments and a condition with a ProgressDeadlineExceeded reason /// will be surfaced in the deployment status. Note that progress will /// not be estimated during the time a deployment is paused. Defaults /// to 600s.</param> /// <param name="replicas">Number of desired pods. This is a pointer to /// distinguish between explicit zero and not specified. Defaults to /// 1.</param> /// <param name="revisionHistoryLimit">The number of old ReplicaSets to /// retain to allow rollback. This is a pointer to distinguish between /// explicit zero and not specified. Defaults to 10.</param> /// <param name="selector">Label selector for pods. Existing /// ReplicaSets whose pods are selected by this will be the ones /// affected by this deployment.</param> /// <param name="strategy">The deployment strategy to use to replace /// existing pods with new ones.</param> public V1beta2DeploymentSpec(V1PodTemplateSpec template, int?minReadySeconds = default(int?), bool?paused = default(bool?), int?progressDeadlineSeconds = default(int?), int?replicas = default(int?), int?revisionHistoryLimit = default(int?), V1LabelSelector selector = default(V1LabelSelector), V1beta2DeploymentStrategy strategy = default(V1beta2DeploymentStrategy)) { MinReadySeconds = minReadySeconds; Paused = paused; ProgressDeadlineSeconds = progressDeadlineSeconds; Replicas = replicas; RevisionHistoryLimit = revisionHistoryLimit; Selector = selector; Strategy = strategy; Template = template; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1beta1Webhook class. /// </summary> /// <param name="clientConfig">ClientConfig defines how to communicate /// with the hook. Required</param> /// <param name="name">The name of the admission webhook. Name should /// be fully qualified, e.g., imagepolicy.kubernetes.io, where /// "imagepolicy" is the name of the webhook, and kubernetes.io is the /// name of the organization. Required.</param> /// <param name="admissionReviewVersions">AdmissionReviewVersions is an /// ordered list of preferred `AdmissionReview` versions the Webhook /// expects. API server will try to use first version in the list which /// it supports. If none of the versions specified in this list /// supported by API server, validation will fail for this object. If a /// persisted webhook configuration specifies allowed versions and does /// not include any versions known to the API Server, calls to the /// webhook will fail and be subject to the failure policy. Default to /// `['v1beta1']`.</param> /// <param name="failurePolicy">FailurePolicy defines how unrecognized /// errors from the admission endpoint are handled - allowed values are /// Ignore or Fail. Defaults to Ignore.</param> /// <param name="namespaceSelector">NamespaceSelector decides whether /// to run the webhook on an object based on whether the namespace for /// that object matches the selector. If the object itself is a /// namespace, the matching is performed on object.metadata.labels. If /// the object is another cluster scoped resource, it never skips the /// webhook. /// /// For example, to run the webhook on any objects whose namespace is /// not associated with "runlevel" of "0" or "1"; you will set the /// selector as follows: "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "runlevel", /// "operator": "NotIn", /// "values": [ /// "0", /// "1" /// ] /// } /// ] /// } /// /// If instead you want to only run the webhook on any objects whose /// namespace is associated with the "environment" of "prod" or /// "staging"; you will set the selector as follows: /// "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "environment", /// "operator": "In", /// "values": [ /// "prod", /// "staging" /// ] /// } /// ] /// } /// /// See /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ /// for more examples of label selectors. /// /// Default to the empty LabelSelector, which matches /// everything.</param> /// <param name="rules">Rules describes what operations on what /// resources/subresources the webhook cares about. The webhook cares /// about an operation if it matches _any_ Rule. However, in order to /// prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks /// from putting the cluster in a state which cannot be recovered from /// without completely disabling the plugin, /// ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never /// called on admission requests for ValidatingWebhookConfiguration and /// MutatingWebhookConfiguration objects.</param> /// <param name="sideEffects">SideEffects states whether this webhookk /// has side effects. Acceptable values are: Unknown, None, Some, /// NoneOnDryRun Webhooks with side effects MUST implement a /// reconciliation system, since a request may be rejected by a future /// step in the admission change and the side effects therefore need to /// be undone. Requests with the dryRun attribute will be auto-rejected /// if they match a webhook with sideEffects == Unknown or Some. /// Defaults to Unknown.</param> /// <param name="timeoutSeconds">TimeoutSeconds specifies the timeout /// for this webhook. After the timeout passes, the webhook call will /// be ignored or the API call will fail based on the failure policy. /// The timeout value must be between 1 and 30 seconds. Default to 30 /// seconds.</param> public V1beta1Webhook(Admissionregistrationv1beta1WebhookClientConfig clientConfig, string name, IList <string> admissionReviewVersions = default(IList <string>), string failurePolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), IList <V1beta1RuleWithOperations> rules = default(IList <V1beta1RuleWithOperations>), string sideEffects = default(string), int?timeoutSeconds = default(int?)) { AdmissionReviewVersions = admissionReviewVersions; ClientConfig = clientConfig; FailurePolicy = failurePolicy; Name = name; NamespaceSelector = namespaceSelector; Rules = rules; SideEffects = sideEffects; TimeoutSeconds = timeoutSeconds; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1JobSpec class. /// </summary> /// <param name="template">Describes the pod that will be created when /// executing a job. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="activeDeadlineSeconds">Specifies the duration in /// seconds relative to the startTime that the job may be continuously /// active before the system tries to terminate it; value must be /// positive integer. If a Job is suspended (at creation or through an /// update), this timer will effectively be stopped and reset when the /// Job is resumed again.</param> /// <param name="backoffLimit">Specifies the number of retries before /// marking this job failed. Defaults to 6</param> /// <param name="completionMode">CompletionMode specifies how Pod /// completions are tracked. It can be `NonIndexed` (default) or /// `Indexed`. /// /// `NonIndexed` means that the Job is considered complete when there /// have been .spec.completions successfully completed Pods. Each Pod /// completion is homologous to each other. /// /// `Indexed` means that the Pods of a Job get an associated completion /// index from 0 to (.spec.completions - 1), available in the /// annotation batch.kubernetes.io/job-completion-index. The Job is /// considered complete when there is one successfully completed Pod /// for each index. When value is `Indexed`, .spec.completions must be /// specified and `.spec.parallelism` must be less than or equal to /// 10^5. /// /// This field is alpha-level and is only honored by servers that /// enable the IndexedJob feature gate. More completion modes can be /// added in the future. If the Job controller observes a mode that it /// doesn't recognize, the controller skips updates for the /// Job.</param> /// <param name="completions">Specifies the desired number of /// successfully finished pods the job should be run with. Setting to /// nil means that the success of any pod signals the success of all /// pods, and allows parallelism to have any positive value. Setting /// to 1 means that parallelism is limited to 1 and the success of that /// pod signals the success of the job. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="manualSelector">manualSelector controls generation of /// pod labels and pod selectors. Leave `manualSelector` unset unless /// you are certain what you are doing. When false or unset, the system /// pick labels unique to this job and appends those labels to the pod /// template. When true, the user is responsible for picking unique /// labels and specifying the selector. Failure to pick a unique label /// may cause this and other jobs to not function correctly. However, /// You may see `manualSelector=true` in jobs that were created with /// the old `extensions/v1beta1` API. More info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector</param> /// <param name="parallelism">Specifies the maximum desired number of /// pods the job should run at any given time. The actual number of /// pods running in steady state will be less than this number when /// ((.spec.completions - .status.successful) < .spec.parallelism), /// i.e. when the work left to do is less than max parallelism. More /// info: /// https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/</param> /// <param name="selector">A label query over pods that should match /// the pod count. Normally, the system sets this field for you. More /// info: /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors</param> /// <param name="suspend">Suspend specifies whether the Job controller /// should create Pods or not. If a Job is created with suspend set to /// true, no Pods are created by the Job controller. If a Job is /// suspended after creation (i.e. the flag goes from false to true), /// the Job controller will delete all active Pods associated with this /// Job. Users must design their workload to gracefully handle this. /// Suspending a Job will reset the StartTime field of the Job, /// effectively resetting the ActiveDeadlineSeconds timer too. This is /// an alpha field and requires the SuspendJob feature gate to be /// enabled; otherwise this field may not be set to true. Defaults to /// false.</param> /// <param name="ttlSecondsAfterFinished">ttlSecondsAfterFinished /// limits the lifetime of a Job that has finished execution (either /// Complete or Failed). If this field is set, ttlSecondsAfterFinished /// after the Job finishes, it is eligible to be automatically deleted. /// When the Job is being deleted, its lifecycle guarantees (e.g. /// finalizers) will be honored. If this field is unset, the Job won't /// be automatically deleted. If this field is set to zero, the Job /// becomes eligible to be deleted immediately after it finishes. This /// field is alpha-level and is only honored by servers that enable the /// TTLAfterFinished feature.</param> public V1JobSpec(V1PodTemplateSpec template, long?activeDeadlineSeconds = default(long?), int?backoffLimit = default(int?), string completionMode = default(string), int?completions = default(int?), bool?manualSelector = default(bool?), int?parallelism = default(int?), V1LabelSelector selector = default(V1LabelSelector), bool?suspend = default(bool?), int?ttlSecondsAfterFinished = default(int?)) { ActiveDeadlineSeconds = activeDeadlineSeconds; BackoffLimit = backoffLimit; CompletionMode = completionMode; Completions = completions; ManualSelector = manualSelector; Parallelism = parallelism; Selector = selector; Suspend = suspend; Template = template; TtlSecondsAfterFinished = ttlSecondsAfterFinished; CustomInit(); }
/// <summary> /// Initializes a new instance of the V1MutatingWebhook class. /// </summary> /// <param name="admissionReviewVersions">AdmissionReviewVersions is an /// ordered list of preferred `AdmissionReview` versions the Webhook /// expects. API server will try to use first version in the list which /// it supports. If none of the versions specified in this list /// supported by API server, validation will fail for this object. If a /// persisted webhook configuration specifies allowed versions and does /// not include any versions known to the API Server, calls to the /// webhook will fail and be subject to the failure policy.</param> /// <param name="clientConfig">ClientConfig defines how to communicate /// with the hook. Required</param> /// <param name="name">The name of the admission webhook. Name should /// be fully qualified, e.g., imagepolicy.kubernetes.io, where /// "imagepolicy" is the name of the webhook, and kubernetes.io is the /// name of the organization. Required.</param> /// <param name="sideEffects">SideEffects states whether this webhook /// has side effects. Acceptable values are: None, NoneOnDryRun /// (webhooks created via v1beta1 may also specify Some or Unknown). /// Webhooks with side effects MUST implement a reconciliation system, /// since a request may be rejected by a future step in the admission /// change and the side effects therefore need to be undone. Requests /// with the dryRun attribute will be auto-rejected if they match a /// webhook with sideEffects == Unknown or Some.</param> /// <param name="failurePolicy">FailurePolicy defines how unrecognized /// errors from the admission endpoint are handled - allowed values are /// Ignore or Fail. Defaults to Fail.</param> /// <param name="matchPolicy">matchPolicy defines how the "rules" list /// is used to match incoming requests. Allowed values are "Exact" or /// "Equivalent". /// /// - Exact: match a request only if it exactly matches a specified /// rule. For example, if deployments can be modified via apps/v1, /// apps/v1beta1, and extensions/v1beta1, but "rules" only included /// `apiGroups:["apps"], apiVersions:["v1"], resources: /// ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 /// would not be sent to the webhook. /// /// - Equivalent: match a request if modifies a resource listed in /// rules, even via another API group or version. For example, if /// deployments can be modified via apps/v1, apps/v1beta1, and /// extensions/v1beta1, and "rules" only included `apiGroups:["apps"], /// apiVersions:["v1"], resources: ["deployments"]`, a request to /// apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 /// and sent to the webhook. /// /// Defaults to "Equivalent"</param> /// <param name="namespaceSelector">NamespaceSelector decides whether /// to run the webhook on an object based on whether the namespace for /// that object matches the selector. If the object itself is a /// namespace, the matching is performed on object.metadata.labels. If /// the object is another cluster scoped resource, it never skips the /// webhook. /// /// For example, to run the webhook on any objects whose namespace is /// not associated with "runlevel" of "0" or "1"; you will set the /// selector as follows: "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "runlevel", /// "operator": "NotIn", /// "values": [ /// "0", /// "1" /// ] /// } /// ] /// } /// /// If instead you want to only run the webhook on any objects whose /// namespace is associated with the "environment" of "prod" or /// "staging"; you will set the selector as follows: /// "namespaceSelector": { /// "matchExpressions": [ /// { /// "key": "environment", /// "operator": "In", /// "values": [ /// "prod", /// "staging" /// ] /// } /// ] /// } /// /// See /// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ /// for more examples of label selectors. /// /// Default to the empty LabelSelector, which matches /// everything.</param> /// <param name="objectSelector">ObjectSelector decides whether to run /// the webhook based on if the object has matching labels. /// objectSelector is evaluated against both the oldObject and /// newObject that would be sent to the webhook, and is considered to /// match if either object matches the selector. A null object /// (oldObject in the case of create, or newObject in the case of /// delete) or an object that cannot have labels (like a /// DeploymentRollback or a PodProxyOptions object) is not considered /// to match. Use the object selector only if the webhook is opt-in, /// because end users may skip the admission webhook by setting the /// labels. Default to the empty LabelSelector, which matches /// everything.</param> /// <param name="reinvocationPolicy">reinvocationPolicy indicates /// whether this webhook should be called multiple times as part of a /// single admission evaluation. Allowed values are "Never" and /// "IfNeeded". /// /// Never: the webhook will not be called more than once in a single /// admission evaluation. /// /// IfNeeded: the webhook will be called at least one additional time /// as part of the admission evaluation if the object being admitted is /// modified by other admission plugins after the initial webhook call. /// Webhooks that specify this option *must* be idempotent, able to /// process objects they previously admitted. Note: * the number of /// additional invocations is not guaranteed to be exactly one. * if /// additional invocations result in further modifications to the /// object, webhooks are not guaranteed to be invoked again. * webhooks /// that use this option may be reordered to minimize the number of /// additional invocations. * to validate an object after all mutations /// are guaranteed complete, use a validating admission webhook /// instead. /// /// Defaults to "Never".</param> /// <param name="rules">Rules describes what operations on what /// resources/subresources the webhook cares about. The webhook cares /// about an operation if it matches _any_ Rule. However, in order to /// prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks /// from putting the cluster in a state which cannot be recovered from /// without completely disabling the plugin, /// ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never /// called on admission requests for ValidatingWebhookConfiguration and /// MutatingWebhookConfiguration objects.</param> /// <param name="timeoutSeconds">TimeoutSeconds specifies the timeout /// for this webhook. After the timeout passes, the webhook call will /// be ignored or the API call will fail based on the failure policy. /// The timeout value must be between 1 and 30 seconds. Default to 10 /// seconds.</param> public V1MutatingWebhook(IList <string> admissionReviewVersions, Admissionregistrationv1WebhookClientConfig clientConfig, string name, string sideEffects, string failurePolicy = default(string), string matchPolicy = default(string), V1LabelSelector namespaceSelector = default(V1LabelSelector), V1LabelSelector objectSelector = default(V1LabelSelector), string reinvocationPolicy = default(string), IList <V1RuleWithOperations> rules = default(IList <V1RuleWithOperations>), int?timeoutSeconds = default(int?)) { AdmissionReviewVersions = admissionReviewVersions; ClientConfig = clientConfig; FailurePolicy = failurePolicy; MatchPolicy = matchPolicy; Name = name; NamespaceSelector = namespaceSelector; ObjectSelector = objectSelector; ReinvocationPolicy = reinvocationPolicy; Rules = rules; SideEffects = sideEffects; TimeoutSeconds = timeoutSeconds; CustomInit(); }
/// <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(); }
/// <summary> /// Initializes a new instance of the V2beta2MetricIdentifier class. /// </summary> /// <param name="name">name is the name of the given metric</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 V2beta2MetricIdentifier(string name, V1LabelSelector selector = default(V1LabelSelector)) { Name = name; Selector = selector; CustomInit(); }