Apply
Usage
The rapd apply
command is used to apply specified configuration files to modify RAPD resources. This command can operate on a single file or multiple files within a directory and can be set to wait until the resources are fully deployed.
rapd apply (-f FILENAME | -f DIRECTORY) [flags]
Flags
These are the flags available for the rapd apply command:
Flag Name | Short Name | Default Value | Required | Description |
---|---|---|---|---|
--file | -f | Yes | Specify the configuration file or directory (recursively). | |
--wait | No | Wait for all resources to be fully deployed. Returns return code 1 if deployment is not completed within the specified time. | ||
--timeout | 120 | No | Set the timeout period for waiting for resources to be deployed (in seconds). |
Examples
Here are some examples of using the rapd apply command:
- Apply a single configuration file:
rapd apply -f config.yaml
- Apply all configuration files in a directory (recursively):
rapd apply -f configs/
- Apply a configuration file and wait for deployment to complete:
rapd apply -f config.yaml --wait
- Apply a configuration file and set a timeout of 60 seconds:
rapd apply -f config.yaml --wait --timeout 60
- Apply all configuration files in a directory and set a timeout of 120 seconds:
rapd apply -f configs/ --wait --timeout 120
Troubleshooting
- If the specified file or directory path does not exist, the following error message will be returned:
Terminal window stat [CONFIG_PATH]: no such file or directoryexit status 1 - If the —wait and —timeout flags are set and the resource deployment times out, the following error message will be returned:
Terminal window Execute scheduler action function timeout. context deadline exceededexit status 1
Output
Upon successful execution, the command will return output similar to the following: The number of lines depends on the number of files applied by the command.
Apply [CONFIG_FILEPATH] request Success
If there is a failure, the output might be:
[RESOURCE_TYPE] [RESOURCE_NAME] Failed [CONFIG_FILEPATH]