com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs.ResourceClaimStatusArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.resource.v1alpha3.inputs.ResourceClaimStatusArgs.builder
import kotlin.Boolean
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* ResourceClaimStatus tracks whether the resource has been allocated and what the result of that was.
* @property allocation Allocation is set once the claim has been allocated successfully.
* @property deallocationRequested Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.
* This is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.
* This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
* @property reservedFor ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.
* In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.
* Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.
* There can be at most 32 such reservations. This may get increased in the future, but not reduced.
*/
public data class ResourceClaimStatusArgs(
public val allocation: Output? = null,
public val deallocationRequested: Output? = null,
public val reservedFor: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.resource.v1alpha3.inputs.ResourceClaimStatusArgs =
com.pulumi.kubernetes.resource.v1alpha3.inputs.ResourceClaimStatusArgs.builder()
.allocation(allocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.deallocationRequested(deallocationRequested?.applyValue({ args0 -> args0 }))
.reservedFor(
reservedFor?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [ResourceClaimStatusArgs].
*/
@PulumiTagMarker
public class ResourceClaimStatusArgsBuilder internal constructor() {
private var allocation: Output? = null
private var deallocationRequested: Output? = null
private var reservedFor: Output>? = null
/**
* @param value Allocation is set once the claim has been allocated successfully.
*/
@JvmName("gnmddbvmlgdpoawh")
public suspend fun allocation(`value`: Output) {
this.allocation = value
}
/**
* @param value Indicates that a claim is to be deallocated. While this is set, no new consumers may be added to ReservedFor.
* This is only used if the claim needs to be deallocated by a DRA driver. That driver then must deallocate this claim and reset the field together with clearing the Allocation field.
* This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
*/
@JvmName("wtsgrjrxixpqvjmx")
public suspend fun deallocationRequested(`value`: Output) {
this.deallocationRequested = value
}
/**
* @param value ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.
* In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.
* Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.
* There can be at most 32 such reservations. This may get increased in the future, but not reduced.
*/
@JvmName("udohnywiwcdacepm")
public suspend fun reservedFor(`value`: Output>) {
this.reservedFor = value
}
@JvmName("nsyaoswpjyxvmcco")
public suspend fun reservedFor(vararg values: Output) {
this.reservedFor = Output.all(values.asList())
}
/**
* @param values ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started. A claim that is in use or might be in use because it has been reserved must not get deallocated.
* In a cluster with multiple scheduler instances, two pods might get scheduled concurrently by different schedulers. When they reference the same ResourceClaim which already has reached its maximum number of consumers, only one pod can be scheduled.
* Both schedulers try to add their pod to the claim.status.reservedFor field, but only the update that reaches the API server first gets stored. The other one fails with an error and the scheduler which issued it knows that it must put the pod back into the queue, waiting for the ResourceClaim to become usable again.
* There can be at most 32 such reservations. This may get increased in the future, but not reduced.
*/
@JvmName("euihxprwfqrnxshf")
public suspend fun reservedFor(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy