All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.apps.v1beta1.inputs.DeploymentSpecPatchArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.kubernetes.apps.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.kubernetes.apps.v1beta1.inputs.DeploymentStrategyPatchArgs;
import com.pulumi.kubernetes.apps.v1beta1.inputs.RollbackConfigPatchArgs;
import com.pulumi.kubernetes.core.v1.inputs.PodTemplateSpecPatchArgs;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorPatchArgs;
import java.lang.Boolean;
import java.lang.Integer;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * DeploymentSpec is the specification of the desired behavior of the Deployment.
 * 
 */
public final class DeploymentSpecPatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final DeploymentSpecPatchArgs Empty = new DeploymentSpecPatchArgs();

    /**
     * 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)
     * 
     */
    @Import(name="minReadySeconds")
    private @Nullable Output minReadySeconds;

    /**
     * @return 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)
     * 
     */
    public Optional> minReadySeconds() {
        return Optional.ofNullable(this.minReadySeconds);
    }

    /**
     * Indicates that the deployment is paused.
     * 
     */
    @Import(name="paused")
    private @Nullable Output paused;

    /**
     * @return Indicates that the deployment is paused.
     * 
     */
    public Optional> paused() {
        return Optional.ofNullable(this.paused);
    }

    /**
     * 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.
     * 
     */
    @Import(name="progressDeadlineSeconds")
    private @Nullable Output progressDeadlineSeconds;

    /**
     * @return 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.
     * 
     */
    public Optional> progressDeadlineSeconds() {
        return Optional.ofNullable(this.progressDeadlineSeconds);
    }

    /**
     * Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
     * 
     */
    @Import(name="replicas")
    private @Nullable Output replicas;

    /**
     * @return Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
     * 
     */
    public Optional> replicas() {
        return Optional.ofNullable(this.replicas);
    }

    /**
     * The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.
     * 
     */
    @Import(name="revisionHistoryLimit")
    private @Nullable Output revisionHistoryLimit;

    /**
     * @return The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.
     * 
     */
    public Optional> revisionHistoryLimit() {
        return Optional.ofNullable(this.revisionHistoryLimit);
    }

    /**
     * DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
     * 
     */
    @Import(name="rollbackTo")
    private @Nullable Output rollbackTo;

    /**
     * @return DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
     * 
     */
    public Optional> rollbackTo() {
        return Optional.ofNullable(this.rollbackTo);
    }

    /**
     * Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
     * 
     */
    public Optional> selector() {
        return Optional.ofNullable(this.selector);
    }

    /**
     * The deployment strategy to use to replace existing pods with new ones.
     * 
     */
    @Import(name="strategy")
    private @Nullable Output strategy;

    /**
     * @return The deployment strategy to use to replace existing pods with new ones.
     * 
     */
    public Optional> strategy() {
        return Optional.ofNullable(this.strategy);
    }

    /**
     * Template describes the pods that will be created.
     * 
     */
    @Import(name="template")
    private @Nullable Output template;

    /**
     * @return Template describes the pods that will be created.
     * 
     */
    public Optional> template() {
        return Optional.ofNullable(this.template);
    }

    private DeploymentSpecPatchArgs() {}

    private DeploymentSpecPatchArgs(DeploymentSpecPatchArgs $) {
        this.minReadySeconds = $.minReadySeconds;
        this.paused = $.paused;
        this.progressDeadlineSeconds = $.progressDeadlineSeconds;
        this.replicas = $.replicas;
        this.revisionHistoryLimit = $.revisionHistoryLimit;
        this.rollbackTo = $.rollbackTo;
        this.selector = $.selector;
        this.strategy = $.strategy;
        this.template = $.template;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(DeploymentSpecPatchArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private DeploymentSpecPatchArgs $;

        public Builder() {
            $ = new DeploymentSpecPatchArgs();
        }

        public Builder(DeploymentSpecPatchArgs defaults) {
            $ = new DeploymentSpecPatchArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param 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)
         * 
         * @return builder
         * 
         */
        public Builder minReadySeconds(@Nullable Output minReadySeconds) {
            $.minReadySeconds = minReadySeconds;
            return this;
        }

        /**
         * @param 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)
         * 
         * @return builder
         * 
         */
        public Builder minReadySeconds(Integer minReadySeconds) {
            return minReadySeconds(Output.of(minReadySeconds));
        }

        /**
         * @param paused Indicates that the deployment is paused.
         * 
         * @return builder
         * 
         */
        public Builder paused(@Nullable Output paused) {
            $.paused = paused;
            return this;
        }

        /**
         * @param paused Indicates that the deployment is paused.
         * 
         * @return builder
         * 
         */
        public Builder paused(Boolean paused) {
            return paused(Output.of(paused));
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder progressDeadlineSeconds(@Nullable Output progressDeadlineSeconds) {
            $.progressDeadlineSeconds = progressDeadlineSeconds;
            return this;
        }

        /**
         * @param 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.
         * 
         * @return builder
         * 
         */
        public Builder progressDeadlineSeconds(Integer progressDeadlineSeconds) {
            return progressDeadlineSeconds(Output.of(progressDeadlineSeconds));
        }

        /**
         * @param replicas Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
         * 
         * @return builder
         * 
         */
        public Builder replicas(@Nullable Output replicas) {
            $.replicas = replicas;
            return this;
        }

        /**
         * @param replicas Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
         * 
         * @return builder
         * 
         */
        public Builder replicas(Integer replicas) {
            return replicas(Output.of(replicas));
        }

        /**
         * @param 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 2.
         * 
         * @return builder
         * 
         */
        public Builder revisionHistoryLimit(@Nullable Output revisionHistoryLimit) {
            $.revisionHistoryLimit = revisionHistoryLimit;
            return this;
        }

        /**
         * @param 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 2.
         * 
         * @return builder
         * 
         */
        public Builder revisionHistoryLimit(Integer revisionHistoryLimit) {
            return revisionHistoryLimit(Output.of(revisionHistoryLimit));
        }

        /**
         * @param rollbackTo DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
         * 
         * @return builder
         * 
         */
        public Builder rollbackTo(@Nullable Output rollbackTo) {
            $.rollbackTo = rollbackTo;
            return this;
        }

        /**
         * @param rollbackTo DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.
         * 
         * @return builder
         * 
         */
        public Builder rollbackTo(RollbackConfigPatchArgs rollbackTo) {
            return rollbackTo(Output.of(rollbackTo));
        }

        /**
         * @param selector Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.
         * 
         * @return builder
         * 
         */
        public Builder selector(LabelSelectorPatchArgs selector) {
            return selector(Output.of(selector));
        }

        /**
         * @param strategy The deployment strategy to use to replace existing pods with new ones.
         * 
         * @return builder
         * 
         */
        public Builder strategy(@Nullable Output strategy) {
            $.strategy = strategy;
            return this;
        }

        /**
         * @param strategy The deployment strategy to use to replace existing pods with new ones.
         * 
         * @return builder
         * 
         */
        public Builder strategy(DeploymentStrategyPatchArgs strategy) {
            return strategy(Output.of(strategy));
        }

        /**
         * @param template Template describes the pods that will be created.
         * 
         * @return builder
         * 
         */
        public Builder template(@Nullable Output template) {
            $.template = template;
            return this;
        }

        /**
         * @param template Template describes the pods that will be created.
         * 
         * @return builder
         * 
         */
        public Builder template(PodTemplateSpecPatchArgs template) {
            return template(Output.of(template));
        }

        public DeploymentSpecPatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy