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

MESOS: inject certain MESOS_ envvars into all container env #20845

Merged

Conversation

jdef
Copy link
Contributor

@jdef jdef commented Feb 8, 2016

xref d2iq-archive/kubernetes-mesos#739

TODO:

  • double-check change from slave.hostname to executorService.hostnameOverride
    • the hostname-overide comes directly from the Mesos offer.hostname field, which should match the hostname passed to the executor via slaveInfo
  • change podsource.Filter.Accept from **api.Pod to *api.Pod and expand result as (bool,*api.Pod)
  • add big TODO note near declaration of envContainerID

@k8s-github-robot
Copy link

Labelling this PR as size/XL

@k8s-github-robot k8s-github-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 8, 2016
@k8s-bot
Copy link

k8s-bot commented Feb 8, 2016

GCE e2e test build/test passed for commit aa8ac7e9f839b64be520e31b6dc52e418547ea95.

@k8s-bot
Copy link

k8s-bot commented Feb 8, 2016

GCE e2e test build/test passed for commit 88916c546873ed1bacd5ec51b7ebae2036f1ea06.

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e test build/test passed for commit 2cb5a540cc1ed49931472605d3d1811dc056d802.

if rpod, err := rpf.registry.Update(p); err == nil {
// pod is bound to a task, and the update is compatible
// so we'll allow it through
p = rpod.Pod() // use the (possibly) updated pod spec!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is losing the updated pod spec

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e build/test failed for commit 569908898901de3921ddcc43ce648c778e6d92bf.

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e test build/test passed for commit f3702017f1a8513af3ec13c019721d15a9f446c5.

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e test build/test passed for commit 7d9879a3b2c3732473420f55fd0356d8b332e9c4.

log.V(2).Infof("sent %d pod updates", len(pods))
}

func ContainerEnvOverlay(env []api.EnvVar) Option {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename this simply ContainerEnvironment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, debating whether I should write PrependFilter and AppendFilter option funcs that accept Filter params, and just move the environment-related stuff into the caller (to keep this module simpler)

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e test build/test passed for commit 9efe4f08c5880409d0ecfbd82e2a26f2c2749cc7.

@k8s-bot
Copy link

k8s-bot commented Feb 9, 2016

GCE e2e test build/test passed for commit 77403ad969985d11d81cc152a59d4779e42f57e7.

// once it appears in the pod registry. the stock kubelet sets the pod host in order
// to accomplish the same; we do this because the k8sm scheduler works differently.
podutil.Annotator(map[string]string{
meta.BindingHostKey: s.HostnameOverride,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure that the HostnameOverride here is the same as the agent name that was being used from the SlaveInfo during registration. Need to double-check

@k8s-bot
Copy link

k8s-bot commented Feb 10, 2016

GCE e2e test build/test passed for commit 42bd169c65897b8de3d61c4d7f497a38070e49a3.

@k8s-bot
Copy link

k8s-bot commented Feb 10, 2016

GCE e2e test build/test passed for commit 64da4dfa24bb7c68fd7f45769c4af1f5a8d2860b.

spawned by kubelet: static and non-static pod user containers, as well
as pod infrastructure containers.
@jdef jdef force-pushed the jdef_mesos_env_injection branch from 64da4df to fc1c435 Compare February 10, 2016 19:19
@jdef jdef changed the title MESOS/WIP: inject certain MESOS_ envvars into all container env MESOS: inject certain MESOS_ envvars into all container env Feb 10, 2016
@jdef
Copy link
Contributor Author

jdef commented Feb 10, 2016

squashed, will LGTM once passes all tests

@jdef jdef added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 10, 2016
@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Feb 10, 2016
@k8s-github-robot k8s-github-robot merged commit c70c7fd into kubernetes:master Feb 10, 2016
@k8s-bot
Copy link

k8s-bot commented Feb 10, 2016

GCE e2e test build/test passed for commit fc1c435.

@jdef jdef deleted the jdef_mesos_env_injection branch February 10, 2016 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform/mesos lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants