mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
feat(crd-gen): automate the CRDs generation with validations for APIs (#75)
- To generate the CRD spec `make manifest` generate then under deploy/yamls directory - added a update-crd script to automate the steps to generate CRDs and its validation of each types Signed-off-by: prateekpandey14 <prateek.pandey@mayadata.io>
This commit is contained in:
parent
8a9ac43ab5
commit
6033789c17
26 changed files with 509 additions and 82 deletions
|
|
@ -140,7 +140,7 @@ func defaultGet(
|
|||
name, namespace string,
|
||||
opts metav1.GetOptions,
|
||||
) (*apis.ZFSSnapshot, error) {
|
||||
return cli.OpenebsV1alpha1().
|
||||
return cli.ZfsV1alpha1().
|
||||
ZFSSnapshots(namespace).
|
||||
Get(name, opts)
|
||||
}
|
||||
|
|
@ -152,7 +152,7 @@ func defaultList(
|
|||
namespace string,
|
||||
opts metav1.ListOptions,
|
||||
) (*apis.ZFSSnapshotList, error) {
|
||||
return cli.OpenebsV1alpha1().
|
||||
return cli.ZfsV1alpha1().
|
||||
ZFSSnapshots(namespace).
|
||||
List(opts)
|
||||
}
|
||||
|
|
@ -166,7 +166,7 @@ func defaultDel(
|
|||
) error {
|
||||
deletePropagation := metav1.DeletePropagationForeground
|
||||
opts.PropagationPolicy = &deletePropagation
|
||||
err := cli.OpenebsV1alpha1().
|
||||
err := cli.ZfsV1alpha1().
|
||||
ZFSSnapshots(namespace).
|
||||
Delete(name, opts)
|
||||
return err
|
||||
|
|
@ -179,7 +179,7 @@ func defaultCreate(
|
|||
vol *apis.ZFSSnapshot,
|
||||
namespace string,
|
||||
) (*apis.ZFSSnapshot, error) {
|
||||
return cli.OpenebsV1alpha1().
|
||||
return cli.ZfsV1alpha1().
|
||||
ZFSSnapshots(namespace).
|
||||
Create(vol)
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ func defaultUpdate(
|
|||
vol *apis.ZFSSnapshot,
|
||||
namespace string,
|
||||
) (*apis.ZFSSnapshot, error) {
|
||||
return cli.OpenebsV1alpha1().
|
||||
return cli.ZfsV1alpha1().
|
||||
ZFSSnapshots(namespace).
|
||||
Update(vol)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue