Skip to content

Commit

Permalink
Merge branch 'main' into feat/request-secret-lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Nov 28, 2024
2 parents 820ce1b + 2512a17 commit 3661e2e
Show file tree
Hide file tree
Showing 18 changed files with 937 additions and 165 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
)
)]
// ---
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#[versioned(
version(name = "v1alpha1"),
version(name = "v1beta1"),
version(name = "v1"),
k8s(
group = "foo.example.org",
singular = "foo",
plural = "foos",
namespaced,
crates(
kube_core = ::kube::core
)
)
)]
// ---
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
changed(since = "v1", from_name = "bah", from_type = "u16")
)]
bar: usize,
baz: bool,
}
16 changes: 16 additions & 0 deletions crates/stackable-versioned-macros/fixtures/inputs/k8s/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct FooSpec {
bar: usize,

Expand All @@ -23,6 +31,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "bar.example.org", plural = "bars"))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct BarSpec {
baz: String,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct FooSpec {
bar: usize,

Expand All @@ -24,6 +32,14 @@ pub(crate) mod versioned {
}

#[versioned(k8s(group = "bar.example.org", plural = "bars"))]
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
schemars::JsonSchema,
kube::CustomResource,
)]
pub struct BarSpec {
baz: String,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#[versioned(
version(name = "v1alpha1"),
version(name = "v1beta1"),
version(name = "v1"),
k8s(
group = "stackable.tech",
kind = "FooBar",
singular = "foo",
plural = "foos",
namespaced,
)
)]
// ---
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
changed(since = "v1", from_name = "bah", from_type = "u16")
)]
bar: usize,
baz: bool,
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
)
)]
// ---
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
#[derive(
Clone, Debug, serde::Deserialize, serde::Serialize, schemars::JsonSchema, kube::CustomResource,
)]
pub struct FooSpec {
#[versioned(
added(since = "v1beta1"),
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3661e2e

Please sign in to comment.