Skip to content

add label key volcano.sh/task-index #98

@shuaiyy

Description

@shuaiyy

Is your feature request related to a problem? Please describe.
current, volcano task pod has label:

volcano.sh/job-name
volcano.sh/task-spec=worker

but missed task-index

task-index is important:

  • get task-index from pod object label, instead of parsing pod name
  • add a service by selector job-name task-spec task-index if someone need a k8s Service for a target task Pod
  • mount env from labels as a TASK_INDEX; the env plugin provide env key VC_TASK_INDEX which user cannot custom the name.

Describe the solution you'd like

add a volcano.sh/task-index to pod label

Describe alternatives you've considered

I want to know the reason why task-index not set to pod annotation

Additional context

the kubeflow training-operator project provider those labels in the task pod:

training.kubeflow.org/job-name
training.kubeflow.org/replica-type=chief
training.kubeflow.org/replica-index=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions