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

com.pulumi.gcp.container.kotlin.outputs.NodePoolUpgradeSettings.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property blueGreenSettings The settings to adjust [blue green upgrades](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pool-upgrade-strategies#blue-green-upgrade-strategy).
 * Structure is documented below
 * @property maxSurge The number of additional nodes that can be added to the node pool during
 * an upgrade. Increasing `max_surge` raises the number of nodes that can be upgraded simultaneously.
 * Can be set to 0 or greater.
 * @property maxUnavailable The number of nodes that can be simultaneously unavailable during
 * an upgrade. Increasing `max_unavailable` raises the number of nodes that can be upgraded in
 * parallel. Can be set to 0 or greater.
 * `max_surge` and `max_unavailable` must not be negative and at least one of them must be greater than zero.
 * @property strategy The upgrade stragey to be used for upgrading the nodes.
 */
public data class NodePoolUpgradeSettings(
    public val blueGreenSettings: NodePoolUpgradeSettingsBlueGreenSettings? = null,
    public val maxSurge: Int? = null,
    public val maxUnavailable: Int? = null,
    public val strategy: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.container.outputs.NodePoolUpgradeSettings): NodePoolUpgradeSettings = NodePoolUpgradeSettings(
            blueGreenSettings = javaType.blueGreenSettings().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.NodePoolUpgradeSettingsBlueGreenSettings.Companion.toKotlin(args0)
                })
            }).orElse(null),
            maxSurge = javaType.maxSurge().map({ args0 -> args0 }).orElse(null),
            maxUnavailable = javaType.maxUnavailable().map({ args0 -> args0 }).orElse(null),
            strategy = javaType.strategy().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy