Skip to content

Commit

Permalink
Improve documentation about environment variables being used (#138)
Browse files Browse the repository at this point in the history
* add environment variables doc

* add link to env docs in README

* update as per review comments

* update docs

* update Readme

* update as per review comments
  • Loading branch information
pravarag authored Sep 24, 2022
1 parent 9d35a1d commit e4ef9b7
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bin/
bin/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ If you want to use your custom plugins as out-of-tree plugins in the simulator,

## Getting started

Read more about environment variables being used in simulator server
[here.](./simulator/docs/env-variables.md)
### Run simulator with Docker

We have [docker-compose.yml](docker-compose.yml) to run the simulator easily.
Expand Down
49 changes: 49 additions & 0 deletions simulator/docs/env-variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Different Environment Variables used

This page describes about the different environment variables that are
used to configure kube-scheduler-simulator.

Please refer [docker-compose.yml](./../../docker-compose.yml) as an example
use.

`PORT`: (required) This is the port number on which kube-scheduler-simulator
server is started.

`KUBE_SCHEDULER_SIMULATOR_ETCD_URL`: (required) This is the URL for
etcd. The simulator runs kube-apiserver internally, and the
kube-apiserver uses this etcd.

`CORS_ALLOWED_ORIGIN_LIST`: This URL represents the URL once web UI is
started. The simulator and internal kube-apiserver set the allowed
origin for `CORS_ALLOWED_ORIGIN_LIST`.

`KUBECONFIG`: This is for the beta feature "Existing cluster
Importing". This variable is used to find Kubeconfig required to
access your cluster for importing resources to scheduler simulator.

`KUBE_API_HOST`: This is the host of kube-apiserver which the
simulator starts internally. Its default value is `127.0.0.1`.

`KUBE_API_PORT`: This is the port of kube-apiserver. Its default
value is `3131`.

`KUBE_SCHEDULER_CONFIG_PATH`: The path to a KubeSchedulerConfiguration
file. If passed, the simulator will start the scheduler with that
configuration. Or, if you use web UI, you can change the
configuration from the web UI as well.

`ExternalImportEnabled`: This variable indicates whether the simulator
will import resources from an existing cluster or not. Note, this is
still a beta feature.

## For Web UI

`KUBE_API_SERVER_URL`: This is the kube-apiserver URL. Its default
value is `http://localhost:3131`.

`BASE_URL`: This is the URL for the kube-scheduler-simulator
server. Its default value is `http://localhost:1212`.

`ALPHA_TABLE_VIEWS`: This variable enables the alpha feature `table
view`. Its value is either 0(default) or 1 (0 meaning disalbed, 1
meaning enabled). We can see the resource status in the table.

0 comments on commit e4ef9b7

Please sign in to comment.