diff --git a/cluster/expected/cluster/expected.json b/cluster/expected/cluster/expected.json index b26cc46f05..362997ed73 100644 --- a/cluster/expected/cluster/expected.json +++ b/cluster/expected/cluster/expected.json @@ -9,7 +9,7 @@ }, "cluster": "cn-mocknet", "initialNodeCount": 0, - "name": "cn-apps-pool", + "namePrefix": "cn-apps-pool", "nodeConfig": { "labels": { "cn_apps": "true" @@ -38,7 +38,7 @@ }, "cluster": "cn-mocknet", "initialNodeCount": 1, - "name": "cn-infra-pool", + "namePrefix": "cn-infra-pool", "nodeConfig": { "labels": { "cn_infra": "true" diff --git a/cluster/pulumi/cluster/src/nodePools.ts b/cluster/pulumi/cluster/src/nodePools.ts index f62adfddd6..19d3875b60 100644 --- a/cluster/pulumi/cluster/src/nodePools.ts +++ b/cluster/pulumi/cluster/src/nodePools.ts @@ -11,51 +11,59 @@ export function installNodePools(): void { ? `projects/${GCP_PROJECT}/locations/${config.requireEnv('CLOUDSDK_COMPUTE_ZONE')}/clusters/${clusterName}` : clusterName; - new gcp.container.NodePool('cn-apps-node-pool', { - name: 'cn-apps-pool', - cluster, - nodeConfig: { - machineType: gkeClusterConfig.nodePools.apps.nodeType, - taints: [ - { - effect: 'NO_SCHEDULE', - key: 'cn_apps', - value: 'true', + new gcp.container.NodePool( + 'cn-apps-node-pool', + { + namePrefix: 'cn-apps-pool', + cluster, + nodeConfig: { + machineType: gkeClusterConfig.nodePools.apps.nodeType, + taints: [ + { + effect: 'NO_SCHEDULE', + key: 'cn_apps', + value: 'true', + }, + ], + labels: { + cn_apps: 'true', }, - ], - labels: { - cn_apps: 'true', + }, + initialNodeCount: 0, + autoscaling: { + minNodeCount: gkeClusterConfig.nodePools.apps.minNodes, + maxNodeCount: gkeClusterConfig.nodePools.apps.maxNodes, }, }, - initialNodeCount: 0, - autoscaling: { - minNodeCount: gkeClusterConfig.nodePools.apps.minNodes, - maxNodeCount: gkeClusterConfig.nodePools.apps.maxNodes, - }, - }); + { aliases: [{ name: 'cn-apps-pool' }] } + ); - new gcp.container.NodePool('cn-infra-node-pool', { - name: 'cn-infra-pool', - cluster, - nodeConfig: { - machineType: gkeClusterConfig.nodePools.infra.nodeType, - taints: [ - { - effect: 'NO_SCHEDULE', - key: 'cn_infra', - value: 'true', + new gcp.container.NodePool( + 'cn-infra-node-pool', + { + namePrefix: 'cn-infra-pool', + cluster, + nodeConfig: { + machineType: gkeClusterConfig.nodePools.infra.nodeType, + taints: [ + { + effect: 'NO_SCHEDULE', + key: 'cn_infra', + value: 'true', + }, + ], + labels: { + cn_infra: 'true', }, - ], - labels: { - cn_infra: 'true', + }, + initialNodeCount: 1, + autoscaling: { + minNodeCount: gkeClusterConfig.nodePools.infra.minNodes, + maxNodeCount: gkeClusterConfig.nodePools.infra.maxNodes, }, }, - initialNodeCount: 1, - autoscaling: { - minNodeCount: gkeClusterConfig.nodePools.infra.minNodes, - maxNodeCount: gkeClusterConfig.nodePools.infra.maxNodes, - }, - }); + { aliases: [{ name: 'cn-infra-pool' }] } + ); new gcp.container.NodePool('gke-node-pool', { name: 'gke-pool',