diff --git a/.gitignore b/.gitignore index 6dd29b7f..e660fd93 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -bin/ \ No newline at end of file +bin/ diff --git a/README.md b/README.md index 7d7fefc9..e02317ca 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/simulator/docs/env-variables.md b/simulator/docs/env-variables.md new file mode 100644 index 00000000..193fc86e --- /dev/null +++ b/simulator/docs/env-variables.md @@ -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.