Skip to content

Commit 33834de

Browse files
feat: [google-cloud-gke-multicloud] An optional field security_posture_config in message .google.cloud.gkemulticloud.v1.AttachedCluster is added (googleapis#13088)
BEGIN_COMMIT_OVERRIDE feat: An optional field `security_posture_config` in message `.google.cloud.gkemulticloud.v1.AttachedCluster` is added feat: An optional field `kubelet_config` in message `.google.cloud.gkemulticloud.v1.AwsNodePool` is added END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. feat: An optional field `kubelet_config` in message `.google.cloud.gkemulticloud.v1.AwsNodePool` is added PiperOrigin-RevId: 674451558 Source-Link: googleapis/googleapis@31df26d Source-Link: https://github.com/googleapis/googleapis-gen/commit/23e655713582360b568172348be5d883caa40efb Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWdrZS1tdWx0aWNsb3VkLy5Pd2xCb3QueWFtbCIsImgiOiIyM2U2NTU3MTM1ODIzNjBiNTY4MTcyMzQ4YmU1ZDg4M2NhYTQwZWZiIn0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 8fc8b25 commit 33834de

12 files changed

Lines changed: 176 additions & 3 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,10 @@
175175
ManagedPrometheusConfig,
176176
MaxPodsConstraint,
177177
MonitoringConfig,
178+
NodeKubeletConfig,
178179
NodeTaint,
179180
OperationMetadata,
181+
SecurityPostureConfig,
180182
WorkloadIdentityConfig,
181183
)
182184

@@ -313,7 +315,9 @@
313315
"ManagedPrometheusConfig",
314316
"MaxPodsConstraint",
315317
"MonitoringConfig",
318+
"NodeKubeletConfig",
316319
"NodeTaint",
317320
"OperationMetadata",
321+
"SecurityPostureConfig",
318322
"WorkloadIdentityConfig",
319323
)

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@
163163
ManagedPrometheusConfig,
164164
MaxPodsConstraint,
165165
MonitoringConfig,
166+
NodeKubeletConfig,
166167
NodeTaint,
167168
OperationMetadata,
169+
SecurityPostureConfig,
168170
WorkloadIdentityConfig,
169171
)
170172

@@ -291,10 +293,12 @@
291293
"ManagedPrometheusConfig",
292294
"MaxPodsConstraint",
293295
"MonitoringConfig",
296+
"NodeKubeletConfig",
294297
"NodeTaint",
295298
"OperationMetadata",
296299
"ReplicaPlacement",
297300
"RollbackAwsNodePoolUpdateRequest",
301+
"SecurityPostureConfig",
298302
"SpotConfig",
299303
"SurgeSettings",
300304
"UpdateAttachedClusterRequest",

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
@@ -533,6 +533,7 @@ async def sample_update_attached_cluster():
533533
- ``platform_version``.
534534
- ``proxy_config.kubernetes_secret.name``.
535535
- ``proxy_config.kubernetes_secret.namespace``.
536+
- ``security_posture_config.vulnerability_mode``
536537
537538
This corresponds to the ``update_mask`` field
538539
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
@@ -966,6 +966,7 @@ def sample_update_attached_cluster():
966966
- ``platform_version``.
967967
- ``proxy_config.kubernetes_secret.name``.
968968
- ``proxy_config.kubernetes_secret.namespace``.
969+
- ``security_posture_config.vulnerability_mode``
969970
970971
This corresponds to the ``update_mask`` field
971972
on the ``request`` instance; if ``request`` is provided, this

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@
152152
ManagedPrometheusConfig,
153153
MaxPodsConstraint,
154154
MonitoringConfig,
155+
NodeKubeletConfig,
155156
NodeTaint,
156157
OperationMetadata,
158+
SecurityPostureConfig,
157159
WorkloadIdentityConfig,
158160
)
159161

