Skip to content

Commit f23e88b

Browse files
feat: support version reporting API (#213)
* feat: support version reporting API PiperOrigin-RevId: 393476621 Source-Link: googleapis/googleapis@e9da6f8 Source-Link: googleapis/googleapis-gen@acd7bed * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent b1640c6 commit f23e88b

17 files changed

+1054
-155
lines changed

packages/google-cloud-gaming/protos/google/cloud/gaming/v1/common.proto

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -122,7 +122,6 @@ message Schedule {
122122
// Encapsulates Agones fleet spec and Agones autoscaler spec sources.
123123
message SpecSource {
124124
// The game server config resource. Uses the form:
125-
//
126125
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}/configs/{config_id}`.
127126
string game_server_config_name = 1;
128127

@@ -163,12 +162,10 @@ message TargetDetails {
163162
}
164163

165164
// The game server cluster name. Uses the form:
166-
//
167165
// `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
168166
string game_server_cluster_name = 1;
169167

170168
// The game server deployment name. Uses the form:
171-
//
172169
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment_id}`.
173170
string game_server_deployment_name = 2;
174171

packages/google-cloud-gaming/protos/google/cloud/gaming/v1/game_server_clusters.proto

+118-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -27,9 +27,24 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/gaming/v1;gamin
2727
option java_multiple_files = true;
2828
option java_package = "com.google.cloud.gaming.v1";
2929

30+
// A view for GameServerCluster objects.
31+
enum GameServerClusterView {
32+
// The default / unset value.
33+
// The API will default to the BASIC view.
34+
GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED = 0;
35+
36+
// Include basic information of a GameServerCluster resource and omit
37+
// `cluster_state`. This is the default value (for ListGameServerClusters,
38+
// GetGameServerCluster and PreviewCreateGameServerCluster).
39+
BASIC = 1;
40+
41+
// Include everything.
42+
FULL = 2;
43+
}
44+
3045
// Request message for GameServerClustersService.ListGameServerClusters.
3146
message ListGameServerClustersRequest {
32-
// Required. The parent resource name. Uses the form:
47+
// Required. The parent resource name, in the following form:
3348
// "projects/{project}/locations/{location}/realms/{realm}".
3449
string parent = 1 [
3550
(google.api.field_behavior) = REQUIRED,
@@ -38,7 +53,7 @@ message ListGameServerClustersRequest {
3853
}
3954
];
4055

41-
// Optional. The maximum number of items to return. If unspecified, the server
56+
// Optional. The maximum number of items to return. If unspecified, the server
4257
// will pick an appropriate default. The server may return fewer items than
4358
// requested. A caller should only rely on response's
4459
// [next_page_token][google.cloud.gaming.v1.ListGameServerClustersResponse.next_page_token] to
@@ -54,6 +69,14 @@ message ListGameServerClustersRequest {
5469
// Optional. Specifies the ordering of results following syntax at
5570
// https://cloud.google.com/apis/design/design_patterns#sorting_order.
5671
string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
72+
73+
// Optional. View for the returned GameServerCluster objects. When `FULL` is
74+
// specified, the `cluster_state` field is also returned in the
75+
// GameServerCluster object, which includes the state of the referenced
76+
// Kubernetes cluster such as versions and provider info. The default/unset
77+
// value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
78+
// not return the `cluster_state` field.
79+
GameServerClusterView view = 6 [(google.api.field_behavior) = OPTIONAL];
5780
}
5881

5982
// Response message for GameServerClustersService.ListGameServerClusters.
@@ -71,20 +94,27 @@ message ListGameServerClustersResponse {
7194

7295
// Request message for GameServerClustersService.GetGameServerCluster.
7396
message GetGameServerClusterRequest {
74-
// Required. The name of the game server cluster to retrieve. Uses the form:
75-
//
97+
// Required. The name of the game server cluster to retrieve, in the following form:
7698
// `projects/{project}/locations/{location}/realms/{realm-id}/gameServerClusters/{cluster}`.
7799
string name = 1 [
78100
(google.api.field_behavior) = REQUIRED,
79101
(google.api.resource_reference) = {
80102
type: "gameservices.googleapis.com/GameServerCluster"
81103
}
82104
];
105+
106+
// Optional. View for the returned GameServerCluster objects. When `FULL` is
107+
// specified, the `cluster_state` field is also returned in the
108+
// GameServerCluster object, which includes the state of the referenced
109+
// Kubernetes cluster such as versions and provider info. The default/unset
110+
// value is GAME_SERVER_CLUSTER_VIEW_UNSPECIFIED, same as BASIC, which does
111+
// not return the `cluster_state` field.
112+
GameServerClusterView view = 6 [(google.api.field_behavior) = OPTIONAL];
83113
}
84114

85115
// Request message for GameServerClustersService.CreateGameServerCluster.
86116
message CreateGameServerClusterRequest {
87-
// Required. The parent resource name. Uses the form:
117+
// Required. The parent resource name, in the following form:
88118
// `projects/{project}/locations/{location}/realms/{realm-id}`.
89119
string parent = 1 [
90120
(google.api.field_behavior) = REQUIRED,
@@ -102,7 +132,7 @@ message CreateGameServerClusterRequest {
102132

103133
// Request message for GameServerClustersService.PreviewCreateGameServerCluster.
104134
message PreviewCreateGameServerClusterRequest {
105-
// Required. The parent resource name. Uses the form:
135+
// Required. The parent resource name, in the following form:
106136
// `projects/{project}/locations/{location}/realms/{realm}`.
107137
string parent = 1 [
108138
(google.api.field_behavior) = REQUIRED,
@@ -119,6 +149,13 @@ message PreviewCreateGameServerClusterRequest {
119149

120150
// Optional. The target timestamp to compute the preview.
121151
google.protobuf.Timestamp preview_time = 4 [(google.api.field_behavior) = OPTIONAL];
152+
153+
// Optional. This field is deprecated, preview will always return
154+
// KubernetesClusterState.
155+
GameServerClusterView view = 6 [
156+
deprecated = true,
157+
(google.api.field_behavior) = OPTIONAL
158+
];
122159
}
123160

124161
// Response message for
@@ -129,11 +166,15 @@ message PreviewCreateGameServerClusterResponse {
129166

130167
// The target state.
131168
TargetState target_state = 3;
169+
170+
// Output only. The state of the Kubernetes cluster in preview, this will be available if
171+
// 'view' is set to `FULL` in the relevant List/Get/Preview request.
172+
KubernetesClusterState cluster_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
132173
}
133174

134175
// Request message for GameServerClustersService.DeleteGameServerCluster.
135176
message DeleteGameServerClusterRequest {
136-
// Required. The name of the game server cluster to delete. Uses the form:
177+
// Required. The name of the game server cluster to delete, in the following form:
137178
// `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
138179
string name = 1 [
139180
(google.api.field_behavior) = REQUIRED,
@@ -145,7 +186,7 @@ message DeleteGameServerClusterRequest {
145186

146187
// Request message for GameServerClustersService.PreviewDeleteGameServerCluster.
147188
message PreviewDeleteGameServerClusterRequest {
148-
// Required. The name of the game server cluster to delete. Uses the form:
189+
// Required. The name of the game server cluster to delete, in the following form:
149190
// `projects/{project}/locations/{location}/gameServerClusters/{cluster}`.
150191
string name = 1 [
151192
(google.api.field_behavior) = REQUIRED,
@@ -176,10 +217,7 @@ message UpdateGameServerClusterRequest {
176217

177218
// Required. Mask of fields to update. At least one path must be supplied in
178219
// this field. For the `FieldMask` definition, see
179-
//
180-
// https:
181-
// //developers.google.com/protocol-buffers
182-
// // /docs/reference/google.protobuf#fieldmask
220+
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
183221
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
184222
}
185223

@@ -191,10 +229,7 @@ message PreviewUpdateGameServerClusterRequest {
191229

192230
// Required. Mask of fields to update. At least one path must be supplied in
193231
// this field. For the `FieldMask` definition, see
194-
//
195-
// https:
196-
// //developers.google.com/protocol-buffers
197-
// // /docs/reference/google.protobuf#fieldmask
232+
// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
198233
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
199234

200235
// Optional. The target timestamp to compute the preview.
@@ -244,11 +279,9 @@ message GameServerCluster {
244279
pattern: "projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}"
245280
};
246281

247-
// Required. The resource name of the game server cluster. Uses the form:
248-
//
282+
// Required. The resource name of the game server cluster, in the following form:
249283
// `projects/{project}/locations/{location}/realms/{realm}/gameServerClusters/{cluster}`.
250284
// For example,
251-
//
252285
// `projects/my-project/locations/{location}/realms/zanzibar/gameServerClusters/my-onprem-cluster`.
253286
string name = 1 [(google.api.field_behavior) = REQUIRED];
254287

@@ -271,4 +304,69 @@ message GameServerCluster {
271304

272305
// Human readable description of the cluster.
273306
string description = 7;
307+
308+
// Output only. The state of the Kubernetes cluster, this will be available if
309+
// 'view' is set to `FULL` in the relevant List/Get/Preview request.
310+
KubernetesClusterState cluster_state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
311+
}
312+
313+
// The state of the Kubernetes cluster.
314+
message KubernetesClusterState {
315+
// The state of the installed versions of Agones/Kubernetes. See also
316+
// https://cloud.google.com/game-servers/docs/versions-and-upgrades.
317+
enum InstallationState {
318+
// The default value. This value is used if the state is omitted.
319+
INSTALLATION_STATE_UNSPECIFIED = 0;
320+
321+
// The combination of Agones and Kubernetes versions is supported by Google
322+
// Cloud Game Servers.
323+
AGONES_KUBERNETES_VERSION_SUPPORTED = 1;
324+
325+
// The installed version of Agones is not supported by Google Cloud Game
326+
// Servers.
327+
AGONES_VERSION_UNSUPPORTED = 2;
328+
329+
// The installed version of Agones is supported by Google Cloud Game
330+
// Servers, but the installed version of Kubernetes is not recommended or
331+
// supported by the version of Agones.
332+
AGONES_KUBERNETES_VERSION_UNSUPPORTED = 3;
333+
334+
// The installed version of Agones is not recognized because the Agones
335+
// controller's image name does not have a version string reported as
336+
// {major}.{minor}(.{patch}).
337+
AGONES_VERSION_UNRECOGNIZED = 4;
338+
339+
// The server version of Kubernetes cluster is not recognized because the
340+
// API server didn't return parsable version info on path/version.
341+
KUBERNETES_VERSION_UNRECOGNIZED = 5;
342+
343+
// Failed to read or verify the version of Agones or Kubernetes. See
344+
// version_installed_error_message for details.
345+
VERSION_VERIFICATION_FAILED = 6;
346+
347+
// Agones is not installed.
348+
AGONES_NOT_INSTALLED = 7;
349+
}
350+
351+
// Output only. The version of Agones currently installed in the registered Kubernetes
352+
// cluster.
353+
string agones_version_installed = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
354+
355+
// Output only. The version of Kubernetes that is currently used in the registered
356+
// Kubernetes cluster (as detected by the Cloud Game Servers service).
357+
string kubernetes_version_installed = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
358+
359+
// Output only. The state for the installed versions of Agones/Kubernetes.
360+
InstallationState installation_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
361+
362+
// Output only. The detailed error message for the installed versions of Agones/Kubernetes.
363+
string version_installed_error_message = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
364+
365+
// Output only. The cloud provider type reported by the first node's providerID in the list
366+
// of nodes on the Kubernetes endpoint. On Kubernetes platforms that support
367+
// zero-node clusters (like GKE-on-GCP), the provider type will be empty.
368+
string provider = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
369+
370+
// Output only. The version of Agones that is targeted to be installed in the cluster.
371+
string agones_version_targeted = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
274372
}

packages/google-cloud-gaming/protos/google/cloud/gaming/v1/game_server_clusters_service.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-gaming/protos/google/cloud/gaming/v1/game_server_configs.proto

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -28,8 +28,7 @@ option java_package = "com.google.cloud.gaming.v1";
2828

2929
// Request message for GameServerConfigsService.ListGameServerConfigs.
3030
message ListGameServerConfigsRequest {
31-
// Required. The parent resource name. Uses the form:
32-
//
31+
// Required. The parent resource name, in the following form:
3332
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/*`.
3433
string parent = 1 [
3534
(google.api.field_behavior) = REQUIRED,
@@ -71,8 +70,7 @@ message ListGameServerConfigsResponse {
7170

7271
// Request message for GameServerConfigsService.GetGameServerConfig.
7372
message GetGameServerConfigRequest {
74-
// Required. The name of the game server config to retrieve. Uses the form:
75-
//
73+
// Required. The name of the game server config to retrieve, in the following form:
7674
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
7775
string name = 1 [
7876
(google.api.field_behavior) = REQUIRED,
@@ -84,8 +82,7 @@ message GetGameServerConfigRequest {
8482

8583
// Request message for GameServerConfigsService.CreateGameServerConfig.
8684
message CreateGameServerConfigRequest {
87-
// Required. The parent resource name. Uses the form:
88-
//
85+
// Required. The parent resource name, in the following form:
8986
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/`.
9087
string parent = 1 [
9188
(google.api.field_behavior) = REQUIRED,
@@ -103,8 +100,7 @@ message CreateGameServerConfigRequest {
103100

104101
// Request message for GameServerConfigsService.DeleteGameServerConfig.
105102
message DeleteGameServerConfigRequest {
106-
// Required. The name of the game server config to delete. Uses the form:
107-
//
103+
// Required. The name of the game server config to delete, in the following form:
108104
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
109105
string name = 1 [
110106
(google.api.field_behavior) = REQUIRED,
@@ -149,11 +145,9 @@ message GameServerConfig {
149145
pattern: "projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}"
150146
};
151147

152-
// The resource name of the game server config. Uses the form:
153-
//
148+
// The resource name of the game server config, in the following form:
154149
// `projects/{project}/locations/{location}/gameServerDeployments/{deployment}/configs/{config}`.
155150
// For example,
156-
//
157151
// `projects/my-project/locations/global/gameServerDeployments/my-game/configs/my-config`.
158152
string name = 1;
159153

packages/google-cloud-gaming/protos/google/cloud/gaming/v1/game_server_configs_service.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)