Example #1
0
 /// <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 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?), IDictionary <string, string> selector = default(IDictionary <string, string>), V1PodTemplateSpec template = default(V1PodTemplateSpec))
 {
     MinReadySeconds = minReadySeconds;
     Replicas        = replicas;
     Selector        = selector;
     Template        = template;
     CustomInit();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the 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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds</param>
 /// <param name="metadata">Standard object's metadata. More info:
 /// https://git.k8s.io/community/contributors/devel/sig-architecture/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/sig-architecture/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))
 {
     ApiVersion = apiVersion;
     Kind       = kind;
     Metadata   = metadata;
     Template   = template;
     CustomInit();
 }
Example #4
0
 /// <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();
 }
Example #5
0
 /// <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) &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>
 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();
 }
Example #6
0
 /// <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();
 }
Example #7
0
 /// <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();
 }
Example #8
0
 /// <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) &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="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();
 }