@@ -284,7 +286,9 @@
284286
"ManagedPrometheusConfig",
285287
"MaxPodsConstraint",
286288
"MonitoringConfig",
289+
"NodeKubeletConfig",
287290
"NodeTaint",
288291
"OperationMetadata",
292+
"SecurityPostureConfig",
289293
"WorkloadIdentityConfig",
290294
)

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ class AttachedCluster(proto.Message):
134134
binary_authorization (google.cloud.gke_multicloud_v1.types.BinaryAuthorization):
135135
Optional. Binary Authorization configuration
136136
for this cluster.
137+
security_posture_config (google.cloud.gke_multicloud_v1.types.SecurityPostureConfig):
138+
Optional. Security Posture configuration for
139+
this cluster.
137140
"""
138141

139142
class State(proto.Enum):
@@ -272,6 +275,11 @@ class State(proto.Enum):
272275
number=25,
273276
message=common_resources.BinaryAuthorization,
274277
)
278+
security_posture_config: common_resources.SecurityPostureConfig = proto.Field(
279+
proto.MESSAGE,
280+
number=26,
281+
message=common_resources.SecurityPostureConfig,
282+
)
275283

276284

277285
class AttachedClustersAuthorization(proto.Message):

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class ImportAttachedClusterRequest(proto.Message):
211211
Required. The Kubernetes distribution of the underlying
212212
attached cluster.
213213
214-
Supported values: ["eks", "aks"].
214+
Supported values: ["eks", "aks", "generic"].
215215
proxy_config (google.cloud.gke_multicloud_v1.types.AttachedProxyConfig):
216216
Optional. Proxy configuration for outbound
217217
HTTP(S) traffic.
@@ -272,6 +272,7 @@ class UpdateAttachedClusterRequest(proto.Message):
272272
- ``platform_version``.
273273
- ``proxy_config.kubernetes_secret.name``.
274274
- ``proxy_config.kubernetes_secret.namespace``.
275+
- ``security_posture_config.vulnerability_mode``
275276
"""
276277

277278
attached_cluster: attached_resources.AttachedCluster = proto.Field(

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ class AwsNodePool(proto.Message):
735735
management (google.cloud.gke_multicloud_v1.types.AwsNodeManagement):
736736
Optional. The Management configuration for
737737
this node pool.
738+
kubelet_config (google.cloud.gke_multicloud_v1.types.NodeKubeletConfig):
739+
Optional. Node kubelet configs.
738740
update_settings (google.cloud.gke_multicloud_v1.types.UpdateSettings):
739741
Optional. Update settings control the speed
740742
and disruption of the update.
@@ -843,6 +845,11 @@ class State(proto.Enum):
843845
number=30,
844846
message="AwsNodeManagement",
845847
)
848+
kubelet_config: common_resources.NodeKubeletConfig = proto.Field(
849+
proto.MESSAGE,
850+
number=31,
851+
message=common_resources.NodeKubeletConfig,
852+
)
846853
update_settings: "UpdateSettings" = proto.Field(
847854
proto.MESSAGE,
848855
number=32,
@@ -1279,7 +1286,7 @@ class AwsProxyConfig(proto.Message):
12791286
12801287
The secret must be a JSON encoded proxy configuration as
12811288
described in
1282-
https://cloud.google.com/anthos/clusters/docs/multi-cloud/aws/how-to/use-a-proxy#create_a_proxy_configuration_file
1289+
https://cloud.google.com/kubernetes-engine/multi-cloud/docs/aws/how-to/use-a-proxy#create_a_proxy_configuration_file
12831290
secret_version (str):
12841291
The version string of the AWS Secret Manager
12851292
secret that contains the HTTP(S) proxy

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ class AzureProxyConfig(proto.Message):
557557
558558
The secret must be a JSON encoded proxy configuration as
559559
described in
560-
https://cloud.google.com/anthos/clusters/docs/multi-cloud/azure/how-to/use-a-proxy#create_a_proxy_configuration_file
560+
https://cloud.google.com/kubernetes-engine/multi-cloud/docs/azure/how-to/use-a-proxy#create_a_proxy_configuration_file
561561
562562
Secret ids are formatted as
563563
``https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<secret-version>``.

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

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
"MaxPodsConstraint",
2929
"OperationMetadata",
3030
"NodeTaint",
31+
"NodeKubeletConfig",
3132
"Fleet",
3233
"LoggingConfig",
3334
"LoggingComponentConfig",
3435
"MonitoringConfig",
3536
"ManagedPrometheusConfig",
3637
"BinaryAuthorization",
38+
"SecurityPostureConfig",
3739
},
3840
)
3941

@@ -263,6 +265,96 @@ class Effect(proto.Enum):
263265
)
264266

265267

