-
Notifications
You must be signed in to change notification settings - Fork 971
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
Added hosts into environment. #610
Conversation
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: 4bf2e3d0-1f52-11ea-ba47-7f442aed9c1e |
generally, AI workload also need the |
by the way, from this PR, in my point of view, |
|
what does urrent_host` info mean? you can get hostname in container by POSIX api, e.g. hostname. |
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: 1d303e60-1fa4-11ea-ba47-7f442aed9c1e |
|
Is this a common requirement, I am worried this is just for TF job |
Hey @k82cn, TravisBuddy Request Identifier: a5660a80-1fae-11ea-ba47-7f442aed9c1e |
hostname or podname can work well in the container network, but it doesn't work in the host network mode, but the headless svc work |
hm.. maybe we can support |
just checked code here: https://github.com/volcano-sh/volcano/blob/master/pkg/controllers/job/plugins/svc/svc.go#L274 . It seems we already support that; so I'd like to support host network in other PR :) |
I am still not sure what do you mean by hostnetwork. IIRC, the hostnetwork mode has nothing special for headless service. |
If so, please work with @zrss on this. |
@zrss please clarify, we need a little bit more. Not just an issue without any context |
@hzxuzhonghu , please start another thread for this discussion. |
90ecd64
to
184553c
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hey @k82cn, TravisBuddy Request Identifier: d23cc130-1fda-11ea-ba47-7f442aed9c1e |
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: 359641c0-1fdb-11ea-ba47-7f442aed9c1e |
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: d1f894d0-1ff1-11ea-ba47-7f442aed9c1e |
Hey @k82cn, TravisCI finished with status TravisBuddy Request Identifier: 8103be60-1ffb-11ea-ba47-7f442aed9c1e |
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: fbe64510-200c-11ea-8d2e-279a4df7ebeb |
Travis tests have failedHey @k82cn, TravisBuddy Request Identifier: aea92a00-2017-11ea-8d2e-279a4df7ebeb |
for _, name := range envNames { | ||
hostEnv = append(hostEnv, v1.EnvVar{ | ||
Name: name, | ||
ValueFrom: &v1.EnvVarSource{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Downward api is used when we can not get the value directly, and is it not that efficient. Here can set the value directly.
// EnvTaskHostFmt is the key for host list in environment | ||
EnvTaskHostFmt = "VC_%s_HOSTS" | ||
// EnvHostNumFmt is the key for host number in environment | ||
EnvHostNumFmt = "VC_%s_NUM" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the use case for the num.
Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
Hey @k82cn, TravisCI finished with status TravisBuddy Request Identifier: 41f3e410-20ba-11ea-830b-038034041c48 |
Hey @k82cn, TravisBuddy Request Identifier: de687d10-20c4-11ea-830b-038034041c48 |
Signed-off-by: Klaus Ma klaus1982.cn@gmail.com
fixed #260