Skip to content

Conversation

@dejanzele
Copy link
Member

@dejanzele dejanzele commented Sep 22, 2025

What type of PR is this?

Feature PR which injects two environment variables into all containers of gang-scheduled jobs when they have node uniformity requirements:

  • ARMADA_JOB_ID: The Armada Job id
  • ARMADA_QUEUE: Queue in which the job was submitted
  • ARMADA_JOBSET_ID: JobSet id for which the job was submitted
  • ARMADA_GANG_ID: Gang id in case it is gang job
  • ARMADA_GANG_CARDINALITY: Number of jobs in the gang in case it is a gang job
  • ARMADA_GANG_NODE_UNIFORMITY_LABEL_NAME: The node label name used for uniformity (e.g., "rack") in case it is a gang job
  • ARMADA_GANG_NODE_UNIFORMITY_LABEL_VALUE: The actual value selected during scheduling (e.g., "rack-1") in case it is a gang job

If any envvar was already defined, Armada will not override it.

What this PR does / why we need it:

By injecting job info, Armada integrations like armada-spark could implement dynamic allocation where the initial set of driver + executors gets submitted as a non-preemptible gang, and the dynamic executors then use the gang info to leverage nodeSelectors to submit dynamic preemptible executors on the same set of nodes on which the initial gang is executing.

Which issue(s) this PR fixes:

Fixes #4455

Testing

  1. armadactl create queue queue-a
  2. armadactl submit example/example-job.yaml
  3. kubectl describe <pod>
  4. Validate it has ARMADA_JOB_ID, ARMADA_QUEUE, ARMADA_JOBSET_ID

@dejanzele dejanzele force-pushed the feat/inject-gang-info branch 3 times, most recently from 8a64b0c to 696e18f Compare September 24, 2025 08:08
@dejanzele dejanzele changed the title feat: inject gang info as envvars in scheduled gang pods feat: inject job info as envvars in scheduled pods Sep 24, 2025
@dejanzele dejanzele force-pushed the feat/inject-gang-info branch 3 times, most recently from 40ee103 to 3d74b92 Compare September 24, 2025 09:40
@dejanzele dejanzele force-pushed the feat/inject-gang-info branch from 3d74b92 to 21370b2 Compare September 24, 2025 10:26
@dejanzele dejanzele requested review from JamesMurkin, d80tb7 and robertdavidsmith and removed request for JamesMurkin September 24, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inject gang info in Armada jobs/pods

1 participant