Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 0bfdffe

Browse files
feat: add a new fleet registration feature to v1beta1, v1 (#360)
* feat: Add a new fleet registration feature Users can now register their clusters to a fleet by setting cluster.fleet.project. Please see https://cloud.google.com/anthos/fleet-management/docs/fleet-concepts for more details about fleet management. PiperOrigin-RevId: 520023539 Source-Link: googleapis/googleapis@0fac9e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2319a8833004b1be3a37be5b2b3e6ca14dee74d6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMxOWE4ODMzMDA0YjFiZTNhMzdiZTViMmIzZTZjYTE0ZGVlNzRkNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add a new fleet registration feature to v1alpha1, v1beta1, v1 Users can now register their clusters to a fleet by setting cluster.fleet.project. Please see https://cloud.google.com/anthos/fleet-management/docs/fleet-concepts for more details about fleet management. PiperOrigin-RevId: 520043395 Source-Link: googleapis/googleapis@0f498c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cade820c6e8a17dce3835d939dddecba2eed8f51 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2FkZTgyMGM2ZThhMTdkY2UzODM1ZDkzOWRkZGVjYmEyZWVkOGY1MSJ9 * 🦉 Updates from OwlBot post-processor 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 d10ac7e commit 0bfdffe

File tree

7 files changed

+93
-2
lines changed

7 files changed

+93
-2
lines changed

google/cloud/container/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
DNSConfig,
5858
EphemeralStorageLocalSsdConfig,
5959
FastSocket,
60+
Fleet,
6061
GatewayAPIConfig,
6162
GcePersistentDiskCsiDriverConfig,
6263
GcfsConfig,
@@ -206,6 +207,7 @@
206207
"DNSConfig",
207208
"EphemeralStorageLocalSsdConfig",
208209
"FastSocket",
210+
"Fleet",
209211
"GatewayAPIConfig",
210212
"GcePersistentDiskCsiDriverConfig",
211213
"GcfsConfig",

google/cloud/container_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
DNSConfig,
5353
EphemeralStorageLocalSsdConfig,
5454
FastSocket,
55+
Fleet,
5556
GatewayAPIConfig,
5657
GcePersistentDiskCsiDriverConfig,
5758
GcfsConfig,
@@ -202,6 +203,7 @@
202203
"DnsCacheConfig",
203204
"EphemeralStorageLocalSsdConfig",
204205
"FastSocket",
206+
"Fleet",
205207
"GPUSharingConfig",
206208
"GatewayAPIConfig",
207209
"GcePersistentDiskCsiDriverConfig",

google/cloud/container_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
DNSConfig,
4747
EphemeralStorageLocalSsdConfig,
4848
FastSocket,
49+
Fleet,
4950
GatewayAPIConfig,
5051
GcePersistentDiskCsiDriverConfig,
5152
GcfsConfig,
@@ -193,6 +194,7 @@
193194
"DNSConfig",
194195
"EphemeralStorageLocalSsdConfig",
195196
"FastSocket",
197+
"Fleet",
196198
"GatewayAPIConfig",
197199
"GcePersistentDiskCsiDriverConfig",
198200
"GcfsConfig",

google/cloud/container_v1/types/cluster_service.py

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
"LoggingVariantConfig",
171171
"MonitoringComponentConfig",
172172
"ManagedPrometheusConfig",
173+
"Fleet",
173174
"LocalNvmeSsdBlockConfig",
174175
"EphemeralStorageLocalSsdConfig",
175176
},
@@ -2353,6 +2354,8 @@ class Cluster(proto.Message):
23532354
on the value of cluster fields, and may be sent
23542355
on update requests to ensure the client has an
23552356
up-to-date value before proceeding.
2357+
fleet (google.cloud.container_v1.types.Fleet):
2358+
Fleet information for the cluster.
23562359
"""
23572360

23582361
class Status(proto.Enum):
@@ -2679,6 +2682,11 @@ class Status(proto.Enum):
26792682
proto.STRING,
26802683
number=139,
26812684
)
2685+
fleet: "Fleet" = proto.Field(
2686+
proto.MESSAGE,
2687+
number=140,
2688+
message="Fleet",
2689+
)
26822690

26832691

26842692
class NodePoolAutoConfig(proto.Message):
@@ -7250,8 +7258,9 @@ class Status(proto.Enum):
72507258
UNUSED denotes that this range is unclaimed
72517259
by any cluster.
72527260
IN_USE_SERVICE (2):
7253-
IN_USE_SERVICE denotes that this range is claimed by a
7254-
cluster for services. It cannot be used for other clusters.
7261+
IN_USE_SERVICE denotes that this range is claimed by
7262+
cluster(s) for services. User-managed services range can be
7263+
shared between clusters within the same subnetwork.
72557264
IN_USE_SHAREABLE_POD (3):
72567265
IN_USE_SHAREABLE_POD denotes this range was created by the
72577266
network admin and is currently claimed by a cluster for
@@ -7939,6 +7948,38 @@ class ManagedPrometheusConfig(proto.Message):
79397948
)
79407949

79417950

7951+
class Fleet(proto.Message):
7952+
r"""Fleet is the fleet configuration for the cluster.
7953+
7954+
Attributes:
7955+
project (str):
7956+
The Fleet host project(project ID or project
7957+
number) where this cluster will be registered
7958+
to. This field cannot be changed after the
7959+
cluster has been registered.
7960+
membership (str):
7961+
[Output only] The full resource name of the registered fleet
7962+
membership of the cluster, in the format
7963+
``//gkehub.googleapis.com/projects/*/locations/*/memberships/*``.
7964+
pre_registered (bool):
7965+
[Output only] Whether the cluster has been registered
7966+
through the fleet API.
7967+
"""
7968+
7969+
project: str = proto.Field(
7970+
proto.STRING,
7971+
number=1,
7972+
)
7973+
membership: str = proto.Field(
7974+
proto.STRING,
7975+
number=2,
7976+
)
7977+
pre_registered: bool = proto.Field(
7978+
proto.BOOL,
7979+
number=3,
7980+
)
7981+
7982+
79427983
class LocalNvmeSsdBlockConfig(proto.Message):
79437984
r"""LocalNvmeSsdBlockConfig contains configuration for using
79447985
raw-block local NVMe SSD.

