Skip to content

Commit

Permalink
PTFE-1144 gcloud runner monitoring and logging scopes (#513)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet authored Jan 5, 2024
1 parent 2d6b7bd commit 6494694
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions runner_manager/backend/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
NetworkInterface,
Operation,
Scheduling,
ServiceAccount,
ZoneOperationsClient,
)
from pydantic import Field
Expand Down Expand Up @@ -140,6 +141,15 @@ def configure_instance(self, runner: Runner) -> Instance:
enable_nested_virtualization=self.instance_config.enable_nested_virtualization
),
scheduling=self.scheduling,
service_accounts=[
ServiceAccount(
email="default",
scopes=[
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring.write",
],
)
],
)

def _sanitize_label_value(self, value: str) -> str:
Expand Down

0 comments on commit 6494694

Please sign in to comment.