-
Notifications
You must be signed in to change notification settings - Fork 768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validate/test artifacts generated by Kompose #133
Comments
wouldn't |
@Runseb i guess it(kubectl create --validate) will validate the artifacts to be according to kubernetes' spec, but does not ensure that app will run and respond? |
Yes, the issue name: This is why, I think, that we should provide the developer with tools to test their applications end to end, which, in turn, could be run on a CI platform. |
but how can you ensure that app runs properly. k8s clusters may have many different setup (typical difference is DNS not installed). One app could run in one cluster but fail in another. people may also use kompose, but start from a failing docker-compose. There is a lot happening in that space with helm and charts. Charts (apps package), are being linted and are going through CI. I think it would make sense to expand the chart conversion to be inline with the helm packaging. |
On Wed, Aug 31, 2016 at 3:12 PM, runseb [email protected] wrote:
|
I did look at your code in atomic app, I see what you are doing now. As far as I know you are not really doing functional testing of the app itself in the sense of the app itself functioning, you are checking a few assertions around what pods, services and rc need to be running. I suppose this could be implemented in kompose via a Ideally, for the user a single |
On Wed, Aug 31, 2016 at 5:58 PM, runseb [email protected] wrote:
Yeah! Those were basic assertions that I had implemented. I was also
I do not fancy doing much magic, as in to detect rcs, pods, svcs for
mhm, however I am not able to get the context of it w.r.t. to tests. |
so from a UX perspective, what will a user have to do and how will they use |
On Fri, Sep 2, 2016 at 3:12 PM, runseb [email protected] wrote:
To run test cases for Kompose $kompose test To run tests on any compose appication $kompose test /path/to/application |
and where are the tests themselves ? |
On Fri, Sep 2, 2016 at 3:32 PM, runseb [email protected] wrote:
I want the test cases for downstream applications to be in their code However, on a second thought, do we need a |
tests for users of kompose? We need a lot more test, test for our-selfs, to make sure that we are not breaking features that are already working - unit tests, functional tests ..... Than I think we should focus on improving conversion rather that adding completely new features to kompose. We still don't support a lot of directives from docker-compose.yml (this should be our todo list with build on the first place ) |
I am pretty sure I understand what @kadel says. We definitely need more tests for but what @rtnpro is proposing are tests for the actual containerized application. So I fail to understand how we would package those (application specific) tests in a kompose release and even how we would implement it in Go in the kompose source. Since @rtnpro is now talking about independent shell scripts... |
I think that what he meant by this is that it would be nice to have whole workflow as part of our test suite. Or at least this is what he did for Atomic App. |
unless we are taking end-2-end tests for CI |
On Fri, Sep 2, 2016 at 5:31 PM, Tomas Kral [email protected] wrote:
Yeah :) |
We can do validation on what kompose generates to check if it matches the k8s version using jsonschema or the tool called kubeval |
@surajnarwade just found this issue as well. Kubeval is just about setup to be a Go library in instrumenta/kubeval#15. Happy to help integrate that if of interest. |
@garethr 👍 |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I think that we need to work on a set of scripts which could be extended by the users of kompose to validate their converted applications against real providers (kubernetes, openshift). This will help the developers to deploy their converted applications with confidence.
Proposed features
I have done some related work for Atomic App here: projectatomic/atomicapp#655, which allows writing test cases for individual apps very easy, in a few lines: https://github.com/rtnpro/atomicapp/blob/2e6e72c221856abbca34f7779af70de5f490de25/tests/system/test_openshift_provider.py
Thanks to a comprehensive base test suite to allow for high level assertions: https://github.com/rtnpro/atomicapp/blob/2e6e72c221856abbca34f7779af70de5f490de25/tests/system/base.py#L425
I hope to be able to translate my experience in implementing something similar for kompose to help the developers using kompose to ship their converted apps with confidence.
The text was updated successfully, but these errors were encountered: