-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
add mesos provider inspired by mesos-dns & marathon provider #353
Conversation
Hi @skydjol, thanks a lot ! |
You can now rebase to master to get travis working again ;) The issue was in https://github.com/mitchellh/gox. |
Hi, |
if sj, err = provider.loadWrap(ip, port); err == nil && sj.Leader != "" { | ||
return sj, nil | ||
} | ||
log.Debugf("Warning: Zookeeper is wrong about leader") |
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.
Maybe log.Warn
here?
Hey @skydjol, what a great PR :)
@vdemeester, any comments? |
@skydjol WDYT? |
Hi Emile, We'll try to focus on mesos-dns import as depencency , documentation then tests ... First, we'll retry to have a fully work env for Go ... If we fail, we'll ask you :) |
Hi Emile, I've added some Unit and Integration tests (based on the work done for Marathon). I, also, renamed the "loadWrap" method to explain a little bit more. To integrate the "mesos-dns" dependency, we have some errors because some of visibility of some functions in mesos-dns. Moreover we integrate the healthy feature (and maybe other). One more thing to do is documentation (and test in "real situation" after the master branch merge). |
Hi @PierreLeresteux, thanks for your work :) |
Hi Emile ... We'll try to do this today. It sounds very interresting... |
1c36552
to
2ac68bf
Compare
Thanks a lot @PierreLeresteux :) |
- package: github.com/jarcoal/httpmock | ||
- package: github.com/mesosphere/mesos-dns | ||
vcs: git | ||
repo: https://github.com/saagie/mesos-dns.git |
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.
Could you change it to github.com/containous/mesos-dns ?
Hi @skydjol & @PierreLeresteux, I made few comments :) |
f10e540
to
53b8c12
Compare
Hi @emilevauge . Last friday, I've commited some modifications regarding your comments. My travis said it's ok, but on this PR, strange behavior, travis seems to be unhappy ... (mark "In progress", but when I jump to see more details, the status is marked as broken ... ) Let me know if you or someone else in the team have some remarks on this PR. |
Regarding your comments @errm , I make some changes (My bad for "marathon") |
Awesome LGTM |
Thanks @errm for the review :) Thanks @PierreLeresteux for the fixes. |
@@ -272,9 +273,16 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration { | |||
//default Kubernetes | |||
var defaultKubernetes provider.Kubernetes | |||
defaultKubernetes.Watch = true | |||
defaultKubernetes.Endpoint = "http://127.0.0.1:8080" | |||
defaultKubernetes.Endpoint = "127.0.0.1:8080" |
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.
Hum, this change doesn't seem realetd…
Few nits and I feel there is room for improvement (in few places) This is really cool 👍 |
Ping ? |
Hi, we've pushed some modifications regarding the comment from @vdemeester ... Is it ok for you now ? |
On last thing, could you squash your commits ? 19 commits is a bit too much and we want to avoid |
Hi, sure ... here is a one commit for this feature ... |
Thanks a lot @PierreLeresteux @skydjol for you great contribution 👏
|
`golang/glog` is used by: - `github.com/mesos/mesos-go` (no version) - `k8s.io/client-go` (`44145f04b68cf362d9c4df2182967c2275eaefed`) In traefik#353 (add Mesos provider, 20 Jul 2016), the `golang/glog` hash is `fca8c8854093a154ff1eb580aae10276ad6b1b5f`. The problem appear in traefik#836 (use k8s client, 1 Dec 2016). Refs: - Traefik: - traefik#836 - traefik@131f581 - Glog - https://github.com/golang/glog/commits/master - golang/glog#13 - golang/glog@44145f0 - golang/glog@fca8c88 - k8s - https://github.com/kubernetes/client-go/blob/e121606b0d09b2e1c467183ee46217fa85a6b672/Godeps/Godeps.json - https://github.com/kubernetes/client-go/blob/master/Godeps/Godeps.json
`golang/glog` is used by: - `github.com/mesos/mesos-go` (no version) - `k8s.io/client-go` (`44145f04b68cf362d9c4df2182967c2275eaefed`) In #353 (add Mesos provider, 20 Jul 2016), the `golang/glog` hash is `fca8c8854093a154ff1eb580aae10276ad6b1b5f`. The problem appear in #836 (use k8s client, 1 Dec 2016). Refs: - Traefik: - #836 - 131f581 - Glog - https://github.com/golang/glog/commits/master - golang/glog#13 - golang/glog@44145f0 - golang/glog@fca8c88 - k8s - https://github.com/kubernetes/client-go/blob/e121606b0d09b2e1c467183ee46217fa85a6b672/Godeps/Godeps.json - https://github.com/kubernetes/client-go/blob/master/Godeps/Godeps.json
Backend Implementation Proposal
We use Marathon, Chronos and homemade Framework on Mesos, and we want to have a universal backend to manage both.
The Marathon backend works well, and we, first, want to implement a Chronos Backend. But Chronos don't manage callback as Marathon. And what about our handmade Mesos Framework ?
So we decide to lookup in the Mesos DNS code (https://github.com/mesosphere/mesos-dns) to see how callbacks are managed in Mesos.
Mesos DNS uses a pull mecanism (https://github.com/mesosphere/mesos-dns/blob/master/records%2Fgenerator.go#L190) to check every changes.
We think that having a unified backend for Mesos is a very good point (because we don't know all Mesos frameworks we'll using in the future) using same behavior as Mesos DNS.
It's our first time we use Go (and we don't have yet a correct IDE integration for now ... ), so we hope this pull request is good and we don't commit huge mistakes ...
We add this project in our travis instance (https://travis-ci.org/saagie/traefik) and the build passes (of course we generate a binary and test it on our machines).
The only things we don't do is ... tests. Shame on us ... But we follow the Commit Strip principle : http://www.commitstrip.com/shop/fr/affiches/11-affiche-tester-c-est-douter.html .
But it's not easy when your dev env is not fully OK.
Don't hesitate if you have any remarks or questions.
BTW : Your TiA at DevoxxFR was very good and it's after this we decide to test traefik