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

Commit c5806de

Browse files
feat(v1beta1): Add preview support for monitoring a cluster's pods for compliance with a provided Binary Authorization platform policy via Binary Authorization Continuous Validation (#405)
* feat: Add preview support for monitoring a cluster's pods for compliance with a provided Binary Authorization platform policy via Binary Authorization Continuous Validation PiperOrigin-RevId: 555745169 Source-Link: googleapis/googleapis@2edfcad Source-Link: https://github.com/googleapis/googleapis-gen/commit/cf19791d82ebf56917bf6b704f274a4cc5d89546 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2YxOTc5MWQ4MmViZjU2OTE3YmY2YjcwNGYyNzRhNGNjNWQ4OTU0NiJ9 * 🦉 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 8a10b34 commit c5806de

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

google/cloud/container_v1beta1/types/cluster_service.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2558,6 +2558,9 @@ class BinaryAuthorization(proto.Message):
25582558
Mode of operation for binauthz policy
25592559
evaluation. If unspecified, defaults to
25602560
DISABLED.
2561+
policy_bindings (MutableSequence[google.cloud.container_v1beta1.types.BinaryAuthorization.PolicyBinding]):
2562+
Optional. Binauthz policies that apply to
2563+
this cluster.
25612564
"""
25622565

25632566
class EvaluationMode(proto.Enum):
@@ -2573,10 +2576,39 @@ class EvaluationMode(proto.Enum):
25732576
BinaryAuthorization using the project's
25742577
singleton policy. This is equivalent to setting
25752578
the enabled boolean to true.
2579+
POLICY_BINDINGS (5):
2580+
Use Binary Authorization with the policies specified in
2581+
policy_bindings.
2582+
POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE (6):
2583+
Use Binary Authorization with the policies specified in
2584+
policy_bindings, and also with the project's singleton
2585+
policy in enforcement mode.
25762586
"""
25772587
EVALUATION_MODE_UNSPECIFIED = 0
25782588
DISABLED = 1
25792589
PROJECT_SINGLETON_POLICY_ENFORCE = 2
2590+
POLICY_BINDINGS = 5
2591+
POLICY_BINDINGS_AND_PROJECT_SINGLETON_POLICY_ENFORCE = 6
2592+
2593+
class PolicyBinding(proto.Message):
2594+
r"""Binauthz policy that applies to this cluster.
2595+
2596+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
2597+
2598+
Attributes:
2599+
name (str):
2600+
The relative resource name of the binauthz platform policy
2601+
to audit. GKE platform policies have the following format:
2602+
``projects/{project_number}/platforms/gke/policies/{policy_id}``.
2603+
2604+
This field is a member of `oneof`_ ``_name``.
2605+
"""
2606+
2607+
name: str = proto.Field(
2608+
proto.STRING,
2609+
number=1,
2610+
optional=True,
2611+
)
25802612

25812613
enabled: bool = proto.Field(
25822614
proto.BOOL,
@@ -2587,6 +2619,11 @@ class EvaluationMode(proto.Enum):
25872619
number=2,
25882620
enum=EvaluationMode,
25892621
)
2622+
policy_bindings: MutableSequence[PolicyBinding] = proto.RepeatedField(
2623+
proto.MESSAGE,
2624+
number=5,
2625+
message=PolicyBinding,
2626+
)
25902627

25912628

25922629
class PodSecurityPolicyConfig(proto.Message):

samples/generated_samples/snippet_metadata_google.container.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-container",
11-
"version": "2.29.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.container.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-container",
11-
"version": "2.29.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)