com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.outputs.PodsMetricSource.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.autoscaling.v2beta1.kotlin.outputs
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector
import kotlin.String
import kotlin.Suppress
/**
* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.
* @property metricName metricName is the name of the metric in question
* @property selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics.
* @property targetAverageValue targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)
*/
public data class PodsMetricSource(
public val metricName: String,
public val selector: LabelSelector? = null,
public val targetAverageValue: String,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta1.outputs.PodsMetricSource): PodsMetricSource = PodsMetricSource(
metricName = javaType.metricName(),
selector = javaType.selector().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelector.Companion.toKotlin(args0)
})
}).orElse(null),
targetAverageValue = javaType.targetAverageValue(),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy