Skip to content

Commit 9c82bac

Browse files
authored
chore: show cluster installation state details for get and list methods (#216)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [X] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-game-servers/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [X] Ensure the tests and linter pass - [X] Code coverage does not decrease (if any source code was changed) - [X] Appropriate docs were updated (if necessary) Fixes b:179738605 🦕
1 parent 6460884 commit 9c82bac

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

game-servers/snippets/get_cluster.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,23 @@ async function main(
4949
realmId,
5050
gameClusterId
5151
),
52+
view: 'FULL',
5253
};
5354

5455
const [cluster] = await client.getGameServerCluster(request);
5556

5657
console.log('Game Server Cluster:');
5758
console.log(`\tCluster name: ${cluster.name}`);
5859
console.log(`\tCluster description: ${cluster.description}`);
60+
console.log(
61+
`\tCluster installed Agones version: ${cluster.clusterState.agonesVersionInstalled}`
62+
);
63+
console.log(
64+
`\tCluster installed Kubernetes version: ${cluster.clusterState.kubernetesVersionInstalled}`
65+
);
66+
console.log(
67+
`\tCluster installation state: ${cluster.clusterState.installationState}`
68+
);
5969
console.log(
6070
`\tGKE cluster: ${cluster.connectionInfo.gkeClusterReference.cluster}`
6171
);

game-servers/snippets/list_clusters.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ async function main(
4141
const request = {
4242
// Provide full resource name of a Game Server Realm
4343
parent: client.realmPath(projectId, location, realmId),
44+
view: 'FULL',
4445
};
4546

4647
const results = await client.listGameServerClusters(request);
@@ -50,6 +51,15 @@ async function main(
5051
console.log('Game Server Cluster:');
5152
console.log(`\tCluster name: ${cluster.name}`);
5253
console.log(`\tCluster description: ${cluster.description}`);
54+
console.log(
55+
`\tCluster installed Agones version: ${cluster.clusterState.agonesVersionInstalled}`
56+
);
57+
console.log(
58+
`\tCluster installed Kubernetes version: ${cluster.clusterState.kubernetesVersionInstalled}`
59+
);
60+
console.log(
61+
`\tCluster installation state: ${cluster.clusterState.installationState}`
62+
);
5363
console.log(
5464
`\tGKE cluster: ${cluster.connectionInfo.gkeClusterReference.cluster}`
5565
);

0 commit comments

Comments
 (0)