diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 241631014..f69cabee6 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -15,9 +15,11 @@ All notable changes to this project will be documented in this file. ### Fixed - Fix the CRD description of `ClientAuthenticationDetails` to not contain internal Rust doc, but a public CRD description ([#846]). +- `StackableAffinity` fields are no longer erroneously marked as required ([#855]). [#846]: https://github.com/stackabletech/operator-rs/pull/846 [#851]: https://github.com/stackabletech/operator-rs/pull/851 +[#855]: https://github.com/stackabletech/operator-rs/pull/855 ## [0.74.0] - 2024-08-22 diff --git a/crates/stackable-operator/src/commons/affinity.rs b/crates/stackable-operator/src/commons/affinity.rs index 21df0cbbc..c2f56b53a 100644 --- a/crates/stackable-operator/src/commons/affinity.rs +++ b/crates/stackable-operator/src/commons/affinity.rs @@ -38,15 +38,15 @@ pub const TOPOLOGY_KEY_HOSTNAME: &str = "kubernetes.io/hostname"; )] pub struct StackableAffinity { /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) - #[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))] + #[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))] pub pod_affinity: Option, /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) - #[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))] + #[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))] pub pod_anti_affinity: Option, /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node) - #[fragment_attrs(schemars(schema_with = "raw_optional_object_schema"))] + #[fragment_attrs(serde(default), schemars(schema_with = "raw_optional_object_schema"))] pub node_affinity: Option, // This schema isn't big, so it can stay