Skip to content

Commit 57232b6

Browse files
feat: [google-cloud-gke-multicloud] added support for optionally disabling built-in GKE metrics (#13383)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE feat: added support for optionally disabling built-in GKE metrics feat: added tag bindings support for Attached Clusters docs: updated comments of existing fields END_COMMIT_OVERRIDE PiperOrigin-RevId: 708397945 Source-Link: googleapis/googleapis@09b3c83 Source-Link: googleapis/googleapis-gen@822c2ac Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZS1tdWx0aWNsb3VkLy5Pd2xCb3QueWFtbCIsImgiOiI4MjJjMmFjYWY3YWYwN2RmYmI3Zjg2Y2UyZTJlMGYyZTc0NGI3MmU1In0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 37589f3 commit 57232b6

File tree

14 files changed

+100
-12
lines changed

14 files changed

+100
-12
lines changed

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
)
169169
from google.cloud.gke_multicloud_v1.types.common_resources import (
170170
BinaryAuthorization,
171+
CloudMonitoringConfig,
171172
Fleet,
172173
Jwk,
173174
LoggingComponentConfig,
@@ -308,6 +309,7 @@
308309
"UpdateAzureClusterRequest",
309310
"UpdateAzureNodePoolRequest",
310311
"BinaryAuthorization",
312+
"CloudMonitoringConfig",
311313
"Fleet",
312314
"Jwk",
313315
"LoggingComponentConfig",

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.6.16" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
)
157157
from .types.common_resources import (
158158
BinaryAuthorization,
159+
CloudMonitoringConfig,
159160
Fleet,
160161
Jwk,
161162
LoggingComponentConfig,
@@ -235,6 +236,7 @@
235236
"AzureServicesAuthentication",
236237
"AzureSshConfig",
237238
"BinaryAuthorization",
239+
"CloudMonitoringConfig",
238240
"CreateAttachedClusterRequest",
239241
"CreateAwsClusterRequest",
240242
"CreateAwsNodePoolRequest",

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.6.16" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ async def sample_update_attached_cluster():
568568
- ``proxy_config.kubernetes_secret.name``.
569569
- ``proxy_config.kubernetes_secret.namespace``.
570570
- ``security_posture_config.vulnerability_mode``
571+
- ``monitoring_config.cloud_monitoring_config.enabled``
571572
572573
This corresponds to the ``update_mask`` field
573574
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ def sample_update_attached_cluster():
972972
- ``proxy_config.kubernetes_secret.name``.
973973
- ``proxy_config.kubernetes_secret.namespace``.
974974
- ``security_posture_config.vulnerability_mode``
975+
- ``monitoring_config.cloud_monitoring_config.enabled``
975976
976977
This corresponds to the ``update_mask`` field
977978
on the ``request`` instance; if ``request`` is provided, this

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
)
146146
from .common_resources import (
147147
BinaryAuthorization,
148+
CloudMonitoringConfig,
148149
Fleet,
149150
Jwk,
150151
LoggingComponentConfig,
@@ -279,6 +280,7 @@
279280
"UpdateAzureClusterRequest",
280281
"UpdateAzureNodePoolRequest",
281282
"BinaryAuthorization",
283+
"CloudMonitoringConfig",
282284
"Fleet",
283285
"Jwk",
284286
"LoggingComponentConfig",

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/types/attached_resources.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@ class AttachedCluster(proto.Message):
137137
security_posture_config (google.cloud.gke_multicloud_v1.types.SecurityPostureConfig):
138138
Optional. Security Posture configuration for
139139
this cluster.
140+
tags (MutableMapping[str, str]):
141+
Optional. Input only. Tag keys/values directly bound to this
142+
resource.
143+
144+
Tag key must be specified in the format / where the tag
145+
namespace is the ID of the organization or name of the
146+
project that the tag key is defined in. The short name of a
147+
tag key or value can have a maximum length of 256
148+
characters. The permitted character set for the short name
149+
includes UTF-8 encoded Unicode characters except single
150+
quotes ('), double quotes ("), backslashes (), and forward
151+
slashes (/).
152+
153+
See
154+
`Tags <http://cloud/resource-manager/docs/tags/tags-overview>`__
155+
for more details on Google Cloud Platform tags.
140156
"""
141157

142158
class State(proto.Enum):
@@ -280,6 +296,11 @@ class State(proto.Enum):
280296
number=26,
281297
message=common_resources.SecurityPostureConfig,
282298
)
299+
tags: MutableMapping[str, str] = proto.MapField(
300+
proto.STRING,
301+
proto.STRING,
302+
number=27,
303+
)
283304

284305

285306
class AttachedClustersAuthorization(proto.Message):
@@ -449,6 +470,10 @@ class AttachedProxyConfig(proto.Message):
449470
the HTTP(S) proxy configuration. The secret must
450471
be a JSON encoded proxy configuration as
451472
described in
473+
https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/eks/how-to/use-a-proxy#configure-proxy-support
474+
for EKS clusters and
475+
https://cloud.google.com/kubernetes-engine/multi-cloud/docs/attached/aks/how-to/use-a-proxy#configure-proxy-support
476+
for AKS clusters.
452477
"""
453478

454479
kubernetes_secret: "KubernetesSecret" = proto.Field(

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/types/attached_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ class UpdateAttachedClusterRequest(proto.Message):
273273
- ``proxy_config.kubernetes_secret.name``.
274274
- ``proxy_config.kubernetes_secret.namespace``.
275275
- ``security_posture_config.vulnerability_mode``
276+
- ``monitoring_config.cloud_monitoring_config.enabled``
276277
"""
277278

278279
attached_cluster: attached_resources.AttachedCluster = proto.Field(

packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/types/common_resources.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"LoggingComponentConfig",
3535
"MonitoringConfig",
3636
"ManagedPrometheusConfig",
37+
"CloudMonitoringConfig",
3738
"BinaryAuthorization",
3839
"SecurityPostureConfig",
3940
},
@@ -172,9 +173,11 @@ class OperationMetadata(proto.Message):
172173
requested_cancellation (bool):
173174
Output only. Identifies whether it has been requested
174175
cancellation for the operation. Operations that have
175-
successfully been cancelled have [Operation.error][] value
176-
with a [google.rpc.Status.code][google.rpc.Status.code] of
177-
1, corresponding to ``Code.CANCELLED``.
176+
successfully been cancelled have
177+
[google.longrunning.Operation.error][google.longrunning.Operation.error]
178+
value with a
179+
[google.rpc.Status.code][google.rpc.Status.code] of 1,
180+
corresponding to ``Code.CANCELLED``.
178181
"""
179182

180183
create_time: timestamp_pb2.Timestamp = proto.Field(
@@ -448,13 +451,21 @@ class MonitoringConfig(proto.Message):
448451
managed_prometheus_config (google.cloud.gke_multicloud_v1.types.ManagedPrometheusConfig):
449452
Enable Google Cloud Managed Service for
450453
Prometheus in the cluster.
454+
cloud_monitoring_config (google.cloud.gke_multicloud_v1.types.CloudMonitoringConfig):
455+
Optionally enable GKE metrics.
456+
Only for Attached Clusters.
451457
"""
452458

453459
managed_prometheus_config: "ManagedPrometheusConfig" = proto.Field(
454460
proto.MESSAGE,
455461
number=2,
456462
message="ManagedPrometheusConfig",
457463
)
464+
cloud_monitoring_config: "CloudMonitoringConfig" = proto.Field(
465+
proto.MESSAGE,
466+
number=4,
467+
message="CloudMonitoringConfig",
468+
)
458469

459470

460471
class ManagedPrometheusConfig(proto.Message):
@@ -472,6 +483,29 @@ class ManagedPrometheusConfig(proto.Message):
472483
)
473484

474485

486+
class CloudMonitoringConfig(proto.Message):
487+
r"""CloudMonitoringConfig defines the configuration for
488+
built-in Cloud Logging and Monitoring.
489+
Only for Attached Clusters.
490+
491+
492+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
493+
494+
Attributes:
495+
enabled (bool):
496+
Enable GKE-native logging and metrics.
497+
Only for Attached Clusters.
498+
499+
This field is a member of `oneof`_ ``_enabled``.
500+
"""
501+
502+
enabled: bool = proto.Field(
503+
proto.BOOL,
504+
number=1,
505+
optional=True,
506+
)
507+
508+
475509
class BinaryAuthorization(proto.Message):
476510
r"""Configuration for Binary Authorization.
477511

0 commit comments

Comments
 (0)