Skip to content

Commit d8c5197

Browse files
authored
Revert "Add support to upgrade node pools in place (#3610)" (#3614)
This reverts commit 339a4af. [force] Signed-off-by: Nicu Reut <[email protected]>
1 parent d10460a commit d8c5197

File tree

2 files changed

+40
-48
lines changed

2 files changed

+40
-48
lines changed

cluster/expected/cluster/expected.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"cluster": "cn-mocknet",
1111
"initialNodeCount": 0,
12-
"namePrefix": "cn-apps-pool",
12+
"name": "cn-apps-pool",
1313
"nodeConfig": {
1414
"labels": {
1515
"cn_apps": "true"
@@ -38,7 +38,7 @@
3838
},
3939
"cluster": "cn-mocknet",
4040
"initialNodeCount": 1,
41-
"namePrefix": "cn-infra-pool",
41+
"name": "cn-infra-pool",
4242
"nodeConfig": {
4343
"labels": {
4444
"cn_infra": "true"

cluster/pulumi/cluster/src/nodePools.ts

Lines changed: 38 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,51 @@ export function installNodePools(): void {
1111
? `projects/${GCP_PROJECT}/locations/${config.requireEnv('CLOUDSDK_COMPUTE_ZONE')}/clusters/${clusterName}`
1212
: clusterName;
1313

14-
new gcp.container.NodePool(
15-
'cn-apps-node-pool',
16-
{
17-
namePrefix: 'cn-apps-pool',
18-
cluster,
19-
nodeConfig: {
20-
machineType: gkeClusterConfig.nodePools.apps.nodeType,
21-
taints: [
22-
{
23-
effect: 'NO_SCHEDULE',
24-
key: 'cn_apps',
25-
value: 'true',
26-
},
27-
],
28-
labels: {
29-
cn_apps: 'true',
14+
new gcp.container.NodePool('cn-apps-node-pool', {
15+
name: 'cn-apps-pool',
16+
cluster,
17+
nodeConfig: {
18+
machineType: gkeClusterConfig.nodePools.apps.nodeType,
19+
taints: [
20+
{
21+
effect: 'NO_SCHEDULE',
22+
key: 'cn_apps',
23+
value: 'true',
3024
},
25+
],
26+
labels: {
27+
cn_apps: 'true',
3128
},
32-
initialNodeCount: 0,
33-
autoscaling: {
34-
minNodeCount: gkeClusterConfig.nodePools.apps.minNodes,
35-
maxNodeCount: gkeClusterConfig.nodePools.apps.maxNodes,
36-
},
3729
},
38-
{ aliases: [{ name: 'cn-apps-pool' }] }
39-
);
30+
initialNodeCount: 0,
31+
autoscaling: {
32+
minNodeCount: gkeClusterConfig.nodePools.apps.minNodes,
33+
maxNodeCount: gkeClusterConfig.nodePools.apps.maxNodes,
34+
},
35+
});
4036

41-
new gcp.container.NodePool(
42-
'cn-infra-node-pool',
43-
{
44-
namePrefix: 'cn-infra-pool',
45-
cluster,
46-
nodeConfig: {
47-
machineType: gkeClusterConfig.nodePools.infra.nodeType,
48-
taints: [
49-
{
50-
effect: 'NO_SCHEDULE',
51-
key: 'cn_infra',
52-
value: 'true',
53-
},
54-
],
55-
labels: {
56-
cn_infra: 'true',
37+
new gcp.container.NodePool('cn-infra-node-pool', {
38+
name: 'cn-infra-pool',
39+
cluster,
40+
nodeConfig: {
41+
machineType: gkeClusterConfig.nodePools.infra.nodeType,
42+
taints: [
43+
{
44+
effect: 'NO_SCHEDULE',
45+
key: 'cn_infra',
46+
value: 'true',
5747
},
58-
},
59-
initialNodeCount: 1,
60-
autoscaling: {
61-
minNodeCount: gkeClusterConfig.nodePools.infra.minNodes,
62-
maxNodeCount: gkeClusterConfig.nodePools.infra.maxNodes,
48+
],
49+
labels: {
50+
cn_infra: 'true',
6351
},
6452
},
65-
{ aliases: [{ name: 'cn-infra-pool' }] }
66-
);
53+
initialNodeCount: 1,
54+
autoscaling: {
55+
minNodeCount: gkeClusterConfig.nodePools.infra.minNodes,
56+
maxNodeCount: gkeClusterConfig.nodePools.infra.maxNodes,
57+
},
58+
});
6759

6860
new gcp.container.NodePool('gke-node-pool', {
6961
name: 'gke-pool',

0 commit comments

Comments
 (0)