Skip to content

Commit 6cc50d9

Browse files
feat: [batch] add a CloudLoggingOption and use_generic_task_monitored_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]>
1 parent 94c159f commit 6cc50d9

5 files changed

Lines changed: 374 additions & 0 deletions

File tree

packages/google-cloud-batch/protos/google/cloud/batch/v1/job.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ message Job {
9191
// LogsPolicy describes how outputs from a Job's Tasks (stdout/stderr) will be
9292
// preserved.
9393
message LogsPolicy {
94+
// CloudLoggingOption contains additional settings for cloud logging generated
95+
// by Batch job.
96+
message CloudLoggingOption {}
97+
9498
// The destination (if any) for logs.
9599
enum Destination {
96100
// Logs are not preserved.
@@ -110,6 +114,11 @@ message LogsPolicy {
110114
// local file path on the VM, or under the mount point of a Persistent Disk or
111115
// Filestore, or a Cloud Storage path.
112116
string logs_path = 2;
117+
118+
// Optional. Additional settings for Cloud Logging. It will only take effect
119+
// when the destination of LogsPolicy is set to CLOUD_LOGGING.
120+
CloudLoggingOption cloud_logging_option = 3
121+
[(google.api.field_behavior) = OPTIONAL];
113122
}
114123

115124
// Job status.
@@ -507,6 +516,10 @@ message AllocationPolicy {
507516
map<string, string> labels = 6;
508517

509518
// The network policy.
519+
//
520+
// If you define an instance template in the InstancePolicyOrTemplate field,
521+
// Batch will use the network settings in the instance template instead of
522+
// this field.
510523
NetworkPolicy network = 7;
511524

512525
// The placement policy.

packages/google-cloud-batch/protos/google/cloud/batch/v1alpha/job.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,10 @@ message AllocationPolicy {
600600
map<string, string> labels = 6;
601601

602602
// The network policy.
603+
//
604+
// If you define an instance template in the InstancePolicyOrTemplate field,
605+
// Batch will use the network settings in the instance template instead of
606+
// this field.
603607
NetworkPolicy network = 7;
604608

605609
// The placement policy.
@@ -687,6 +691,17 @@ message TaskGroup {
687691
// When true, Batch will configure SSH to allow passwordless login between
688692
// VMs running the Batch tasks in the same TaskGroup.
689693
bool permissive_ssh = 12;
694+
695+
// Optional. When true, Batch will use the OS Login generated POSIX account to
696+
// exeucute the runnables instead of the default root user.
697+
//
698+
// To control root or non-root privilege for runnable execution, the project \
699+
// Admin user needs to configure IAM roles according to
700+
// https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
701+
// Specifically, if a root execution is needed, the roles/compute.osAdminLogin
702+
// should be granted to the Batch job submitter. Otherwise,
703+
// roles/compute.osLogin should be granted to the Batch job submitter.
704+
bool enable_oslogin = 13 [(google.api.field_behavior) = OPTIONAL];
690705
}
691706

692707
// Carries information about a Google Cloud service account.

packages/google-cloud-batch/protos/protos.d.ts

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)