Skip to content

Commit 7c5e95c

Browse files
feat: [batch] Add tags field in Job's AllocationPolicy field in v1alpha (#4934)
* feat: Add `tags` field in Job's AllocationPolicy field in v1alpha feat: add a run_as_non_root field and deprecate enable_oslogin for non-root execution docs: updated comments PiperOrigin-RevId: 596742590 Source-Link: googleapis/googleapis@09b78e2 Source-Link: googleapis/googleapis-gen@d5d8699 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJkNWQ4Njk5NDJhYWZkZjk0NDZjMjc0MzgwYjczNDhjMTU5MWMxNTZkIn0= * 🦉 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 7266a83 commit 7c5e95c

5 files changed

Lines changed: 111 additions & 5 deletions

File tree

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,13 @@ message AllocationPolicy {
608608

609609
// The placement policy.
610610
PlacementPolicy placement = 10;
611+
612+
// Optional. Tags applied to the VM instances.
613+
//
614+
// The tags identify valid sources or targets for network firewalls.
615+
// Each tag must be 1-63 characters long, and comply with
616+
// [RFC1035](https://www.ietf.org/rfc/rfc1035.txt).
617+
repeated string tags = 11 [(google.api.field_behavior) = OPTIONAL];
611618
}
612619

613620
// A TaskGroup defines one or more Tasks that all share the same TaskSpec.
@@ -692,16 +699,23 @@ message TaskGroup {
692699
// VMs running the Batch tasks in the same TaskGroup.
693700
bool permissive_ssh = 12;
694701

695-
// Optional. When true, Batch will use the OS Login generated POSIX account to
696-
// exeucute the runnables instead of the default root user.
702+
// Optional. Deprecated: When true, Batch will use the OS Login generated
703+
// POSIX account to exeucute the runnables instead of the default root user.
697704
//
698705
// To control root or non-root privilege for runnable execution, the project \
699706
// Admin user needs to configure IAM roles according to
700707
// https://cloud.google.com/compute/docs/oslogin/set-up-oslogin#configure_users.
701708
// Specifically, if a root execution is needed, the roles/compute.osAdminLogin
702709
// should be granted to the Batch job submitter. Otherwise,
703710
// roles/compute.osLogin should be granted to the Batch job submitter.
704-
bool enable_oslogin = 13 [(google.api.field_behavior) = OPTIONAL];
711+
bool enable_oslogin = 13
712+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
713+
714+
// Optional. If not set or set to false, Batch will use root user to execute
715+
// runnables. If set to true, Batch will make sure to run the runnables using
716+
// non-root user. Currently, the non-root user Batch used is generated by OS
717+
// login. Reference: https://cloud.google.com/compute/docs/oslogin
718+
bool run_as_non_root = 14 [(google.api.field_behavior) = OPTIONAL];
705719
}
706720

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

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,13 @@ message Runnable {
208208
// password from the Secret Manager;
209209
string password = 11;
210210

211-
// Optional. Not yet implemented.
212-
// If set to true, container will run with Image streaming.
211+
// Optional. If set to true, container will run with Image streaming.
213212
// The container runtime will be changed to containerd
214213
// instead of docker. Currently, only imageUri, commands, entrypoint
215214
// and volumes are supported and any other fields will be ignored.
215+
// Please refer
216+
// [here](https://github.com/GoogleCloudPlatform/batch-samples/tree/main/api-samples/image-streaming)
217+
// for the feature requirements and limitations.
216218
bool enable_image_streaming = 12 [(google.api.field_behavior) = OPTIONAL];
217219
}
218220

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

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

packages/google-cloud-batch/protos/protos.js

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

packages/google-cloud-batch/protos/protos.json

Lines changed: 16 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)