fluvio-community / fluvio-community/k8-api

procedure or derive macro to define Kubernetes API

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Instead of manual trait implementation like below:
```//
// Secret Object
const SECRET_API: Crd = Crd {
group: "core",
version: "v1",
names: CrdNames {
kind: "Secret",
plural: "secrets",
singular: "secret",
},
};

impl Spec for SecretSpec {

type Status = SecretStatus;
type Header = SecretHeader;

fn metadata() -> &'static Crd {
&SECRET_API
}
}
```

We can write procedure macro:
```
#[k8spec(group=core,status=SecretStatus)]
struct SecretSpec {
}

struct SecretStatus{}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.