Skip to content

feat(stackable-versioned): Add K8s specific features #857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Sep 11, 2024

Conversation

Techassi
Copy link
Member

@Techassi Techassi commented Sep 5, 2024

Part of stackabletech/issues#507

#[versioned(
    version(name = "v1alpha1"),
    version(name = "v1beta1"),
    version(name = "v1"),
    # 👇 new code
    k8s(group = "stackable.tech")
)]
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)]
pub struct FooSpec {
    #[versioned(
        added(since = "v1beta1"),
        changed(since = "v1", from_name = "bah", from_type = "u16")
    )]
    bar: usize,
    baz: bool,
}

You can also generate merged CRDs:

let crd = Foo::merged_crd("v1")?;
let yaml = serde_yaml::to_string(&merged_crd)?;

@Techassi Techassi self-assigned this Sep 5, 2024
@Techassi Techassi marked this pull request as ready for review September 10, 2024 15:21
NickLarsenNZ

This comment was marked as outdated.

@NickLarsenNZ NickLarsenNZ self-requested a review September 11, 2024 09:36
NickLarsenNZ

This comment was marked as outdated.

NickLarsenNZ
NickLarsenNZ previously approved these changes Sep 11, 2024
NickLarsenNZ

This comment was marked as outdated.

Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Techassi Techassi added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit b262bde Sep 11, 2024
10 checks passed
@Techassi Techassi deleted the feat/crd-versioning-merged-crds branch September 11, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants