opencompose
opencompose copied to clipboard
Support for `opencompose explain`
Support for opencompose explain
I think in terms of user experience with respect to kubernetes and openshift, their cli has command explain which tells you what specific field in the config is. All you need to do is give the complete reference path.
If we add something similar to that in OpenCompose cli it would be really great user experience.
Example of kubectl explain
$ kubectl explain deployment.spec.strategy
RESOURCE: strategy <Object>
DESCRIPTION:
The deployment strategy to use to replace existing pods with new ones.
DeploymentStrategy describes how to replace existing pods with new ones.
FIELDS:
rollingUpdate <Object>
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
type <string>
Type of deployment. Can be "Recreate" or "RollingUpdate". Default is
RollingUpdate.
Similarly we can have following:
$ opencompose explain services.containers.mounts.mountPath
RESOURCE: mountPath <String>
DESCRIPTION:
Absolute path within the container at which the volume should be
mounted. Must not contain ':'. This is a required field. More Info:
https://github.com/redhat-developer/opencompose/blob/master/docs/file-reference.md#mountpath
this will be nice to have, but I wouldn't start with that before we have stable file format