main.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. Copyright 2014 The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // A binary that can morph into all of the other kubernetes binaries. You can
  14. // also soft-link to it busybox style.
  15. //
  16. // CAUTION: If you update code in this file, you may need to also update code
  17. // in contrib/mesos/cmd/km/km.go
  18. package main
  19. import (
  20. "os"
  21. _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration
  22. _ "k8s.io/kubernetes/pkg/version/prometheus" // for version metric registration
  23. )
  24. func main() {
  25. hk := HyperKube{
  26. Name: "hyperkube",
  27. Long: "This is an all-in-one binary that can run any of the various Kubernetes servers.",
  28. }
  29. hk.AddServer(NewKubectlServer())
  30. hk.AddServer(NewKubeAPIServer())
  31. hk.AddServer(NewKubeControllerManager())
  32. hk.AddServer(NewScheduler())
  33. hk.AddServer(NewKubelet())
  34. hk.AddServer(NewKubeProxy())
  35. //Federation servers
  36. hk.AddServer(NewFederationAPIServer())
  37. hk.AddServer(NewFederationCMServer())
  38. hk.RunToExit(os.Args)
  39. }