mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Update README to address issues
Update README to address issues in https://github.com/GoogleCloudPlatform/kubernetes/issues/7122 Providing a bit more clarity to how to test and develop the kubernetes Web UI.
This commit is contained in:
parent
b9904f63d4
commit
f9d5629c5c
@ -30,7 +30,7 @@ Bower components should be refernced in one of the `vendor.json` files below:
|
|||||||
|
|
||||||
### Serving the app during development
|
### Serving the app during development
|
||||||
|
|
||||||
The app can be served through `kubectl`, but for some types of review a local web server is convenient. One can be installed as follows:
|
For development you can serve the files locally by installing a webserver as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo npm install -g http-server
|
sudo npm install -g http-server
|
||||||
@ -43,6 +43,9 @@ cd app
|
|||||||
http-server -a localhost -p 8000
|
http-server -a localhost -p 8000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Serving the app in production
|
||||||
|
https://<kubernetes-master>/static/app/
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
#### Configuration settings
|
#### Configuration settings
|
||||||
A json file can be used by `gulp` to automatically create angular constants. This is useful for setting per environment variables such as api endpoints.
|
A json file can be used by `gulp` to automatically create angular constants. This is useful for setting per environment variables such as api endpoints.
|
||||||
@ -57,7 +60,6 @@ www/master
|
|||||||
├── shared/config/development.json
|
├── shared/config/development.json
|
||||||
└── components
|
└── components
|
||||||
├── dashboard/config/development.json
|
├── dashboard/config/development.json
|
||||||
├── graph/config/development.json
|
|
||||||
└── my_component/config/development.json
|
└── my_component/config/development.json
|
||||||
```
|
```
|
||||||
produces ```www/master/shared/config/generated-config.js```:
|
produces ```www/master/shared/config/generated-config.js```:
|
||||||
@ -66,14 +68,16 @@ angular.module('kubernetesApp.config', [])
|
|||||||
.constant('ENV', {
|
.constant('ENV', {
|
||||||
'/': <www/master/shared/config/development.json>,
|
'/': <www/master/shared/config/development.json>,
|
||||||
'dashboard': <www/master/components/dashboard/config/development.json>,
|
'dashboard': <www/master/components/dashboard/config/development.json>,
|
||||||
'graph': <www/master/components/graph/config/development.json>,
|
|
||||||
'my_component': <www/master/components/my_component/config/development.json>
|
'my_component': <www/master/components/my_component/config/development.json>
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Kubernetes server configuration
|
#### Kubernetes server configuration
|
||||||
|
|
||||||
**RECOMMENDED**: By default the Kubernetes api server does not support CORS,
|
You'll need to run ```hack/build-ui.sh``` to create a new ```pkg/ui/datafile.go``` file.
|
||||||
|
This is the file that is built-in to the kube-apiserver.
|
||||||
|
|
||||||
|
**RECOMMENDED**: When working in development mode the Kubernetes api server does not support CORS,
|
||||||
so the `kube-apiserver.service` must be started with
|
so the `kube-apiserver.service` must be started with
|
||||||
`--cors_allowed_origins=.*` or `--cors_allowed_origins=http://<your
|
`--cors_allowed_origins=.*` or `--cors_allowed_origins=http://<your
|
||||||
host here>`
|
host here>`
|
||||||
@ -87,7 +91,7 @@ angular.module('kubernetesApp.config', [])
|
|||||||
See [master/components/README.md](master/components/README.md).
|
See [master/components/README.md](master/components/README.md).
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
Currently kuberntes-ui includes both unit-testing (run via [Karma](http://karma-runner.github.io/0.12/index.html)) and
|
Currently kuberntes/www includes both unit-testing (run via [Karma](http://karma-runner.github.io/0.12/index.html)) and
|
||||||
end-to-end testing (run via
|
end-to-end testing (run via
|
||||||
[Protractor](http://angular.github.io/protractor/#/)).
|
[Protractor](http://angular.github.io/protractor/#/)).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user