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

com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfig.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.Any
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @property advancedMachineFeatures Specifies options for controlling
 * advanced machine features. Structure is documented below.
 * @property bootDiskKmsKey The Customer Managed Encryption Key used to encrypt the boot disk attached to each node in the node pool. This should be of the form projects/[KEY_PROJECT_ID]/locations/[LOCATION]/keyRings/[RING_NAME]/cryptoKeys/[KEY_NAME]. For more information about protecting resources with Cloud KMS Keys please see: 
 * @property confidentialNodes Configuration for [Confidential Nodes](https://cloud.google.com/kubernetes-engine/docs/how-to/confidential-gke-nodes) feature. Structure is documented below documented below.
 * @property diskSizeGb Size of the disk attached to each node, specified
 * in GB. The smallest allowed disk size is 10GB. Defaults to 100GB.
 * @property diskType Type of the disk attached to each node
 * (e.g. 'pd-standard', 'pd-balanced' or 'pd-ssd'). If unspecified, the default disk type is 'pd-standard'
 * @property effectiveTaints List of kubernetes taints applied to each node. Structure is documented above.
 * @property enableConfidentialStorage Enabling Confidential Storage will create boot disk with confidential mode. It is disabled by default.
 * @property ephemeralStorageConfig Parameters for the ephemeral storage filesystem. If unspecified, ephemeral storage is backed by the boot disk. Structure is documented below.
 * @property ephemeralStorageLocalSsdConfig Parameters for the ephemeral storage filesystem. If unspecified, ephemeral storage is backed by the boot disk. Structure is documented below.
 * @property fastSocket Parameters for the NCCL Fast Socket feature. If unspecified, NCCL Fast Socket will not be enabled on the node pool.
 * Node Pool must enable gvnic.
 * GKE version 1.25.2-gke.1700 or later.
 * Structure is documented below.
 * @property gcfsConfig Parameters for the Google Container Filesystem (GCFS).
 * If unspecified, GCFS will not be enabled on the node pool. When enabling this feature you must specify `image_type = "COS_CONTAINERD"` and `node_version` from GKE versions 1.19 or later to use it.
 * For GKE versions 1.19, 1.20, and 1.21, the recommended minimum `node_version` would be 1.19.15-gke.1300, 1.20.11-gke.1300, and 1.21.5-gke.1300 respectively.
 * A `machine_type` that has more than 16 GiB of memory is also recommended.
 * GCFS must be enabled in order to use [image streaming](https://cloud.google.com/kubernetes-engine/docs/how-to/image-streaming).
 * Structure is documented below.
 * @property guestAccelerators List of the type and count of accelerator cards attached to the instance.
 * Structure documented below.
 * @property gvnic Google Virtual NIC (gVNIC) is a virtual network interface.
 * Installing the gVNIC driver allows for more efficient traffic transmission across the Google network infrastructure.
 * gVNIC is an alternative to the virtIO-based ethernet driver. GKE nodes must use a Container-Optimized OS node image.
 * GKE node version 1.15.11-gke.15 or later
 * Structure is documented below.
 * @property hostMaintenancePolicy The maintenance policy for the hosts on which the GKE VMs run on.
 * @property imageType The image type to use for this node. Note that changing the image type
 * will delete and recreate all nodes in the node pool.
 * @property kubeletConfig Kubelet configuration, currently supported attributes can be found [here](https://cloud.google.com/sdk/gcloud/reference/beta/container/node-pools/create#--system-config-from-file).
 * Structure is documented below.
 * ```
 * kubelet_config {
 * cpu_manager_policy   = "static"
 * cpu_cfs_quota        = true
 * cpu_cfs_quota_period = "100us"
 * pod_pids_limit       = 1024
 * }
 * ```
 * @property labels The Kubernetes labels (key/value pairs) to be applied to each node. The kubernetes.io/ and k8s.io/ prefixes are
 * reserved by Kubernetes Core components and cannot be specified.
 * @property linuxNodeConfig Parameters that can be configured on Linux nodes. Structure is documented below.
 * @property localNvmeSsdBlockConfig Parameters for the local NVMe SSDs. Structure is documented below.
 * @property localSsdCount The amount of local SSD disks that will be
 * attached to each cluster node. Defaults to 0.
 * @property loggingVariant Parameter for specifying the type of logging agent used in a node pool. This will override any cluster-wide default value. Valid values include DEFAULT and MAX_THROUGHPUT. See [Increasing logging agent throughput](https://cloud.google.com/stackdriver/docs/solutions/gke/managing-logs#throughput) for more information.
 * @property machineType The name of a Google Compute Engine machine type.
 * Defaults to `e2-medium`. To create a custom machine type, value should be set as specified
 * [here](https://cloud.google.com/compute/docs/reference/latest/instances#machineType).
 * @property metadata The metadata key/value pairs assigned to instances in
 * the cluster. From GKE `1.12` onwards, `disable-legacy-endpoints` is set to
 * `true` by the API; if `metadata` is set but that default value is not
 * included, the provider will attempt to unset the value. To avoid this, set the
 * value in your config.
 * @property minCpuPlatform Minimum CPU platform to be used by this instance.
 * The instance may be scheduled on the specified or newer CPU platform. Applicable
 * values are the friendly names of CPU platforms, such as `Intel Haswell`. See the
 * [official documentation](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
 * for more information.
 * @property nodeGroup Setting this field will assign instances of this pool to run on the specified node group. This is useful for running workloads on [sole tenant nodes](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes).
 * @property oauthScopes The set of Google API scopes to be made available
 * on all of the node VMs under the "default" service account.
 * Use the "https://www.googleapis.com/auth/cloud-platform" scope to grant access to all APIs. It is recommended that you set `service_account` to a non-default service account and grant IAM roles to that service account for only the resources that it needs.
 * See the [official documentation](https://cloud.google.com/kubernetes-engine/docs/how-to/access-scopes) for information on migrating off of legacy access scopes.
 * @property preemptible A boolean that represents whether or not the underlying node VMs
 * are preemptible. See the [official documentation](https://cloud.google.com/container-engine/docs/preemptible-vm)
 * for more information. Defaults to false.
 * @property reservationAffinity The configuration of the desired reservation which instances could take capacity from. Structure is documented below.
 * @property resourceLabels The GCP labels (key/value pairs) to be applied to each node. Refer [here](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-managing-labels)
 * for how these labels are applied to clusters, node pools and nodes.
 * @property resourceManagerTags A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Tags must be according to specifications found [here](https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications). A maximum of 5 tag key-value pairs can be specified. Existing tags will be replaced with new values. Tags must be in one of the following formats ([KEY]=[VALUE]) 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. `{org_id}/{tag_key_name}={tag_value_name}` 3. `{project_id}/{tag_key_name}={tag_value_name}`.
 * @property sandboxConfig Sandbox configuration for this node.
 * @property secondaryBootDisks Parameters for secondary boot disks to preload container images and data on new nodes. Structure is documented below. `gcfs_config` must be `enabled=true` for this feature to work. `min_master_version` must also be set to use GKE 1.28.3-gke.106700 or later versions.
 * @property serviceAccount The service account to be used by the Node VMs.
 * If not specified, the "default" service account is used.
 * @property shieldedInstanceConfig Shielded Instance options. Structure is documented below.
 * @property soleTenantConfig Allows specifying multiple [node affinities](https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes#node_affinity_and_anti-affinity) useful for running workloads on [sole tenant nodes](https://cloud.google.com/kubernetes-engine/docs/how-to/sole-tenancy). `node_affinity` structure is documented below.
 * @property spot A boolean that represents whether the underlying node VMs are spot.
 * See the [official documentation](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms)
 * for more information. Defaults to false.
 * @property tags The list of instance tags applied to all nodes. Tags are used to identify
 * valid sources or targets for network firewalls.
 * @property taints A list of [Kubernetes taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/)
 * to apply to nodes. GKE's API can only set this field on cluster creation.
 * However, GKE will add taints to your nodes if you enable certain features such
 * as GPUs. If this field is set, any diffs on this field will cause the provider to
 * recreate the underlying resource. Taint values can be updated safely in
 * Kubernetes (eg. through `kubectl`), and it's recommended that you do not use
 * this field to manage taints. If you do, `lifecycle.ignore_changes` is
 * recommended. Structure is documented below.
 * @property workloadMetadataConfig Metadata configuration to expose to workloads on the node pool.
 * Structure is documented below.
 */
public data class ClusterNodeConfig(
    public val advancedMachineFeatures: ClusterNodeConfigAdvancedMachineFeatures? = null,
    public val bootDiskKmsKey: String? = null,
    public val confidentialNodes: ClusterNodeConfigConfidentialNodes? = null,
    public val diskSizeGb: Int? = null,
    public val diskType: String? = null,
    public val effectiveTaints: List? = null,
    public val enableConfidentialStorage: Boolean? = null,
    public val ephemeralStorageConfig: ClusterNodeConfigEphemeralStorageConfig? = null,
    public val ephemeralStorageLocalSsdConfig: ClusterNodeConfigEphemeralStorageLocalSsdConfig? =
        null,
    public val fastSocket: ClusterNodeConfigFastSocket? = null,
    public val gcfsConfig: ClusterNodeConfigGcfsConfig? = null,
    public val guestAccelerators: List? = null,
    public val gvnic: ClusterNodeConfigGvnic? = null,
    public val hostMaintenancePolicy: ClusterNodeConfigHostMaintenancePolicy? = null,
    public val imageType: String? = null,
    public val kubeletConfig: ClusterNodeConfigKubeletConfig? = null,
    public val labels: Map? = null,
    public val linuxNodeConfig: ClusterNodeConfigLinuxNodeConfig? = null,
    public val localNvmeSsdBlockConfig: ClusterNodeConfigLocalNvmeSsdBlockConfig? = null,
    public val localSsdCount: Int? = null,
    public val loggingVariant: String? = null,
    public val machineType: String? = null,
    public val metadata: Map? = null,
    public val minCpuPlatform: String? = null,
    public val nodeGroup: String? = null,
    public val oauthScopes: List? = null,
    public val preemptible: Boolean? = null,
    public val reservationAffinity: ClusterNodeConfigReservationAffinity? = null,
    public val resourceLabels: Map? = null,
    public val resourceManagerTags: Map? = null,
    public val sandboxConfig: ClusterNodeConfigSandboxConfig? = null,
    public val secondaryBootDisks: List? = null,
    public val serviceAccount: String? = null,
    public val shieldedInstanceConfig: ClusterNodeConfigShieldedInstanceConfig? = null,
    public val soleTenantConfig: ClusterNodeConfigSoleTenantConfig? = null,
    public val spot: Boolean? = null,
    public val tags: List? = null,
    public val taints: List? = null,
    public val workloadMetadataConfig: ClusterNodeConfigWorkloadMetadataConfig? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.container.outputs.ClusterNodeConfig): ClusterNodeConfig = ClusterNodeConfig(
            advancedMachineFeatures = javaType.advancedMachineFeatures().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigAdvancedMachineFeatures.Companion.toKotlin(args0)
                })
            }).orElse(null),
            bootDiskKmsKey = javaType.bootDiskKmsKey().map({ args0 -> args0 }).orElse(null),
            confidentialNodes = javaType.confidentialNodes().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigConfidentialNodes.Companion.toKotlin(args0)
                })
            }).orElse(null),
            diskSizeGb = javaType.diskSizeGb().map({ args0 -> args0 }).orElse(null),
            diskType = javaType.diskType().map({ args0 -> args0 }).orElse(null),
            effectiveTaints = javaType.effectiveTaints().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigEffectiveTaint.Companion.toKotlin(args0)
                })
            }),
            enableConfidentialStorage = javaType.enableConfidentialStorage().map({ args0 ->
                args0
            }).orElse(null),
            ephemeralStorageConfig = javaType.ephemeralStorageConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigEphemeralStorageConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            ephemeralStorageLocalSsdConfig = javaType.ephemeralStorageLocalSsdConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigEphemeralStorageLocalSsdConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            fastSocket = javaType.fastSocket().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigFastSocket.Companion.toKotlin(args0)
                })
            }).orElse(null),
            gcfsConfig = javaType.gcfsConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigGcfsConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            guestAccelerators = javaType.guestAccelerators().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigGuestAccelerator.Companion.toKotlin(args0)
                })
            }),
            gvnic = javaType.gvnic().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigGvnic.Companion.toKotlin(args0)
                })
            }).orElse(null),
            hostMaintenancePolicy = javaType.hostMaintenancePolicy().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigHostMaintenancePolicy.Companion.toKotlin(args0)
                })
            }).orElse(null),
            imageType = javaType.imageType().map({ args0 -> args0 }).orElse(null),
            kubeletConfig = javaType.kubeletConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigKubeletConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            labels = javaType.labels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            linuxNodeConfig = javaType.linuxNodeConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigLinuxNodeConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            localNvmeSsdBlockConfig = javaType.localNvmeSsdBlockConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigLocalNvmeSsdBlockConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            localSsdCount = javaType.localSsdCount().map({ args0 -> args0 }).orElse(null),
            loggingVariant = javaType.loggingVariant().map({ args0 -> args0 }).orElse(null),
            machineType = javaType.machineType().map({ args0 -> args0 }).orElse(null),
            metadata = javaType.metadata().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            minCpuPlatform = javaType.minCpuPlatform().map({ args0 -> args0 }).orElse(null),
            nodeGroup = javaType.nodeGroup().map({ args0 -> args0 }).orElse(null),
            oauthScopes = javaType.oauthScopes().map({ args0 -> args0 }),
            preemptible = javaType.preemptible().map({ args0 -> args0 }).orElse(null),
            reservationAffinity = javaType.reservationAffinity().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigReservationAffinity.Companion.toKotlin(args0)
                })
            }).orElse(null),
            resourceLabels = javaType.resourceLabels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            resourceManagerTags = javaType.resourceManagerTags().map({ args0 ->
                args0.key.to(args0.value)
            }).toMap(),
            sandboxConfig = javaType.sandboxConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigSandboxConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            secondaryBootDisks = javaType.secondaryBootDisks().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigSecondaryBootDisk.Companion.toKotlin(args0)
                })
            }),
            serviceAccount = javaType.serviceAccount().map({ args0 -> args0 }).orElse(null),
            shieldedInstanceConfig = javaType.shieldedInstanceConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigShieldedInstanceConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            soleTenantConfig = javaType.soleTenantConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigSoleTenantConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
            spot = javaType.spot().map({ args0 -> args0 }).orElse(null),
            tags = javaType.tags().map({ args0 -> args0 }),
            taints = javaType.taints().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigTaint.Companion.toKotlin(args0)
                })
            }),
            workloadMetadataConfig = javaType.workloadMetadataConfig().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.container.kotlin.outputs.ClusterNodeConfigWorkloadMetadataConfig.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy