Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM-1269 Unique AWS ROLE SESSION NAME #33

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions uptime_service_validation/coordinator/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ def setUpValidatorPods(time_intervals, logging, worker_image, worker_tag):
if bool_env_var_set("NO_CHECKS"):
logging.info("stateless-verifier will run with --no-checks flag")
for index, mini_batch in enumerate(time_intervals):

# Job name
job_name = f"delegation-verify-{datetime.now(timezone.utc).strftime('%y-%m-%d-%H-%M')}-{index}"

# Define the environment variables
env_vars = [
client.V1EnvVar(
name="AWS_ROLE_SESSION_NAME",
value=os.environ.get("AWS_ROLE_SESSION_NAME").rstrip("-coordinator"),
value=job_name,
),
client.V1EnvVar(
name="AWS_REGION",
Expand Down Expand Up @@ -199,9 +203,6 @@ def setUpValidatorPods(time_intervals, logging, worker_image, worker_tag):
volume_mounts=[auth_volume_mount],
)

# Job name
job_name = f"delegation-verify-{datetime.now(timezone.utc).strftime('%y-%m-%d-%H-%M')}-{index}"

# Create the job
job = client.V1Job(
api_version="batch/v1",
Expand Down
Loading