Skip to content

Commit

Permalink
chore: show cluster installation state details for get and list metho…
Browse files Browse the repository at this point in the history
…ds (#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 🦕
  • Loading branch information
irataxy committed Sep 2, 2021
1 parent 053b6b2 commit 7e4880a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions generated,README.md/get_cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,23 @@ async function main(
realmId,
gameClusterId
),
view: 'FULL',
};

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

console.log('Game Server Cluster:');
console.log(`\tCluster name: ${cluster.name}`);
console.log(`\tCluster description: ${cluster.description}`);
console.log(
`\tCluster installed Agones version: ${cluster.clusterState.agonesVersionInstalled}`
);
console.log(
`\tCluster installed Kubernetes version: ${cluster.clusterState.kubernetesVersionInstalled}`
);
console.log(
`\tCluster installation state: ${cluster.clusterState.installationState}`
);
console.log(
`\tGKE cluster: ${cluster.connectionInfo.gkeClusterReference.cluster}`
);
Expand Down
10 changes: 10 additions & 0 deletions generated,README.md/list_clusters.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function main(
const request = {
// Provide full resource name of a Game Server Realm
parent: client.realmPath(projectId, location, realmId),
view: 'FULL',
};

const results = await client.listGameServerClusters(request);
Expand All @@ -50,6 +51,15 @@ async function main(
console.log('Game Server Cluster:');
console.log(`\tCluster name: ${cluster.name}`);
console.log(`\tCluster description: ${cluster.description}`);
console.log(
`\tCluster installed Agones version: ${cluster.clusterState.agonesVersionInstalled}`
);
console.log(
`\tCluster installed Kubernetes version: ${cluster.clusterState.kubernetesVersionInstalled}`
);
console.log(
`\tCluster installation state: ${cluster.clusterState.installationState}`
);
console.log(
`\tGKE cluster: ${cluster.connectionInfo.gkeClusterReference.cluster}`
);
Expand Down

0 comments on commit 7e4880a

Please sign in to comment.