Skip to content

Commit 01e3e98

Browse files
authored
Unrequire affinity types (#855)
* Unrequire affinity types This should fix Tilt sometimes refusing to update the CRDs * changelog
1 parent 494ed37 commit 01e3e98

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/stackable-operator/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ All notable changes to this project will be documented in this file.
1515
### Fixed
1616

1717
- Fix the CRD description of `ClientAuthenticationDetails` to not contain internal Rust doc, but a public CRD description ([#846]).
18+
- `StackableAffinity` fields are no longer erroneously marked as required ([#855]).
1819

1920
[#846]: https://github.com/stackabletech/operator-rs/pull/846
2021
[#851]: https://github.com/stackabletech/operator-rs/pull/851
22+
[#855]: https://github.com/stackabletech/operator-rs/pull/855
2123

2224
## [0.74.0] - 2024-08-22
2325

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)