Add an override configuration
By default, the Score implementation tool looks for a
score.yaml file and overrides the declared defaults with in that file, if
The following Score implementations support passing an override file as an argument.
overrides.score.yaml file is found, the Score implementation (CLI) applies overrides on the output. This occurs whether a flag is provided or not.
Any property of Score segment can be overridden.
For example, the
score.yaml file contains a configuration, however, the
overrides.score.yaml file contains configuration overrides for new and existing services.
If a configuration option is defined in both the default
score.yaml file and the
overrides.score.yaml file, the default values are replaced with the overrides.
Override a command
To override the defaults declared in your
score.yaml file create a
overrides.score.yaml file and declare your overrides.
- Create a
apiVersion: score.dev/v1b1 metadata: name: run-python-app containers: my-service: image: python3 command: - python - --version
- Create an
overrides.score.yamlfile and declare an override.
containers: my-service: command: - python - --help
- Run the following command to override the default arguments by the
score-compose run -f ./score.yaml \ -o ./compose.yaml \ --overrides ./overrides.score.yaml
The following is an example output of the previous command.
services: run-python-app: entrypoint: - python - --help image: python3
Results You’ve successfully overridden the default configuration file with a command described in your