268+
class NodeKubeletConfig(proto.Message):
269+
r"""Configuration for node pool kubelet options.
270+
271+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
272+
273+
Attributes:
274+
insecure_kubelet_readonly_port_enabled (bool):
275+
Optional. Enable the insecure kubelet read
276+
only port.
277+
cpu_manager_policy (str):
278+
Optional. Control the CPU management policy on the node. See
279+
https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/
280+
281+
The following values are allowed.
282+
283+
- "none": the default, which represents the existing
284+
scheduling behavior.
285+
- "static": allows pods with certain resource
286+
characteristics to be granted increased CPU affinity and
287+
exclusivity on the node. The default value is 'none' if
288+
unspecified.
289+
290+
This field is a member of `oneof`_ ``_cpu_manager_policy``.
291+
cpu_cfs_quota (bool):
292+
Optional. Enable CPU CFS quota enforcement
293+
for containers that specify CPU limits.
294+
295+
This option is enabled by default which makes
296+
kubelet use CFS quota
297+
(https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt)
298+
to enforce container CPU limits. Otherwise, CPU
299+
limits will not be enforced at all.
300+
301+
Disable this option to mitigate CPU throttling
302+
problems while still having your pods to be in
303+
Guaranteed QoS class by specifying the CPU
304+
limits.
305+
306+
The default value is 'true' if unspecified.
307+
308+
This field is a member of `oneof`_ ``_cpu_cfs_quota``.
309+
cpu_cfs_quota_period (str):
310+
Optional. Set the CPU CFS quota period value
311+
'cpu.cfs_period_us'.
312+
313+
The string must be a sequence of decimal numbers, each with
314+
optional fraction and a unit suffix, such as "300ms". Valid
315+
time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
316+
The value must be a positive duration.
317+
318+
The default value is '100ms' if unspecified.
319+
320+
This field is a member of `oneof`_ ``_cpu_cfs_quota_period``.
321+
pod_pids_limit (int):
322+
Optional. Set the Pod PID limits. See
323+
https://kubernetes.io/docs/concepts/policy/pid-limiting/#pod-pid-limits
324+
325+
Controls the maximum number of processes allowed
326+
to run in a pod. The value must be greater than
327+
or equal to 1024 and less than 4194304.
328+
329+
This field is a member of `oneof`_ ``_pod_pids_limit``.
330+
"""
331+
332+
insecure_kubelet_readonly_port_enabled: bool = proto.Field(
333+
proto.BOOL,
334+
number=1,
335+
)
336+
cpu_manager_policy: str = proto.Field(
337+
proto.STRING,
338+
number=2,
339+
optional=True,
340+
)
341+
cpu_cfs_quota: bool = proto.Field(
342+
proto.BOOL,
343+
number=3,
344+
optional=True,
345+
)
346+
cpu_cfs_quota_period: str = proto.Field(
347+
proto.STRING,
348+
number=4,
349+
optional=True,
350+
)
351+
pod_pids_limit: int = proto.Field(
352+
proto.INT64,
353+
number=5,
354+
optional=True,
355+
)
356+
357+
266358
class Fleet(proto.Message):
267359
r"""Fleet related configuration.
268360
@@ -414,4 +506,39 @@ class EvaluationMode(proto.Enum):
414506
)
415507

416508

509+
class SecurityPostureConfig(proto.Message):
510+
r"""SecurityPostureConfig defines the flags needed to
511+
enable/disable features for the Security Posture API.
512+
513+
Attributes:
514+
vulnerability_mode (google.cloud.gke_multicloud_v1.types.SecurityPostureConfig.VulnerabilityMode):
515+
Sets which mode to use for vulnerability
516+
scanning.
517+
"""
518+
519+
class VulnerabilityMode(proto.Enum):
520+
r"""VulnerabilityMode defines enablement mode for vulnerability
521+
scanning.
522+
523+
Values:
524+
VULNERABILITY_MODE_UNSPECIFIED (0):
525+
Default value not specified.
526+
VULNERABILITY_DISABLED (1):
527+
Disables vulnerability scanning on the
528+
cluster.
529+
VULNERABILITY_ENTERPRISE (2):
530+
Applies the Security Posture's vulnerability
531+
on cluster Enterprise level features.
532+
"""
533+
VULNERABILITY_MODE_UNSPECIFIED = 0
534+
VULNERABILITY_DISABLED = 1
535+
VULNERABILITY_ENTERPRISE = 2
536+
537+
vulnerability_mode: VulnerabilityMode = proto.Field(
538+
proto.ENUM,
539+
number=1,
540+
enum=VulnerabilityMode,
541+
)
542+
543+
417544
__all__ = tuple(sorted(__protobuf__.manifest))

0 commit comments

Comments
 (0)