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

com.pulumi.kubernetes.policy.v1beta1.inputs.PodDisruptionBudgetSpecPatchArgs Maven / Gradle / Ivy

// *** 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.policy.v1beta1.inputs;

import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorPatchArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
 * 
 */
public final class PodDisruptionBudgetSpecPatchArgs extends com.pulumi.resources.ResourceArgs {

    public static final PodDisruptionBudgetSpecPatchArgs Empty = new PodDisruptionBudgetSpecPatchArgs();

    /**
     * An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
     * 
     */
    @Import(name="maxUnavailable")
    private @Nullable Output> maxUnavailable;

    /**
     * @return An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
     * 
     */
    public Optional>> maxUnavailable() {
        return Optional.ofNullable(this.maxUnavailable);
    }

    /**
     * An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
     * 
     */
    @Import(name="minAvailable")
    private @Nullable Output> minAvailable;

    /**
     * @return An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
     * 
     */
    public Optional>> minAvailable() {
        return Optional.ofNullable(this.minAvailable);
    }

    /**
     * Label query over pods whose evictions are managed by the disruption budget.
     * 
     */
    @Import(name="selector")
    private @Nullable Output selector;

    /**
     * @return Label query over pods whose evictions are managed by the disruption budget.
     * 
     */
    public Optional> selector() {
        return Optional.ofNullable(this.selector);
    }

    private PodDisruptionBudgetSpecPatchArgs() {}

    private PodDisruptionBudgetSpecPatchArgs(PodDisruptionBudgetSpecPatchArgs $) {
        this.maxUnavailable = $.maxUnavailable;
        this.minAvailable = $.minAvailable;
        this.selector = $.selector;
    }

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

    public static final class Builder {
        private PodDisruptionBudgetSpecPatchArgs $;

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

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

        /**
         * @param maxUnavailable An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
         * 
         * @return builder
         * 
         */
        public Builder maxUnavailable(@Nullable Output> maxUnavailable) {
            $.maxUnavailable = maxUnavailable;
            return this;
        }

        /**
         * @param maxUnavailable An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
         * 
         * @return builder
         * 
         */
        public Builder maxUnavailable(Either maxUnavailable) {
            return maxUnavailable(Output.of(maxUnavailable));
        }

        /**
         * @param maxUnavailable An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
         * 
         * @return builder
         * 
         */
        public Builder maxUnavailable(Integer maxUnavailable) {
            return maxUnavailable(Either.ofLeft(maxUnavailable));
        }

        /**
         * @param maxUnavailable An eviction is allowed if at most "maxUnavailable" pods selected by "selector" 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 "minAvailable".
         * 
         * @return builder
         * 
         */
        public Builder maxUnavailable(String maxUnavailable) {
            return maxUnavailable(Either.ofRight(maxUnavailable));
        }

        /**
         * @param minAvailable An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
         * 
         * @return builder
         * 
         */
        public Builder minAvailable(@Nullable Output> minAvailable) {
            $.minAvailable = minAvailable;
            return this;
        }

        /**
         * @param minAvailable An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
         * 
         * @return builder
         * 
         */
        public Builder minAvailable(Either minAvailable) {
            return minAvailable(Output.of(minAvailable));
        }

        /**
         * @param minAvailable An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
         * 
         * @return builder
         * 
         */
        public Builder minAvailable(Integer minAvailable) {
            return minAvailable(Either.ofLeft(minAvailable));
        }

        /**
         * @param minAvailable An eviction is allowed if at least "minAvailable" pods selected by "selector" 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 "100%".
         * 
         * @return builder
         * 
         */
        public Builder minAvailable(String minAvailable) {
            return minAvailable(Either.ofRight(minAvailable));
        }

        /**
         * @param selector Label query over pods whose evictions are managed by the disruption budget.
         * 
         * @return builder
         * 
         */
        public Builder selector(@Nullable Output selector) {
            $.selector = selector;
            return this;
        }

        /**
         * @param selector Label query over pods whose evictions are managed by the disruption budget.
         * 
         * @return builder
         * 
         */
        public Builder selector(LabelSelectorPatchArgs selector) {
            return selector(Output.of(selector));
        }

        public PodDisruptionBudgetSpecPatchArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy