com.pulumi.kubernetes.policy.v1beta1.outputs.PodDisruptionBudgetSpecPatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** 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.outputs;
import com.pulumi.core.Either;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.meta.v1.outputs.LabelSelectorPatch;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class PodDisruptionBudgetSpecPatch {
/**
* @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".
*
*/
private @Nullable Either maxUnavailable;
/**
* @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%".
*
*/
private @Nullable Either minAvailable;
/**
* @return Label query over pods whose evictions are managed by the disruption budget.
*
*/
private @Nullable LabelSelectorPatch selector;
private PodDisruptionBudgetSpecPatch() {}
/**
* @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);
}
/**
* @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);
}
/**
* @return Label query over pods whose evictions are managed by the disruption budget.
*
*/
public Optional selector() {
return Optional.ofNullable(this.selector);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(PodDisruptionBudgetSpecPatch defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Either maxUnavailable;
private @Nullable Either minAvailable;
private @Nullable LabelSelectorPatch selector;
public Builder() {}
public Builder(PodDisruptionBudgetSpecPatch defaults) {
Objects.requireNonNull(defaults);
this.maxUnavailable = defaults.maxUnavailable;
this.minAvailable = defaults.minAvailable;
this.selector = defaults.selector;
}
@CustomType.Setter
public Builder maxUnavailable(@Nullable Either maxUnavailable) {
this.maxUnavailable = maxUnavailable;
return this;
}
@CustomType.Setter
public Builder minAvailable(@Nullable Either minAvailable) {
this.minAvailable = minAvailable;
return this;
}
@CustomType.Setter
public Builder selector(@Nullable LabelSelectorPatch selector) {
this.selector = selector;
return this;
}
public PodDisruptionBudgetSpecPatch build() {
final var _resultValue = new PodDisruptionBudgetSpecPatch();
_resultValue.maxUnavailable = maxUnavailable;
_resultValue.minAvailable = minAvailable;
_resultValue.selector = selector;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy