/// <summary>
 /// Initializes a new instance of the <see cref="V1beta1StatefulSetSpec" /> class.
 /// </summary>
 /// <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 &#x60;OrderedReady&#x60;, 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 &#x60;Parallel&#x60; 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&#39;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="Selector">selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. 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 \&quot;pod-specific-string\&quot; is managed by the StatefulSet controller. (required).</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. (required).</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 V1beta1StatefulSetSpec(string PodManagementPolicy = default(string), int?Replicas = default(int?), int?RevisionHistoryLimit = default(int?), V1LabelSelector Selector = default(V1LabelSelector), string ServiceName = default(string), V1PodTemplateSpec Template = default(V1PodTemplateSpec), V1beta1StatefulSetUpdateStrategy UpdateStrategy = default(V1beta1StatefulSetUpdateStrategy), List <V1PersistentVolumeClaim> VolumeClaimTemplates = default(List <V1PersistentVolumeClaim>))
 {
     // to ensure "ServiceName" is required (not null)
     if (ServiceName == null)
     {
         throw new InvalidDataException("ServiceName is a required property for V1beta1StatefulSetSpec and cannot be null");
     }
     else
     {
         this.ServiceName = ServiceName;
     }
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for V1beta1StatefulSetSpec and cannot be null");
     }
     else
     {
         this.Template = Template;
     }
     this.PodManagementPolicy  = PodManagementPolicy;
     this.Replicas             = Replicas;
     this.RevisionHistoryLimit = RevisionHistoryLimit;
     this.Selector             = Selector;
     this.UpdateStrategy       = UpdateStrategy;
     this.VolumeClaimTemplates = VolumeClaimTemplates;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1DaemonSetSpec" /> class.
 /// </summary>
 /// <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="Selector">A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. 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&#39;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 (required).</param>
 /// <param name="TemplateGeneration">DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation..</param>
 /// <param name="UpdateStrategy">An update strategy to replace existing DaemonSet pods with new pods..</param>
 public V1beta1DaemonSetSpec(int?MinReadySeconds = default(int?), int?RevisionHistoryLimit = default(int?), V1LabelSelector Selector = default(V1LabelSelector), V1PodTemplateSpec Template = default(V1PodTemplateSpec), long?TemplateGeneration = default(long?), V1beta1DaemonSetUpdateStrategy UpdateStrategy = default(V1beta1DaemonSetUpdateStrategy))
 {
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for V1beta1DaemonSetSpec and cannot be null");
     }
     else
     {
         this.Template = Template;
     }
     this.MinReadySeconds      = MinReadySeconds;
     this.RevisionHistoryLimit = RevisionHistoryLimit;
     this.Selector             = Selector;
     this.TemplateGeneration   = TemplateGeneration;
     this.UpdateStrategy       = UpdateStrategy;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1JobSpec" /> class.
 /// </summary>
 /// <param name="ActiveDeadlineSeconds">Optional 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="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 &#x60;manualSelector&#x60; 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 &#x60;manualSelector&#x3D;true&#x60; in jobs that were created with the old &#x60;extensions/v1beta1&#x60; 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) &lt; .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="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/ (required).</param>
 public V1JobSpec(long?ActiveDeadlineSeconds = default(long?), int?Completions = default(int?), bool?ManualSelector = default(bool?), int?Parallelism = default(int?), V1LabelSelector Selector = default(V1LabelSelector), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for V1JobSpec and cannot be null");
     }
     else
     {
         this.Template = Template;
     }
     this.ActiveDeadlineSeconds = ActiveDeadlineSeconds;
     this.Completions           = Completions;
     this.ManualSelector        = ManualSelector;
     this.Parallelism           = Parallelism;
     this.Selector = Selector;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExtensionsV1beta1DeploymentSpec" /> 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="Paused">Indicates that the deployment is paused and will not be processed by the deployment controller..</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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default..</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..</param>
 /// <param name="RollbackTo">The config this deployment is rolling back to. Will be cleared after rollback is done..</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>
 /// <param name="Template">Template describes the pods that will be created. (required).</param>
 public ExtensionsV1beta1DeploymentSpec(int?MinReadySeconds = default(int?), bool?Paused = default(bool?), int?ProgressDeadlineSeconds = default(int?), int?Replicas = default(int?), int?RevisionHistoryLimit = default(int?), ExtensionsV1beta1RollbackConfig RollbackTo = default(ExtensionsV1beta1RollbackConfig), V1LabelSelector Selector = default(V1LabelSelector), ExtensionsV1beta1DeploymentStrategy Strategy = default(ExtensionsV1beta1DeploymentStrategy), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for ExtensionsV1beta1DeploymentSpec and cannot be null");
     }
     else
     {
         this.Template = Template;
     }
     this.MinReadySeconds         = MinReadySeconds;
     this.Paused                  = Paused;
     this.ProgressDeadlineSeconds = ProgressDeadlineSeconds;
     this.Replicas                = Replicas;
     this.RevisionHistoryLimit    = RevisionHistoryLimit;
     this.RollbackTo              = RollbackTo;
     this.Selector                = Selector;
     this.Strategy                = Strategy;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="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(List <string> AccessModes = default(List <string>), V1ResourceRequirements Resources = default(V1ResourceRequirements), V1LabelSelector Selector = default(V1LabelSelector), string StorageClassName = default(string), string VolumeName = default(string))
 {
     this.AccessModes      = AccessModes;
     this.Resources        = Resources;
     this.Selector         = Selector;
     this.StorageClassName = StorageClassName;
     this.VolumeName       = VolumeName;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1NetworkPolicySpec" /> class.
 /// </summary>
 /// <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&#39;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="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. (required).</param>
 public V1NetworkPolicySpec(List <V1NetworkPolicyIngressRule> Ingress = default(List <V1NetworkPolicyIngressRule>), V1LabelSelector PodSelector = default(V1LabelSelector))
 {
     // to ensure "PodSelector" is required (not null)
     if (PodSelector == null)
     {
         throw new InvalidDataException("PodSelector is a required property for V1NetworkPolicySpec and cannot be null");
     }
     else
     {
         this.PodSelector = PodSelector;
     }
     this.Ingress = Ingress;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1NetworkPolicyPeer" /> class.
 /// </summary>
 /// <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 V1beta1NetworkPolicyPeer(V1LabelSelector NamespaceSelector = default(V1LabelSelector), V1LabelSelector PodSelector = default(V1LabelSelector))
 {
     this.NamespaceSelector = NamespaceSelector;
     this.PodSelector       = PodSelector;
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="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(List <V1EnvVar> Env = default(List <V1EnvVar>), List <V1EnvFromSource> EnvFrom = default(List <V1EnvFromSource>), V1LabelSelector Selector = default(V1LabelSelector), List <V1VolumeMount> VolumeMounts = default(List <V1VolumeMount>), List <V1Volume> Volumes = default(List <V1Volume>))
 {
     this.Env          = Env;
     this.EnvFrom      = EnvFrom;
     this.Selector     = Selector;
     this.VolumeMounts = VolumeMounts;
     this.Volumes      = Volumes;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1PodDisruptionBudgetSpec" /> class.
 /// </summary>
 /// <param name="MaxUnavailable">An eviction is allowed if at most \&quot;maxUnavailable\&quot; pods selected by \&quot;selector\&quot; 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 \&quot;minAvailable\&quot;..</param>
 /// <param name="MinAvailable">An eviction is allowed if at least \&quot;minAvailable\&quot; pods selected by \&quot;selector\&quot; 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 \&quot;100%\&quot;..</param>
 /// <param name="Selector">Label query over pods whose evictions are managed by the disruption budget..</param>
 public V1beta1PodDisruptionBudgetSpec(Object MaxUnavailable = default(Object), Object MinAvailable = default(Object), V1LabelSelector Selector = default(V1LabelSelector))
 {
     this.MaxUnavailable = MaxUnavailable;
     this.MinAvailable   = MinAvailable;
     this.Selector       = Selector;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V1PodAffinityTerm" /> class.
 /// </summary>
 /// <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 \&quot;this pod&#39;s namespace\&quot;.</param>
 /// <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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \&quot;all topologies\&quot; (\&quot;all topologies\&quot; here means all the topologyKeys indicated by scheduler command-line argument - -failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed..</param>
 public V1PodAffinityTerm(V1LabelSelector LabelSelector = default(V1LabelSelector), List <string> Namespaces = default(List <string>), string TopologyKey = default(string))
 {
     this.LabelSelector = LabelSelector;
     this.Namespaces    = Namespaces;
     this.TopologyKey   = TopologyKey;
 }
Esempio n. 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="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))
 {
     this.MinReadySeconds = MinReadySeconds;
     this.Replicas        = Replicas;
     this.Selector        = Selector;
     this.Template        = Template;
 }