Skip to content

Commit

Permalink
Rename stackable_node_selector_schema -> optional_stackable_node_sele…
Browse files Browse the repository at this point in the history
…ctor_schema
  • Loading branch information
sbernauer committed Mar 22, 2024
1 parent 68f85f3 commit 2ae3ac9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/stackable-operator/src/commons/affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub struct StackableAffinity {
pub pod_affinity: Option<PodAffinity>,
pub pod_anti_affinity: Option<PodAntiAffinity>,
pub node_affinity: Option<NodeAffinity>,
#[schemars(schema_with = "stackable_node_selector_schema")]
#[fragment_attrs(schemars(schema_with = "stackable_node_selector_schema"))]
#[schemars(schema_with = "optional_stackable_node_selector_schema")]
#[fragment_attrs(schemars(schema_with = "optional_stackable_node_selector_schema"))]
pub node_selector: Option<StackableNodeSelector>,
}

Expand All @@ -61,7 +61,7 @@ pub struct StackableNodeSelector {
impl Atomic for StackableNodeSelector {}

/// We need a custom JsonSchema for [`StackableNodeSelector`], please have a look at the documentation there.
pub fn stackable_node_selector_schema(gen: &mut schemars::gen::SchemaGenerator) -> Schema {
pub fn optional_stackable_node_selector_schema(gen: &mut schemars::gen::SchemaGenerator) -> Schema {
Option::<BTreeMap<String, String>>::json_schema(gen)
}

Expand Down

0 comments on commit 2ae3ac9

Please sign in to comment.