From b063395e4436b68acc5a48cb6e8f60cce70abc17 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:56:52 -0500 Subject: [PATCH] feat: [google-cloud-binary-authorization] add container_name, container_type fields to Continuous Validation Logs (#12051) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 585695887 Source-Link: https://github.com/googleapis/googleapis/commit/4eccaaf48c0ccadc6f98707d3dbe9614d47bb103 Source-Link: https://github.com/googleapis/googleapis-gen/commit/664879501d516e9c67d04851429a3f19f20b09a5 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpbmFyeS1hdXRob3JpemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI2NjQ4Nzk1MDFkNTE2ZTljNjdkMDQ4NTE0MjlhM2YxOWYyMGIwOWE1In0= --------- Co-authored-by: Owl Bot --- .../CONTRIBUTING.rst | 24 ++++++------- .../docs/conf.py | 2 +- .../types/continuous_validation_logging.py | 35 +++++++++++++++++++ 3 files changed, 48 insertions(+), 13 deletions(-) diff --git a/packages/google-cloud-binary-authorization/CONTRIBUTING.rst b/packages/google-cloud-binary-authorization/CONTRIBUTING.rst index a3840bfe0c64..f630d49d4d14 100644 --- a/packages/google-cloud-binary-authorization/CONTRIBUTING.rst +++ b/packages/google-cloud-binary-authorization/CONTRIBUTING.rst @@ -35,21 +35,21 @@ Using a Development Checkout You'll have to create a development environment using a Git checkout: - While logged into your GitHub account, navigate to the - ``python-binary-authorization`` `repo`_ on GitHub. + ``google-cloud-python`` `repo`_ on GitHub. -- Fork and clone the ``python-binary-authorization`` repository to your GitHub account by +- Fork and clone the ``google-cloud-python`` repository to your GitHub account by clicking the "Fork" button. -- Clone your fork of ``python-binary-authorization`` from your GitHub account to your local +- Clone your fork of ``google-cloud-python`` from your GitHub account to your local computer, substituting your account username and specifying the destination - as ``hack-on-python-binary-authorization``. E.g.:: + as ``hack-on-google-cloud-python``. E.g.:: $ cd ${HOME} - $ git clone git@github.com:USERNAME/python-binary-authorization.git hack-on-python-binary-authorization - $ cd hack-on-python-binary-authorization - # Configure remotes such that you can pull changes from the googleapis/python-binary-authorization + $ git clone git@github.com:USERNAME/google-cloud-python.git hack-on-google-cloud-python + $ cd hack-on-google-cloud-python + # Configure remotes such that you can pull changes from the googleapis/google-cloud-python # repository into your local repository. - $ git remote add upstream git@github.com:googleapis/python-binary-authorization.git + $ git remote add upstream git@github.com:googleapis/google-cloud-python.git # fetch and merge changes from upstream into main $ git fetch upstream $ git merge upstream/main @@ -60,7 +60,7 @@ repo, from which you can submit a pull request. To work on the codebase and run the tests, we recommend using ``nox``, but you can also use a ``virtualenv`` of your own creation. -.. _repo: https://github.com/googleapis/python-binary-authorization +.. _repo: https://github.com/googleapis/google-cloud-python Using ``nox`` ============= @@ -113,7 +113,7 @@ Coding Style export GOOGLE_CLOUD_TESTING_BRANCH="main" By doing this, you are specifying the location of the most up-to-date - version of ``python-binary-authorization``. The + version of ``google-cloud-python``. The remote name ``upstream`` should point to the official ``googleapis`` checkout and the branch should be the default branch on that remote (``main``). @@ -209,7 +209,7 @@ The `description on PyPI`_ for the project comes directly from the ``README``. Due to the reStructuredText (``rst``) parser used by PyPI, relative links which will work on GitHub (e.g. ``CONTRIBUTING.rst`` instead of -``https://github.com/googleapis/python-binary-authorization/blob/main/CONTRIBUTING.rst``) +``https://github.com/googleapis/google-cloud-python/blob/main/CONTRIBUTING.rst``) may cause problems creating links or rendering the description. .. _description on PyPI: https://pypi.org/project/google-cloud-binary-authorization @@ -236,7 +236,7 @@ We support: Supported versions can be found in our ``noxfile.py`` `config`_. -.. _config: https://github.com/googleapis/python-binary-authorization/blob/main/packages/google-cloud-binary-authorization/noxfile.py +.. _config: https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-binary-authorization/noxfile.py ********** diff --git a/packages/google-cloud-binary-authorization/docs/conf.py b/packages/google-cloud-binary-authorization/docs/conf.py index 5b8603ae07e6..c55d548b94d6 100644 --- a/packages/google-cloud-binary-authorization/docs/conf.py +++ b/packages/google-cloud-binary-authorization/docs/conf.py @@ -156,7 +156,7 @@ html_theme_options = { "description": "Google Cloud Client Libraries for google-cloud-binary-authorization", "github_user": "googleapis", - "github_repo": "python-binary-authorization", + "github_repo": "google-cloud-python", "github_banner": True, "font_family": "'Roboto', Georgia, sans", "head_font_family": "'Roboto', Georgia, serif", diff --git a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/types/continuous_validation_logging.py b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/types/continuous_validation_logging.py index 76f8e6413acc..0f44a5b4b69e 100644 --- a/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/types/continuous_validation_logging.py +++ b/packages/google-cloud-binary-authorization/google/cloud/binaryauthorization_v1beta1/types/continuous_validation_logging.py @@ -89,6 +89,11 @@ class ImageDetails(proto.Message): Attributes: image (str): The name of the image. + container_name (str): + The name of the container. + container_type (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType): + The container type that this image belongs + to. result (google.cloud.binaryauthorization_v1beta1.types.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult): The result of the audit for this image. description (str): @@ -97,6 +102,27 @@ class ImageDetails(proto.Message): List of check results. """ + class ContainerType(proto.Enum): + r"""The container type. + + Values: + CONTAINER_TYPE_UNSPECIFIED (0): + The container type should always be + specified. This is an error. + CONTAINER (1): + A regular deployment. + INIT_CONTAINER (2): + Init container defined as specified at + https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + EPHEMERAL_CONTAINER (3): + Ephemeral container defined as specified at + https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/ + """ + CONTAINER_TYPE_UNSPECIFIED = 0 + CONTAINER = 1 + INIT_CONTAINER = 2 + EPHEMERAL_CONTAINER = 3 + class AuditResult(proto.Enum): r"""Result of the audit. @@ -225,6 +251,15 @@ class CheckSetScope(proto.Message): proto.STRING, number=1, ) + container_name: str = proto.Field( + proto.STRING, + number=5, + ) + container_type: "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType" = proto.Field( + proto.ENUM, + number=6, + enum="ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType", + ) result: "ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult" = proto.Field( proto.ENUM, number=2,