Skip to content

Commit b063395

Browse files
feat: [google-cloud-binary-authorization] add container_name, container_type fields to Continuous Validation Logs (googleapis#12051)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 585695887 Source-Link: googleapis/googleapis@4eccaaf Source-Link: https://github.com/googleapis/googleapis-gen/commit/664879501d516e9c67d04851429a3f19f20b09a5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbmFyeS1hdXRob3JpemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI2NjQ4Nzk1MDFkNTE2ZTljNjdkMDQ4NTE0MjlhM2YxOWYyMGIwOWE1In0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent a927596 commit b063395

3 files changed

Lines changed: 48 additions & 13 deletions

File tree

packages/google-cloud-binary-authorization/CONTRIBUTING.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ Using a Development Checkout
3535
You'll have to create a development environment using a Git checkout:
3636

3737
- While logged into your GitHub account, navigate to the
38-
``python-binary-authorization`` `repo`_ on GitHub.
38+
``google-cloud-python`` `repo`_ on GitHub.
3939

40-
- Fork and clone the ``python-binary-authorization`` repository to your GitHub account by
40+
- Fork and clone the ``google-cloud-python`` repository to your GitHub account by
4141
clicking the "Fork" button.
4242

43-
- Clone your fork of ``python-binary-authorization`` from your GitHub account to your local
43+
- Clone your fork of ``google-cloud-python`` from your GitHub account to your local
4444
computer, substituting your account username and specifying the destination
45-
as ``hack-on-python-binary-authorization``. E.g.::
45+
as ``hack-on-google-cloud-python``. E.g.::
4646

4747
$ cd ${HOME}
48-
$ git clone git@github.com:USERNAME/python-binary-authorization.git hack-on-python-binary-authorization
49-
$ cd hack-on-python-binary-authorization
50-
# Configure remotes such that you can pull changes from the googleapis/python-binary-authorization
48+
$ git clone git@github.com:USERNAME/google-cloud-python.git hack-on-google-cloud-python
49+
$ cd hack-on-google-cloud-python
50+
# Configure remotes such that you can pull changes from the googleapis/google-cloud-python
5151
# repository into your local repository.
52-
$ git remote add upstream git@github.com:googleapis/python-binary-authorization.git
52+
$ git remote add upstream git@github.com:googleapis/google-cloud-python.git
5353
# fetch and merge changes from upstream into main
5454
$ git fetch upstream
5555
$ git merge upstream/main
@@ -60,7 +60,7 @@ repo, from which you can submit a pull request.
6060
To work on the codebase and run the tests, we recommend using ``nox``,
6161
but you can also use a ``virtualenv`` of your own creation.
6262

63-
.. _repo: https://github.com/googleapis/python-binary-authorization
63+
.. _repo: https://github.com/googleapis/google-cloud-python
6464

6565
Using ``nox``
6666
=============
@@ -113,7 +113,7 @@ Coding Style
113113
export GOOGLE_CLOUD_TESTING_BRANCH="main"
114114

115115
By doing this, you are specifying the location of the most up-to-date
116-
version of ``python-binary-authorization``. The
116+
version of ``google-cloud-python``. The
117117
remote name ``upstream`` should point to the official ``googleapis``
118118
checkout and the branch should be the default branch on that remote (``main``).
119119

@@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the
209209
``README``. Due to the reStructuredText (``rst``) parser used by
210210
PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst``
211211
instead of
212-
``https://github.com/googleapis/python-binary-authorization/blob/main/CONTRIBUTING.rst``)
212+
``https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.rst``)
213213
may cause problems creating links or rendering the description.
214214

215215
.. _description on PyPI: https://pypi.org/project/google-cloud-binary-authorization
@@ -236,7 +236,7 @@ We support:
236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239-
.. _config: https://github.com/googleapis/python-binary-authorization/blob/main/packages/google-cloud-binary-authorization/noxfile.py
239+
.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-binary-authorization/noxfile.py
240240

241241

242242
**********

packages/google-cloud-binary-authorization/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
html_theme_options = {
157157
"description": "Google Cloud Client Libraries for google-cloud-binary-authorization",
158158
"github_user": "googleapis",
159-
"github_repo": "python-binary-authorization",
159+
"github_repo": "google-cloud-python",
160160
"github_banner": True,
161161
"font_family": "'Roboto', Georgia, sans",
162162
"head_font_family": "'Roboto', Georgia, serif",

packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/types/continuous_validation_logging.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ class ImageDetails(proto.Message):
8989
Attributes:
9090
image (str):
9191
The name of the image.
92+
container_name (str):
93+
The name of the container.
94+
container_type (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType):
95+
The container type that this image belongs
96+
to.
9297
result (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult):
9398
The result of the audit for this image.
9499
description (str):
@@ -97,6 +102,27 @@ class ImageDetails(proto.Message):
97102
List of check results.
98103
"""
99104

105+
class ContainerType(proto.Enum):
106+
r"""The container type.
107+
108+
Values:
109+
CONTAINER_TYPE_UNSPECIFIED (0):
110+
The container type should always be
111+
specified. This is an error.
112+
CONTAINER (1):
113+
A regular deployment.
114+
INIT_CONTAINER (2):
115+
Init container defined as specified at
116+
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
117+
EPHEMERAL_CONTAINER (3):
118+
Ephemeral container defined as specified at
119+
https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/
120+
"""
121+
CONTAINER_TYPE_UNSPECIFIED = 0
122+
CONTAINER = 1
123+
INIT_CONTAINER = 2
124+
EPHEMERAL_CONTAINER = 3
125+
100126
class AuditResult(proto.Enum):
101127
r"""Result of the audit.
102128
@@ -225,6 +251,15 @@ class CheckSetScope(proto.Message):
225251
proto.STRING,
226252
number=1,
227253
)
254+
container_name: str = proto.Field(
255+
proto.STRING,
256+
number=5,
257+
)
258+
container_type: "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType" = proto.Field(
259+
proto.ENUM,
260+
number=6,
261+
enum="ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType",
262+
)
228263
result: "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult" = proto.Field(
229264
proto.ENUM,
230265
number=2,

0 commit comments

Comments
 (0)