コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1DaemonSetSpec" /> class.
 /// </summary>
 /// <param name="Selector">Selector is 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: http://kubernetes.io/docs/user-guide/labels#label-selectors.</param>
 /// <param name="Template">Template is the 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: http://kubernetes.io/docs/user-guide/replication-controller#pod-template (required).</param>
 public V1beta1DaemonSetSpec(UnversionedLabelSelector Selector = default(UnversionedLabelSelector), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     // 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.Selector = Selector;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1StatefulSetSpec" /> class.
 /// </summary>
 /// <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="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: http://kubernetes.io/docs/user-guide/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="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(int?Replicas = default(int?), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), string ServiceName = default(string), V1PodTemplateSpec Template = default(V1PodTemplateSpec), 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.Replicas             = Replicas;
     this.Selector             = Selector;
     this.VolumeClaimTemplates = VolumeClaimTemplates;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1PodDisruptionBudgetSpec" /> class.
 /// </summary>
 /// <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(IntstrIntOrString MinAvailable = default(IntstrIntOrString), UnversionedLabelSelector Selector = default(UnversionedLabelSelector))
 {
     this.MinAvailable = MinAvailable;
     this.Selector     = Selector;
 }
コード例 #4
0
 /// <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 omitted, this selector selects no namespaces. 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 not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace..</param>
 public V1beta1NetworkPolicyPeer(UnversionedLabelSelector NamespaceSelector = default(UnversionedLabelSelector), UnversionedLabelSelector PodSelector = default(UnversionedLabelSelector))
 {
     this.NamespaceSelector = NamespaceSelector;
     this.PodSelector       = PodSelector;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1NetworkPolicySpec" /> class.
 /// </summary>
 /// <param name="Ingress">List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, 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 affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list..</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 V1beta1NetworkPolicySpec(List <V1beta1NetworkPolicyIngressRule> Ingress = default(List <V1beta1NetworkPolicyIngressRule>), UnversionedLabelSelector PodSelector = default(UnversionedLabelSelector))
 {
     // to ensure "PodSelector" is required (not null)
     if (PodSelector == null)
     {
         throw new InvalidDataException("PodSelector is a required property for V1beta1NetworkPolicySpec and cannot be null");
     }
     else
     {
         this.PodSelector = PodSelector;
     }
     this.Ingress = Ingress;
 }
コード例 #6
0
ファイル: V1JobSpec.cs プロジェクト: mbohlool/client-csharp
 /// <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">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: http://kubernetes.io/docs/user-guide/jobs.</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: http://releases.k8s.io/HEAD/docs/design/selector-generation.md.</param>
 /// <param name="Parallelism">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: http://kubernetes.io/docs/user-guide/jobs.</param>
 /// <param name="Selector">Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors.</param>
 /// <param name="Template">Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs (required).</param>
 public V1JobSpec(long?ActiveDeadlineSeconds = default(long?), int?Completions = default(int?), bool?ManualSelector = default(bool?), int?Parallelism = default(int?), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), 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;
 }
コード例 #7
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: http://kubernetes.io/docs/user-guide/replication-controller#what-is-a-replication-controller.</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: http://kubernetes.io/docs/user-guide/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: http://kubernetes.io/docs/user-guide/replication-controller#pod-template.</param>
 public V1beta1ReplicaSetSpec(int?MinReadySeconds = default(int?), int?Replicas = default(int?), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     this.MinReadySeconds = MinReadySeconds;
     this.Replicas        = Replicas;
     this.Selector        = Selector;
     this.Template        = Template;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1beta1DeploymentSpec" /> 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 V1beta1DeploymentSpec(int?MinReadySeconds = default(int?), bool?Paused = default(bool?), int?ProgressDeadlineSeconds = default(int?), int?Replicas = default(int?), int?RevisionHistoryLimit = default(int?), V1beta1RollbackConfig RollbackTo = default(V1beta1RollbackConfig), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), V1beta1DeploymentStrategy Strategy = default(V1beta1DeploymentStrategy), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     // to ensure "Template" is required (not null)
     if (Template == null)
     {
         throw new InvalidDataException("Template is a required property for V1beta1DeploymentSpec 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;
 }
コード例 #9
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: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1.</param>
 /// <param name="Resources">Resources represents the minimum resources the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#resources.</param>
 /// <param name="Selector">A label query over volumes to consider for binding..</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), UnversionedLabelSelector Selector = default(UnversionedLabelSelector), string VolumeName = default(string))
 {
     this.AccessModes = AccessModes;
     this.Resources   = Resources;
     this.Selector    = Selector;
     this.VolumeName  = VolumeName;
 }