Openshift deployment validation - QA

2/26/2019

wanted to know if there's any tool that can validate an openshift deployment. Let's say you have a deploy configuration file with different features (secrets, routes, services, environment variables, etc) and I want to validate after the deployment has finished and the POD/s is/are created in Openshift, that all those things are there as requested on the file. Like a tool for QA.

thanks

-- Manu Q
deployment
kubernetes
openshift

3 Answers

2/26/2019

Readiness probe are there which can execute http requests on the pod to confirm its availability. Also it can execute commands to confirm desired resources are available within the container. Readiness probe

-- ygbgames
Source: StackOverflow

3/5/2019

For one time validation, you can create a Job (OpenShift) with Init Container (OpenShift) that ensures that all deployment process is done, and then run test/shell script with sequence of kubectl/curl/other commands to ensure that every piece of deployment are in place and in desired state.

For continuous validation, you can create a CronJob (OpenShift) that will periodically create a test Job and report the result somewhere.

This answer can help you to create all that stuff.

-- VAS
Source: StackOverflow

2/27/2019

There is a particular flag --dry-run in Kubernetes for resource creation which performs basic syntax verification and template object schema validation without real object implementation, therefore you can do the test for all underlying objects defined in the deployment manifest file.

I think it is also feasible to achieve through OpenShift client:

$ oc create -f deployment-app.yaml --dry-run

or

$ oc apply -f deployment-app.yaml --dry-run

You can find some useful OpenShift client commands in Developer CLI Operations%20documentation%20page) documentation page.

-- mk_sta
Source: StackOverflow