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{}