Duplicate Command Behavior

You may need to run the same command in different locations.

For example, if you create a command to start MATRIXX Engine, you must define this command in each of the namespaces where an engine is deployed. You can use a flag to select the engine to act on in the resource selector.

The result is several commands of the same name. The Admin Service merges these into a single command visible to the user. If one of the command definitions includes a flag or argument not provided by the other commands of the same name, the flag or argument is available to the user in the merged command. When you upgrade an engine in one namespace and the new version is able to support a new flag for a command that was previously available, the flag becomes available to the user in all namespaces.

Note: Make sure commands can encapsulate new features. Avoid creating flags or arguments that may be removed in the future. Default values for arguments can help you retain flexibility.

Keep commands as abstract as possible to avoid requiring the user to have knowledge of Kubernetes or how the application is deployed. For example, commands acting on engines should not require the user to know where engine pods are deployed or how. That way, the implementation can evolve over time without need for commands, or the way users use them, to change.