Skip to content

Commit

Permalink
feat: [batch] add a CloudLoggingOption and use_generic_task_monitored…
Browse files Browse the repository at this point in the history
…_resource fields for users to opt out new batch monitored resource in cloud logging (#4839)

* feat: Add TaskGroup.enable_oslogin to give the Batch job submitter the ability to run runnables as non-root controlled by IAM
docs: Update documentation for the network field of AllocationPolicy

PiperOrigin-RevId: 584258085

Source-Link: googleapis/googleapis@0f85c39

Source-Link: googleapis/googleapis-gen@b07e603
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJiMDdlNjAzZjg2NzFhNmIyODFlNGMzZWRiOTJmZjIxOWRhMjViMzBjIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add a CloudLoggingOption and use_generic_task_monitored_resource fields for users to opt out new batch monitored resource in cloud logging
docs: update comment for AllocationPolicy.network

PiperOrigin-RevId: 584365225

Source-Link: googleapis/googleapis@ad35fda

Source-Link: googleapis/googleapis-gen@f2e86a5
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJmMmU4NmE1NTBlNGRjYjlkMTkyNjkyNDdjZDEwYmU4OGQzZTAwYTlkIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 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>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Nov 30, 2023
1 parent 94c159f commit 6cc50d9
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ message Job {
// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
// preserved.
message LogsPolicy {
// CloudLoggingOption contains additional settings for cloud logging generated
// by Batch job.
message CloudLoggingOption {}

// The destination (if any) for logs.
enum Destination {
// Logs are not preserved.
Expand All @@ -110,6 +114,11 @@ message LogsPolicy {
// local file path on the VM, or under the mount point of a Persistent Disk or
// Filestore, or a Cloud Storage path.
string logs_path = 2;

// Optional. Additional settings for Cloud Logging. It will only take effect
// when the destination of LogsPolicy is set to CLOUD_LOGGING.
CloudLoggingOption cloud_logging_option = 3
[(google.api.field_behavior) = OPTIONAL];
}

// Job status.
Expand Down Expand Up @@ -507,6 +516,10 @@ message AllocationPolicy {
map<string, string> labels = 6;

// The network policy.
//
// If you define an instance template in the InstancePolicyOrTemplate field,
// Batch will use the network settings in the instance template instead of
// this field.
NetworkPolicy network = 7;

// The placement policy.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ message AllocationPolicy {
map<string, string> labels = 6;

// The network policy.
//
// If you define an instance template in the InstancePolicyOrTemplate field,
// Batch will use the network settings in the instance template instead of
// this field.
NetworkPolicy network = 7;

// The placement policy.
Expand Down Expand Up @@ -687,6 +691,17 @@ message TaskGroup {
// When true, Batch will configure SSH to allow passwordless login between
// VMs running the Batch tasks in the same TaskGroup.
bool permissive_ssh = 12;

// Optional. When true, Batch will use the OS Login generated POSIX account to
// exeucute the runnables instead of the default root user.
//
// To control root or non-root privilege for runnable execution, the project \
// Admin user needs to configure IAM roles according to
// https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
// Specifically, if a root execution is needed, the roles/compute.osAdminLogin
// should be granted to the Batch job submitter. Otherwise,
// roles/compute.osLogin should be granted to the Batch job submitter.
bool enable_oslogin = 13 [(google.api.field_behavior) = OPTIONAL];
}

// Carries information about a Google Cloud service account.
Expand Down
103 changes: 103 additions & 0 deletions packages/google-cloud-batch/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6cc50d9

Please sign in to comment.