google/cloud/container_v1beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
EphemeralStorageConfig,
5555
EphemeralStorageLocalSsdConfig,
5656
FastSocket,
57+
Fleet,
5758
GatewayAPIConfig,
5859
GcePersistentDiskCsiDriverConfig,
5960
GcfsConfig,
@@ -218,6 +219,7 @@
218219
"EphemeralStorageConfig",
219220
"EphemeralStorageLocalSsdConfig",
220221
"FastSocket",
222+
"Fleet",
221223
"GPUSharingConfig",
222224
"GatewayAPIConfig",
223225
"GcePersistentDiskCsiDriverConfig",

google/cloud/container_v1beta1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
EphemeralStorageConfig,
4949
EphemeralStorageLocalSsdConfig,
5050
FastSocket,
51+
Fleet,
5152
GatewayAPIConfig,
5253
GcePersistentDiskCsiDriverConfig,
5354
GcfsConfig,
@@ -209,6 +210,7 @@
209210
"EphemeralStorageConfig",
210211
"EphemeralStorageLocalSsdConfig",
211212
"FastSocket",
213+
"Fleet",
212214
"GatewayAPIConfig",
213215
"GcePersistentDiskCsiDriverConfig",
214216
"GcfsConfig",

google/cloud/container_v1beta1/types/cluster_service.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
"NodePoolLoggingConfig",
188188
"LoggingVariantConfig",
189189
"MonitoringComponentConfig",
190+
"Fleet",
190191
},
191192
)
192193

@@ -2648,6 +2649,8 @@ class Cluster(proto.Message):
26482649
on the value of cluster fields, and may be sent
26492650
on update requests to ensure the client has an
26502651
up-to-date value before proceeding.
2652+
fleet (google.cloud.container_v1beta1.types.Fleet):
2653+
Fleet information for the cluster.
26512654
"""
26522655

26532656
class Status(proto.Enum):
@@ -3017,6 +3020,11 @@ class Status(proto.Enum):
30173020
proto.STRING,
30183021
number=139,
30193022
)
3023+
fleet: "Fleet" = proto.Field(
3024+
proto.MESSAGE,
3025+
number=140,
3026+
message="Fleet",
3027+
)
30203028

30213029

30223030
class WorkloadConfig(proto.Message):
@@ -8775,4 +8783,36 @@ class Component(proto.Enum):
87758783
)
87768784

87778785

8786+
class Fleet(proto.Message):
8787+
r"""Fleet is the fleet configuration for the cluster.
8788+
8789+
Attributes:
8790+
project (str):
8791+
The Fleet host project(project ID or project
8792+
number) where this cluster will be registered
8793+
to. This field cannot be changed after the
8794+
cluster has been registered.
8795+
membership (str):
8796+
[Output only] The full resource name of the registered fleet
8797+
membership of the cluster, in the format
8798+
``//gkehub.googleapis.com/projects/*/locations/*/memberships/*``.
8799+
pre_registered (bool):
8800+
[Output only] Whether the cluster has been registered
8801+
through the fleet API.
8802+
"""
8803+
8804+
project: str = proto.Field(
8805+
proto.STRING,
8806+
number=1,
8807+
)
8808+
membership: str = proto.Field(
8809+
proto.STRING,
8810+
number=2,
8811+
)
8812+
pre_registered: bool = proto.Field(
8813+
proto.BOOL,
8814+
number=3,
8815+
)
8816+
8817+
87788818
__all__ = tuple(sorted(__protobuf__.manifest))

0 commit comments

Comments
 (0)