@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
924 lines (923 loc) • 36.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "../types";
/**
* Add a node pool to a container cluster.
*
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const keyPair = config.requireObject("keyPair");
* const availabilityZone = config.requireObject("availabilityZone");
* const nodePool = new huaweicloud.cce.NodePool("nodePool", {
* clusterId: clusterId,
* os: "EulerOS 2.5",
* initialNodeCount: 2,
* flavorId: "s3.large.4",
* availabilityZone: availabilityZone,
* keyPair: _var.keypair,
* scallEnable: true,
* minNodeCount: 1,
* maxNodeCount: 10,
* scaleDownCooldownTime: 100,
* priority: 1,
* type: "vm",
* rootVolume: {
* size: 40,
* volumetype: "SAS",
* },
* dataVolumes: [{
* size: 100,
* volumetype: "SAS",
* }],
* });
* ```
* ## Node pool with storage configuration
* ### PrePaid node pool
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const keyPair = config.requireObject("keyPair");
* const availabilityZone = config.requireObject("availabilityZone");
* const nodePool = new huaweicloud.cce.NodePool("nodePool", {
* clusterId: clusterId,
* os: "EulerOS 2.5",
* initialNodeCount: 2,
* flavorId: "s3.large.4",
* availabilityZone: availabilityZone,
* keyPair: _var.keypair,
* scallEnable: true,
* minNodeCount: 1,
* maxNodeCount: 10,
* scaleDownCooldownTime: 100,
* priority: 1,
* type: "vm",
* chargingMode: "prePaid",
* periodUnit: "month",
* period: 1,
* rootVolume: {
* size: 40,
* volumetype: "SAS",
* },
* dataVolumes: [{
* size: 100,
* volumetype: "SAS",
* }],
* });
* ```
*
* > You need to remove all nodes in the node pool on the console, before deleting a prepaid node pool.
*
* ## Node pool with extension scale groups
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const clusterId = config.requireObject("clusterId");
* const keyPair = config.requireObject("keyPair");
* const availabilityZone1 = config.requireObject("availabilityZone1");
* const availabilityZone2 = config.requireObject("availabilityZone2");
* const nodePool = new huaweicloud.cce.NodePool("nodePool", {
* clusterId: clusterId,
* os: "EulerOS 2.5",
* initialNodeCount: 2,
* flavorId: "s3.large.4",
* availabilityZone: availabilityZone1,
* keyPair: _var.keypair,
* scallEnable: true,
* minNodeCount: 1,
* maxNodeCount: 10,
* scaleDownCooldownTime: 100,
* priority: 1,
* type: "vm",
* rootVolume: {
* size: 40,
* volumetype: "SAS",
* },
* dataVolumes: [{
* size: 100,
* volumetype: "SAS",
* }],
* extensionScaleGroups: [
* {
* metadata: {
* name: "group1",
* },
* spec: {
* flavor: "s3.large.4",
* az: availabilityZone1,
* autoscaling: {
* extensionPriority: 1,
* enable: true,
* },
* },
* },
* {
* metadata: {
* name: "group2",
* },
* spec: {
* flavor: "s3.xlarge.4",
* az: availabilityZone1,
* autoscaling: {
* extensionPriority: 1,
* enable: true,
* },
* },
* },
* {
* metadata: {
* name: "group3",
* },
* spec: {
* flavor: "s3.xlarge.4",
* az: availabilityZone2,
* autoscaling: {
* extensionPriority: 1,
* enable: true,
* },
* },
* },
* ],
* });
* ```
*
* ## Import
*
* CCE node pool can be imported using the cluster ID and node pool ID separated by a slash, e.g. bash
*
* ```sh
* $ pulumi import huaweicloud:Cce/nodePool:NodePool my_node_pool <cluster_id>/<id>
* ```
*
* Note that the imported state may not be identical to your resource definition, due to some attributes missing from the API response, security or some other reason. The missing attributes include`password`, `extend_params`, `taints`, `initial_node_count`, `pod_security_groups` and `extension_scale_groups`. It is generally recommended running `terraform plan` after importing a node pool. You can then decide if changes should be applied to the node pool, or the resource definition should be updated to align with the node pool. Also you can ignore changes as below. hcl resource "huaweicloud_cce_node_pool" "my_node_pool" {
*
* ...
*
* lifecycle {
*
* ignore_changes = [
*
* password, extend_params,
*
* ]
*
* } }
*/
export declare class NodePool extends pulumi.CustomResource {
/**
* Get an existing NodePool resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NodePoolState, opts?: pulumi.CustomResourceOptions): NodePool;
/**
* Returns true if the given object is an instance of NodePool. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is NodePool;
/**
* Specifies whether auto renew is enabled. Valid values are "true" and "false".
*/
readonly autoRenew: pulumi.Output<string>;
/**
* Specifies the name of the available partition (AZ). Default value
* is random to create nodes in a random AZ in the node pool.
*/
readonly availabilityZone: pulumi.Output<string | undefined>;
/**
* Billing mode of a node.
*/
readonly billingMode: pulumi.Output<number>;
/**
* Specifies the charging mode of the CCE node pool. Valid values are
* *prePaid* and *postPaid*, defaults to *postPaid*.
*/
readonly chargingMode: pulumi.Output<string>;
/**
* Specifies the cluster ID.
*/
readonly clusterId: pulumi.Output<string>;
/**
* The current number of the nodes.
*/
readonly currentNodeCount: pulumi.Output<number>;
/**
* Specifies the configuration of the data disks.
* The structure is described below.
*/
readonly dataVolumes: pulumi.Output<outputs.Cce.NodePoolDataVolume[]>;
/**
* Specifies the ECS group ID. If specified, the node will be created under
* the cloud server group.
*/
readonly ecsGroupId: pulumi.Output<string | undefined>;
readonly enableForceNew: pulumi.Output<string | undefined>;
/**
* Specifies the enterprise project ID of the node pool.
* If updated, the new value will apply only to new nodes.
*/
readonly enterpriseProjectId: pulumi.Output<string>;
/**
* schema: Deprecated; This parameter has been replaced by the 'extend_params' parameter.
*/
readonly extendParam: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the disk expansion parameters.
*/
readonly extendParams: pulumi.Output<outputs.Cce.NodePoolExtendParams>;
/**
* Specifies the configurations of extended scaling groups in the node pool.
* The object structure is documented below.
*/
readonly extensionScaleGroups: pulumi.Output<outputs.Cce.NodePoolExtensionScaleGroup[] | undefined>;
/**
* Specifies the flavor ID.
*/
readonly flavorId: pulumi.Output<string>;
/**
* Specifies the hostname config of the kubernetes node,
* which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.
* The object structure is documented below.
*/
readonly hostnameConfig: pulumi.Output<outputs.Cce.NodePoolHostnameConfig>;
/**
* Specifies the initial number of expected nodes in the node pool.
* This parameter can be also used to manually scale the node count afterwards.
*/
readonly initialNodeCount: pulumi.Output<number>;
/**
* Specifies the custom initialization flags.
*/
readonly initializedConditions: pulumi.Output<string[]>;
/**
* Specifies the key pair name when logging in to select the key pair mode.
* This parameter and `password` are alternative.
*/
readonly keyPair: pulumi.Output<string | undefined>;
/**
* Specifies the label policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
readonly labelPolicyOnExistingNodes: pulumi.Output<string>;
/**
* Specifies the tags of a Kubernetes node, key/value pair format.
*/
readonly labels: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the maximum number of nodes that can be retained in the scaling group
* during auto scaling. The value must be greater than or equal to that of `minNodeCount`, and can neither be greater
* than the maximum number of nodes allowed by the cluster nor the maximum number of nodes in the node pool.
*/
readonly maxNodeCount: pulumi.Output<number | undefined>;
/**
* Specifies the maximum number of instances a node is allowed to create.
*/
readonly maxPods: pulumi.Output<number>;
/**
* Specifies the minimum number of nodes in the scaling group during auto scaling.
* The value must be greater than **0**.
*/
readonly minNodeCount: pulumi.Output<number | undefined>;
/**
* Specifies the name of an extended scaling group.
* The value cannot be default and can contain a maximum of 55 characters.
* Only digits, lowercase letters, and hyphens (-) are allowed.
*/
readonly name: pulumi.Output<string>;
/**
* Specifies the operating system of the node.
* The value can be **EulerOS 2.9** and **CentOS 7.6** e.g. For more details,
* please see [documentation](https://support.huaweicloud.com/intl/en-us/api-cce/node-os.html).
* This parameter is required when the `nodeImageId` in `extendParams` is not specified.
*/
readonly os: pulumi.Output<string>;
/**
* Specifies the root password when logging in to select the password mode.
* The password consists of 8 to 26 characters and must contain at least three of following: uppercase letters,
* lowercase letters, digits, special characters(!@$%^-_=+[{}]:,./?~#*).
* This parameter can be plain or salted and is alternative to `keyPair`.
*/
readonly password: pulumi.Output<string | undefined>;
/**
* Specifies the charging period of the CCE node pool. If `periodUnit` is set to
* *month*, the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter
* is mandatory if `chargingMode` is set to *prePaid*.
*/
readonly period: pulumi.Output<number | undefined>;
/**
* Specifies the charging period unit of the CCE node pool.
* Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*.
*/
readonly periodUnit: pulumi.Output<string | undefined>;
/**
* Specifies the list of security group IDs for the pod.
* Only supported in CCE Turbo clusters of v1.19 and above.
*/
readonly podSecurityGroups: pulumi.Output<string[] | undefined>;
/**
* Specifies the script to be executed after installation.
* The input value can be a Base64 encoded string or not.
*/
readonly postinstall: pulumi.Output<string | undefined>;
/**
* Specifies the script to be executed before installation.
* The input value can be a Base64 encoded string or not.
*/
readonly preinstall: pulumi.Output<string | undefined>;
/**
* Specifies the weight of the node pool.
* A node pool with a higher weight has a higher priority during scaling.
*/
readonly priority: pulumi.Output<number | undefined>;
/**
* The region in which to create the CCE pool resource. If omitted, the
* provider-level region will be used. Changing this creates a new CCE node pool resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the configuration of the system disk.
* The structure is described below.
*/
readonly rootVolume: pulumi.Output<outputs.Cce.NodePoolRootVolume>;
/**
* Specifies the runtime of the CCE node pool. Valid values are *docker* and
* *containerd*.
*/
readonly runtime: pulumi.Output<string>;
/**
* Specifies the time interval between two scaling operations, in minutes.
*/
readonly scaleDownCooldownTime: pulumi.Output<number | undefined>;
/**
* Specifies whether to enable auto scaling.
* If Autoscaler is enabled, install the autoscaler add-on to use the auto scaling feature.
*/
readonly scallEnable: pulumi.Output<boolean | undefined>;
/**
* Specifies the list of custom security group IDs for the node pool.
* If specified, the nodes will be put in these security groups. When specifying a security group, do not modify
* the rules of the port on which CCE running depends. For details, see
* [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
*/
readonly securityGroups: pulumi.Output<string[]>;
/**
* Node status information.
*/
readonly status: pulumi.Output<string>;
/**
* Specifies the disk initialization management parameter.
* If omitted, disks are managed based on the DockerLVMConfigOverride parameter in extendParam.
* This parameter is supported for clusters of v1.15.11 and later.
* If the node has both local and EVS disks attached,
* this parameter must be specified, or it may result in unexpected disk partitions.
* If you want to change the value range of a data disk to **20** to **32768**, this parameter must be specified.
* If you want to use the shared disk space (with the runtime and Kubernetes partitions cancelled),
* this parameter must be specified.
* If you want to store system components in the system disk, this parameter must be specified.
*/
readonly storage: pulumi.Output<outputs.Cce.NodePoolStorage | undefined>;
/**
* Specifies the ID of the subnet to which the NIC belongs.
*/
readonly subnetId: pulumi.Output<string>;
/**
* Specifies the ID list of the subnet to which the NIC belongs.
*/
readonly subnetLists: pulumi.Output<string[] | undefined>;
/**
* Specifies the tag policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **ignore**.
*/
readonly tagPolicyOnExistingNodes: pulumi.Output<string>;
/**
* Specifies the tags of a VM node, key/value pair format.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Specifies the taint policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
readonly taintPolicyOnExistingNodes: pulumi.Output<string>;
/**
* Specifies the taints configuration of the nodes to set anti-affinity.
* The structure is described below.
*/
readonly taints: pulumi.Output<outputs.Cce.NodePoolTaint[] | undefined>;
/**
* Specifies the hostname type of the kubernetes node.
* The value can be:
* + **privateIp**: The Kubernetes node is named after its IP address.
* + **cceNodeName**: The Kubernetes node is named after the CCE node.
*/
readonly type: pulumi.Output<string>;
/**
* Create a NodePool resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: NodePoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering NodePool resources.
*/
export interface NodePoolState {
/**
* Specifies whether auto renew is enabled. Valid values are "true" and "false".
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the name of the available partition (AZ). Default value
* is random to create nodes in a random AZ in the node pool.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Billing mode of a node.
*/
billingMode?: pulumi.Input<number>;
/**
* Specifies the charging mode of the CCE node pool. Valid values are
* *prePaid* and *postPaid*, defaults to *postPaid*.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster ID.
*/
clusterId?: pulumi.Input<string>;
/**
* The current number of the nodes.
*/
currentNodeCount?: pulumi.Input<number>;
/**
* Specifies the configuration of the data disks.
* The structure is described below.
*/
dataVolumes?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolDataVolume>[]>;
/**
* Specifies the ECS group ID. If specified, the node will be created under
* the cloud server group.
*/
ecsGroupId?: pulumi.Input<string>;
enableForceNew?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID of the node pool.
* If updated, the new value will apply only to new nodes.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* schema: Deprecated; This parameter has been replaced by the 'extend_params' parameter.
*/
extendParam?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the disk expansion parameters.
*/
extendParams?: pulumi.Input<inputs.Cce.NodePoolExtendParams>;
/**
* Specifies the configurations of extended scaling groups in the node pool.
* The object structure is documented below.
*/
extensionScaleGroups?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolExtensionScaleGroup>[]>;
/**
* Specifies the flavor ID.
*/
flavorId?: pulumi.Input<string>;
/**
* Specifies the hostname config of the kubernetes node,
* which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.
* The object structure is documented below.
*/
hostnameConfig?: pulumi.Input<inputs.Cce.NodePoolHostnameConfig>;
/**
* Specifies the initial number of expected nodes in the node pool.
* This parameter can be also used to manually scale the node count afterwards.
*/
initialNodeCount?: pulumi.Input<number>;
/**
* Specifies the custom initialization flags.
*/
initializedConditions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the key pair name when logging in to select the key pair mode.
* This parameter and `password` are alternative.
*/
keyPair?: pulumi.Input<string>;
/**
* Specifies the label policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
labelPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the tags of a Kubernetes node, key/value pair format.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the maximum number of nodes that can be retained in the scaling group
* during auto scaling. The value must be greater than or equal to that of `minNodeCount`, and can neither be greater
* than the maximum number of nodes allowed by the cluster nor the maximum number of nodes in the node pool.
*/
maxNodeCount?: pulumi.Input<number>;
/**
* Specifies the maximum number of instances a node is allowed to create.
*/
maxPods?: pulumi.Input<number>;
/**
* Specifies the minimum number of nodes in the scaling group during auto scaling.
* The value must be greater than **0**.
*/
minNodeCount?: pulumi.Input<number>;
/**
* Specifies the name of an extended scaling group.
* The value cannot be default and can contain a maximum of 55 characters.
* Only digits, lowercase letters, and hyphens (-) are allowed.
*/
name?: pulumi.Input<string>;
/**
* Specifies the operating system of the node.
* The value can be **EulerOS 2.9** and **CentOS 7.6** e.g. For more details,
* please see [documentation](https://support.huaweicloud.com/intl/en-us/api-cce/node-os.html).
* This parameter is required when the `nodeImageId` in `extendParams` is not specified.
*/
os?: pulumi.Input<string>;
/**
* Specifies the root password when logging in to select the password mode.
* The password consists of 8 to 26 characters and must contain at least three of following: uppercase letters,
* lowercase letters, digits, special characters(!@$%^-_=+[{}]:,./?~#*).
* This parameter can be plain or salted and is alternative to `keyPair`.
*/
password?: pulumi.Input<string>;
/**
* Specifies the charging period of the CCE node pool. If `periodUnit` is set to
* *month*, the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter
* is mandatory if `chargingMode` is set to *prePaid*.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the CCE node pool.
* Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the list of security group IDs for the pod.
* Only supported in CCE Turbo clusters of v1.19 and above.
*/
podSecurityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the script to be executed after installation.
* The input value can be a Base64 encoded string or not.
*/
postinstall?: pulumi.Input<string>;
/**
* Specifies the script to be executed before installation.
* The input value can be a Base64 encoded string or not.
*/
preinstall?: pulumi.Input<string>;
/**
* Specifies the weight of the node pool.
* A node pool with a higher weight has a higher priority during scaling.
*/
priority?: pulumi.Input<number>;
/**
* The region in which to create the CCE pool resource. If omitted, the
* provider-level region will be used. Changing this creates a new CCE node pool resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the configuration of the system disk.
* The structure is described below.
*/
rootVolume?: pulumi.Input<inputs.Cce.NodePoolRootVolume>;
/**
* Specifies the runtime of the CCE node pool. Valid values are *docker* and
* *containerd*.
*/
runtime?: pulumi.Input<string>;
/**
* Specifies the time interval between two scaling operations, in minutes.
*/
scaleDownCooldownTime?: pulumi.Input<number>;
/**
* Specifies whether to enable auto scaling.
* If Autoscaler is enabled, install the autoscaler add-on to use the auto scaling feature.
*/
scallEnable?: pulumi.Input<boolean>;
/**
* Specifies the list of custom security group IDs for the node pool.
* If specified, the nodes will be put in these security groups. When specifying a security group, do not modify
* the rules of the port on which CCE running depends. For details, see
* [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
*/
securityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Node status information.
*/
status?: pulumi.Input<string>;
/**
* Specifies the disk initialization management parameter.
* If omitted, disks are managed based on the DockerLVMConfigOverride parameter in extendParam.
* This parameter is supported for clusters of v1.15.11 and later.
* If the node has both local and EVS disks attached,
* this parameter must be specified, or it may result in unexpected disk partitions.
* If you want to change the value range of a data disk to **20** to **32768**, this parameter must be specified.
* If you want to use the shared disk space (with the runtime and Kubernetes partitions cancelled),
* this parameter must be specified.
* If you want to store system components in the system disk, this parameter must be specified.
*/
storage?: pulumi.Input<inputs.Cce.NodePoolStorage>;
/**
* Specifies the ID of the subnet to which the NIC belongs.
*/
subnetId?: pulumi.Input<string>;
/**
* Specifies the ID list of the subnet to which the NIC belongs.
*/
subnetLists?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the tag policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **ignore**.
*/
tagPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the tags of a VM node, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the taint policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
taintPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the taints configuration of the nodes to set anti-affinity.
* The structure is described below.
*/
taints?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolTaint>[]>;
/**
* Specifies the hostname type of the kubernetes node.
* The value can be:
* + **privateIp**: The Kubernetes node is named after its IP address.
* + **cceNodeName**: The Kubernetes node is named after the CCE node.
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a NodePool resource.
*/
export interface NodePoolArgs {
/**
* Specifies whether auto renew is enabled. Valid values are "true" and "false".
*/
autoRenew?: pulumi.Input<string>;
/**
* Specifies the name of the available partition (AZ). Default value
* is random to create nodes in a random AZ in the node pool.
*/
availabilityZone?: pulumi.Input<string>;
/**
* Specifies the charging mode of the CCE node pool. Valid values are
* *prePaid* and *postPaid*, defaults to *postPaid*.
*/
chargingMode?: pulumi.Input<string>;
/**
* Specifies the cluster ID.
*/
clusterId: pulumi.Input<string>;
/**
* Specifies the configuration of the data disks.
* The structure is described below.
*/
dataVolumes?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolDataVolume>[]>;
/**
* Specifies the ECS group ID. If specified, the node will be created under
* the cloud server group.
*/
ecsGroupId?: pulumi.Input<string>;
enableForceNew?: pulumi.Input<string>;
/**
* Specifies the enterprise project ID of the node pool.
* If updated, the new value will apply only to new nodes.
*/
enterpriseProjectId?: pulumi.Input<string>;
/**
* schema: Deprecated; This parameter has been replaced by the 'extend_params' parameter.
*/
extendParam?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the disk expansion parameters.
*/
extendParams?: pulumi.Input<inputs.Cce.NodePoolExtendParams>;
/**
* Specifies the configurations of extended scaling groups in the node pool.
* The object structure is documented below.
*/
extensionScaleGroups?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolExtensionScaleGroup>[]>;
/**
* Specifies the flavor ID.
*/
flavorId: pulumi.Input<string>;
/**
* Specifies the hostname config of the kubernetes node,
* which is supported by clusters of v1.23.6-r0 to v1.25 or clusters of v1.25.2-r0 or later versions.
* The object structure is documented below.
*/
hostnameConfig?: pulumi.Input<inputs.Cce.NodePoolHostnameConfig>;
/**
* Specifies the initial number of expected nodes in the node pool.
* This parameter can be also used to manually scale the node count afterwards.
*/
initialNodeCount: pulumi.Input<number>;
/**
* Specifies the custom initialization flags.
*/
initializedConditions?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the key pair name when logging in to select the key pair mode.
* This parameter and `password` are alternative.
*/
keyPair?: pulumi.Input<string>;
/**
* Specifies the label policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
labelPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the tags of a Kubernetes node, key/value pair format.
*/
labels?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the maximum number of nodes that can be retained in the scaling group
* during auto scaling. The value must be greater than or equal to that of `minNodeCount`, and can neither be greater
* than the maximum number of nodes allowed by the cluster nor the maximum number of nodes in the node pool.
*/
maxNodeCount?: pulumi.Input<number>;
/**
* Specifies the maximum number of instances a node is allowed to create.
*/
maxPods?: pulumi.Input<number>;
/**
* Specifies the minimum number of nodes in the scaling group during auto scaling.
* The value must be greater than **0**.
*/
minNodeCount?: pulumi.Input<number>;
/**
* Specifies the name of an extended scaling group.
* The value cannot be default and can contain a maximum of 55 characters.
* Only digits, lowercase letters, and hyphens (-) are allowed.
*/
name?: pulumi.Input<string>;
/**
* Specifies the operating system of the node.
* The value can be **EulerOS 2.9** and **CentOS 7.6** e.g. For more details,
* please see [documentation](https://support.huaweicloud.com/intl/en-us/api-cce/node-os.html).
* This parameter is required when the `nodeImageId` in `extendParams` is not specified.
*/
os?: pulumi.Input<string>;
/**
* Specifies the root password when logging in to select the password mode.
* The password consists of 8 to 26 characters and must contain at least three of following: uppercase letters,
* lowercase letters, digits, special characters(!@$%^-_=+[{}]:,./?~#*).
* This parameter can be plain or salted and is alternative to `keyPair`.
*/
password?: pulumi.Input<string>;
/**
* Specifies the charging period of the CCE node pool. If `periodUnit` is set to
* *month*, the value ranges from 1 to 9. If `periodUnit` is set to *year*, the value ranges from 1 to 3. This parameter
* is mandatory if `chargingMode` is set to *prePaid*.
*/
period?: pulumi.Input<number>;
/**
* Specifies the charging period unit of the CCE node pool.
* Valid values are *month* and *year*. This parameter is mandatory if `chargingMode` is set to *prePaid*.
*/
periodUnit?: pulumi.Input<string>;
/**
* Specifies the list of security group IDs for the pod.
* Only supported in CCE Turbo clusters of v1.19 and above.
*/
podSecurityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the script to be executed after installation.
* The input value can be a Base64 encoded string or not.
*/
postinstall?: pulumi.Input<string>;
/**
* Specifies the script to be executed before installation.
* The input value can be a Base64 encoded string or not.
*/
preinstall?: pulumi.Input<string>;
/**
* Specifies the weight of the node pool.
* A node pool with a higher weight has a higher priority during scaling.
*/
priority?: pulumi.Input<number>;
/**
* The region in which to create the CCE pool resource. If omitted, the
* provider-level region will be used. Changing this creates a new CCE node pool resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the configuration of the system disk.
* The structure is described below.
*/
rootVolume: pulumi.Input<inputs.Cce.NodePoolRootVolume>;
/**
* Specifies the runtime of the CCE node pool. Valid values are *docker* and
* *containerd*.
*/
runtime?: pulumi.Input<string>;
/**
* Specifies the time interval between two scaling operations, in minutes.
*/
scaleDownCooldownTime?: pulumi.Input<number>;
/**
* Specifies whether to enable auto scaling.
* If Autoscaler is enabled, install the autoscaler add-on to use the auto scaling feature.
*/
scallEnable?: pulumi.Input<boolean>;
/**
* Specifies the list of custom security group IDs for the node pool.
* If specified, the nodes will be put in these security groups. When specifying a security group, do not modify
* the rules of the port on which CCE running depends. For details, see
* [documentation](https://support.huaweicloud.com/intl/en-us/cce_faq/cce_faq_00265.html).
*/
securityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the disk initialization management parameter.
* If omitted, disks are managed based on the DockerLVMConfigOverride parameter in extendParam.
* This parameter is supported for clusters of v1.15.11 and later.
* If the node has both local and EVS disks attached,
* this parameter must be specified, or it may result in unexpected disk partitions.
* If you want to change the value range of a data disk to **20** to **32768**, this parameter must be specified.
* If you want to use the shared disk space (with the runtime and Kubernetes partitions cancelled),
* this parameter must be specified.
* If you want to store system components in the system disk, this parameter must be specified.
*/
storage?: pulumi.Input<inputs.Cce.NodePoolStorage>;
/**
* Specifies the ID of the subnet to which the NIC belongs.
*/
subnetId?: pulumi.Input<string>;
/**
* Specifies the ID list of the subnet to which the NIC belongs.
*/
subnetLists?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Specifies the tag policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **ignore**.
*/
tagPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the tags of a VM node, key/value pair format.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Specifies the taint policy on existing nodes.
* The value can be **ignore** and **refresh**, defaults to **refresh**.
*/
taintPolicyOnExistingNodes?: pulumi.Input<string>;
/**
* Specifies the taints configuration of the nodes to set anti-affinity.
* The structure is described below.
*/
taints?: pulumi.Input<pulumi.Input<inputs.Cce.NodePoolTaint>[]>;
/**
* Specifies the hostname type of the kubernetes node.
* The value can be:
* + **privateIp**: The Kubernetes node is named after its IP address.
* + **cceNodeName**: The Kubernetes node is named after the CCE node.
*/
type?: pulumi.Input<string>;
}