Validate OpenShift objects defined in yaml before actually applying or executing it -
i have openshift template in template.yaml file includes following objects - deployment-config, pod, service , route. using following command execute yaml:
oc process -f template.yml | oc apply -f -
i want perform following validations before apply/execute yaml:
- yaml syntax validation - if there issues yaml syntax.
- openshift schema validation - check if object definition abides openshift object schema.
it seems command 'oc process' doing following checking:
- basic yaml syntax validation
- template object schema validation
how perform schema validation of other objects (e.g. deployment-config, service, pod, etc.) defined in template.yaml?
i'm having same issue cryptic errors coming oc process
command.
however if go openshift console , use "add project" link @ top of console, choose "import yaml / json" option , import yaml/json way slightly more useful errors.
Comments
Post a Comment