In this directory we store all the configuration for cluster and OCSCI config files.
During the execution we are loading different config files passed by --ocsci-conf parameter which we merge together. The last one passed config file overwrite previous file.
Each config file can contain different sections (DEFAULTS, ENV_DATA, RUN, etc).
For more information please read the rest of the documentation.
We moved most of the OCSCI framework related config under ocsci folder.
You can pass those config files by --ocsci-conf
parameter.
If you would like to overwrite cluster default data you can create file similar to this example. Example shown overwrites below ENV data:
platform
- currently we support only AWS, but in future we will cover more.worker_replicas
- number of replicas of worker nodes.master_replicas
- number of replicas of master nodes.
TODO: We have to document all possible parameters!
All of the below sections, will be available from the ocsci config dataclass.
Framework RUN related config parameters. If the parameter is for the complete run it belongs here.
Deployment related parameters. Only deployment related params not used anywhere else.
Reporting related config. (Do not store secret data in the repository!).
Environment specific data. This section is meant to be overwritten by own cluster config file, but can be overwritten also here (But cluster config has higher priority).
from ocs_ci.framework import config
from ocs_ci.ocs import defaults
# From you code you can access those data like
# Taking data from ENV_DATA will always use right cluster_namespace passed via
# `--ocsci-conf` config file or default one defined in `default_config.yaml`.
function_which_taking_namespace(namespace=config.ENV_DATA['cluster_namespace'])
# Defaults data you can access like in this example:
print(f"Printing some default data like API version: {defaults.API_VERSION}")
Lower number == higher priority
- CLI args - sometime we can pass some variables by CLI parameters, in this case those arguments should overwrite everything and have the highest priority.
- ocsci config file - ocsci related config passed by
--ocsci-conf
parameter. - default configuration - default values and the lowest priority. You can see default config here.