Add kube-ui cluster addon for serving k8s dashboard UI.

Changes include:
- Add kube-ui binary for serving static dashboard UI
- Add kube-ui docker image, replication controller, and service
- Make the kube-ui a cluster-addon (enabled by default)
- Split the compiled pkg/ui/datafile.go into separate dashboard and swagger packages
- Update docs to reflect changes
This commit is contained in:
Tim St. Clair
2015-06-11 17:45:17 -07:00
parent 7689391c68
commit b6b2d6df42
15 changed files with 22305 additions and 21811 deletions

View File

@@ -71,15 +71,15 @@ Like `npm start`, it runs `bower install` to install and/or update the framework
To make the production code available to the Kubernetes api server, run this command from the top level directory:
```
hack/build-ui.sh
hack/build-ui.sh dashboard
```
It runs the `go-bindata` tool to package the generated `app` directory and other user interface content, such as the Swagger documentation, into `pkg/ui/datafile.go`. Note: go-bindata can be installed with `go get github.com/jteeuwen/go-bindata/...`.
It runs the `go-bindata` tool to package the generated `app` directory into `pkg/ui/data/dashboard/datafile.go`. It can also be used to package other user interface content, such as the Swagger documentation. Note: go-bindata can be installed with `go get github.com/jteeuwen/go-bindata/...`.
Then, run one of the go build scripts, such as `hack/build-go.sh`, to build a new `kube-apiserver` binary that includes the updated `pkg/ui/datafile.go`.
Then, run `make kube-ui` in the `cluster/addons/kube-ui/image` directory to build a new `kube-ui` binary that includes the updated `datafile.go`. When the updated UI is ready for release, increment the version tag in `cluster/addons/kube-ui/image/Makefile` and run `make push` in the same directory to build & push the new kube-ui docker image.
### Serving the app in production
The app is served in production by `kube-apiserver` at:
The app is served in production by the `kube-ui` binary at:
```
https://<kubernetes-master>/ui/
@@ -88,7 +88,7 @@ https://<kubernetes-master>/ui/
which redirects to:
```
https://<kubernetes-master>/static/app/
https://<kubernetes-master>/api/v1/proxy/namespaces/default/services/kube-ui/
```
## Configuration