first of all, thanks for this great work I love this crate.
CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: echoes.example.com
spec:
group: example.com
names:
kind: Echo
plural: echoes
singular: echo
shortNames:
- echo
scope: Namespaced
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- metadata
- spec
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
type: object
required:
- replicas
properties:
replicas:
type: integer
format: int32
status:
type: object
properties:
availableReplicas:
type: integer
description: "The number of available replicas."
Expected
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium -f charts/echoer/crds/crd-echo.yaml
// kopium version: 0.21.1
#[allow(unused_imports)]
mod prelude {
pub use kube::CustomResource;
pub use serde::{Serialize, Deserialize};
pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)]
#[kube(group = "example.com", version = "v1", kind = "Echo", plural = "echoes")]
#[kube(namespaced)]
#[kube(schema = "disabled")]
#[kube(status = "EchoStatus")]
pub struct EchoSpec {
pub replicas: i32,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct EchoStatus {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "availableReplicas")]
pub available_replicas: Option<i64>,
}
Result
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium -f charts/echoer/crds/crd-echo.yaml
// kopium version: 0.21.1
#[allow(unused_imports)]
mod prelude {
pub use kube::CustomResource;
pub use serde::{Serialize, Deserialize};
pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug)]
#[kube(group = "example.com", version = "v1", kind = "Echo", plural = "echoes")]
#[kube(namespaced)]
#[kube(schema = "disabled")]
#[kube(status = "EchoStatus")]
pub struct EchoSpec {
pub replicas: i32,
}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct EchoStatus {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "availableReplicas")]
pub available_replicas: Option<i64>,
}
Summary
Attribute #[kube(status = "EchoStatus")] is missed. I don't know if I'm missing something but that would be the CRD that I would expect.
Hello,
first of all, thanks for this great work I love this crate.
CRD
Expected
Result
Summary
Attribute
#[kube(status = "EchoStatus")]
is missed. I don't know if I'm missing something but that would be the CRD that I would expect.Thanks,