mayadata-io / CITF

Common Integration Test Framework
Apache License 2.0
4 stars 16 forks source link

Add support for Read operation for custom resources #38

Closed princerachit closed 5 years ago

princerachit commented 6 years ago

Currently CITF does not support Read operation for custom resources. This support needs to be added.

The client should be able to pass customresourcedefinition name and customresource and should get yaml/json of the resource.

Please refer to this file to see existing supported code.

Please comment if you want to be assigned for this issue.

Help links: Contributors guide hacktoberfest2018 channel on slack. Ping us here if you want to discuss anything around hacktoberfest

krishnakarthik9 commented 6 years ago

@princerachit I would like to work on it. To be clear the input parameters will be crdName, customresource, namespace and output should be to in yaml format.

princerachit commented 6 years ago

@krishnakarthik1309 you can work on this issue. There are some cases that you should be aware of like:

  1. A custom resources may not be namespaced.
  2. The methods for custom resource you develop should have similar signature as that of other resources already in the project.
krishnakarthik9 commented 6 years ago

@princerachit I have a doubt. Should the logic be based on executing kubectl command or through client-go. If it is through client-go I think we need Custom resource struct to unmarshal/deserialize.

sonasingh46 commented 6 years ago

@krishnakarthik1309 We define the structs in a separate package. And yes you will get to know the structs for the CR that is already there in other projects. You will need to utilise that.

krishnakarthik9 commented 6 years ago

@sonasingh46 thanks.. can you give me link for a file where the struct is defined?

sonasingh46 commented 6 years ago

@krishnakarthik1309 You will require to use openebs client as package in vendor here which will do the job. cc @Akash4927 Can give more details on how to do that.

qiell commented 6 years ago

HI @krishnakarthik1309 Instead of a struct, I think we can use the clientset of the CRDs that are already present in openebs/maya and openebs/node-disk-manager repo.

sonasingh46 commented 5 years ago

This has been addressed. See following: https://github.com/openebs/CITF/issues/45 https://github.com/openebs/CITF/issues/56 https://github.com/openebs/CITF/issues/48 https://github.com/openebs/CITF/issues/47 https://github.com/openebs/CITF/issues/46