コード例 #1
0
 /// <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;
 }
コード例 #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;
 }
コード例 #3
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;
 }
コード例 #4
0
ファイル: V1JobSpec.cs プロジェクト: virajs/Kubernetes.DotNet
 /// <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;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1PodTemplate" /> class.
 /// </summary>
 /// <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/api-conventions.md#resources.</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/api-conventions.md#types-kinds.</param>
 /// <param name="Metadata">Standard object&#39;s metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.</param>
 /// <param name="Template">Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.</param>
 public V1PodTemplate(string ApiVersion = default(string), string Kind = default(string), V1ObjectMeta Metadata = default(V1ObjectMeta), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     this.ApiVersion = ApiVersion;
     this.Kind       = Kind;
     this.Metadata   = Metadata;
     this.Template   = Template;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V1ReplicationControllerSpec" /> 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 Replicas count. If 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 replication controller, 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">Template is the object that describes the pod that will be created if insufficient replicas are detected. This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template.</param>
 public V1ReplicationControllerSpec(int?MinReadySeconds = default(int?), int?Replicas = default(int?), Dictionary <string, string> Selector = default(Dictionary <string, string>), V1PodTemplateSpec Template = default(V1PodTemplateSpec))
 {
     this.MinReadySeconds = MinReadySeconds;
     this.Replicas        = Replicas;
     this.Selector        = Selector;
     this.Template        = Template;
 }
コード例 #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: 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;
 }