diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 40041e426..08d40bcab 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- BREAKING: Add `objectOverrides` field to `ListenerSpec` ([#1136]). + ### Changed - Revert and pin k8s-openapi to 0.26.0 ([#1135]). +- BREAKING: `ListenerSpec` no longer derives `Eq` ([#1136]). [#1135]: https://github.com/stackabletech/operator-rs/pull/1135 +[#1136]: https://github.com/stackabletech/operator-rs/pull/1136 ## [0.101.2] - 2026-01-07 diff --git a/crates/stackable-operator/crds/Listener.yaml b/crates/stackable-operator/crds/Listener.yaml index bc7a7dfe6..61be90b6f 100644 --- a/crates/stackable-operator/crds/Listener.yaml +++ b/crates/stackable-operator/crds/Listener.yaml @@ -41,6 +41,20 @@ spec: default: {} description: Extra labels that the Pods must match in order to be exposed. They must _also_ still have a Volume referring to the Listener. type: object + objectOverrides: + default: [] + description: |- + A list of generic Kubernetes objects, which are merged into the objects that the operator + creates. + + List entries are arbitrary YAML objects, which need to be valid Kubernetes objects. + + Read the [Object overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides) + for more information. + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array ports: description: Ports that should be exposed. items: diff --git a/crates/stackable-operator/src/crd/listener/listeners/mod.rs b/crates/stackable-operator/src/crd/listener/listeners/mod.rs index af4c5ccf7..2c4f45eaf 100644 --- a/crates/stackable-operator/src/crd/listener/listeners/mod.rs +++ b/crates/stackable-operator/src/crd/listener/listeners/mod.rs @@ -34,7 +34,7 @@ use stackable_versioned::versioned; #[cfg(doc)] use crate::builder::pod::volume::ListenerOperatorVolumeSourceBuilder; -use crate::crd::listener::core::v1alpha1 as core_v1alpha1; +use crate::{crd::listener::core::v1alpha1 as core_v1alpha1, deep_merger::ObjectOverrides}; mod v1alpha1_impl; @@ -55,7 +55,7 @@ pub mod versioned { namespaced ))] #[derive( - CustomResource, Serialize, Deserialize, Default, Clone, Debug, JsonSchema, PartialEq, Eq, + CustomResource, Serialize, Deserialize, Default, Clone, Debug, JsonSchema, PartialEq, )] #[serde(rename_all = "camelCase")] pub struct ListenerSpec { @@ -72,6 +72,10 @@ pub mod versioned { /// Whether incoming traffic should also be directed to Pods that are not `Ready`. #[serde(default = "ListenerSpec::default_publish_not_ready_addresses")] pub publish_not_ready_addresses: Option, + + // Docs are provided by the ObjectOverrides struct + #[serde(default)] + pub object_overrides: ObjectOverrides, } /// Informs users about Listeners that are bound by a given Pod.