Skip to content

Commit bd6ebb1

Browse files
committed
Unrequire affinity types
This should fix Tilt sometimes refusing to update the CRDs
1 parent 494ed37 commit bd6ebb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/stackable-operator/src/commons/affinity.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ pub const TOPOLOGY_KEY_HOSTNAME: &str = "kubernetes.io/hostname";
3838
)]
3939
pub struct StackableAffinity {
4040
/// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)
41-
#[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))]
41+
#[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))]
4242
pub pod_affinity: Option<PodAffinity>,
4343

4444
/// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)
45-
#[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))]
45+
#[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))]
4646
pub pod_anti_affinity: Option<PodAntiAffinity>,
4747

4848
/// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)
49-
#[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))]
49+
#[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))]
5050
pub node_affinity: Option<NodeAffinity>,
5151

5252
// This schema isn't big, so it can stay

0 commit comments

Comments
 (0)