diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 05b18d722..705a00873 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,12 +4,18 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- BREAKING: Add new `ListenerClass.stickyNodePorts` field ([#1105]). + +[#1105]: https://github.com/stackabletech/operator-rs/pull/1105 + ## [0.99.0] - 2025-10-06 ### Added - Add CLI argument and env var to disable the end-of-support checker: `EOS_DISABLED` (`--eos-disabled`) ([#1101]). -- Add end-of-support checker ([#1096]). +- Add end-of-support checker ([#1096], [#1103]). - The EoS checker can be constructed using `EndOfSupportChecker::new()`. - Add new `MaintenanceOptions` and `EndOfSupportOptions` structs. - Add new CLI arguments and env vars: diff --git a/crates/stackable-operator/crds/ListenerClass.yaml b/crates/stackable-operator/crds/ListenerClass.yaml index 11710b1dc..f569913ea 100644 --- a/crates/stackable-operator/crds/ListenerClass.yaml +++ b/crates/stackable-operator/crds/ListenerClass.yaml @@ -80,6 +80,21 @@ spec: - LoadBalancer - ClusterIP type: string + stickyNodePorts: + default: false + description: |- + Wether a Pod exposed using a NodePort should be pinned to a specific Kubernetes node. + + By pinning the Pod to a specific (stable) Kubernetes node, stable addresses can be + provided using NodePorts. The stickiness is achieved by listener-operator by setting the + `volume.kubernetes.io/selected-node` annotation on the Listener PVC. + + However, this only works on setups with long-living nodes. If your nodes are rotated on + a regular basis, the Pods previously running on a removed node will be stuck in Pending + until you delete the PVC with the stickiness. + + Because of this we don't enable stickiness by default to support all environments. + type: boolean required: - serviceType type: object diff --git a/crates/stackable-operator/src/crd/listener/class/mod.rs b/crates/stackable-operator/src/crd/listener/class/mod.rs index 25054e26f..3150adeda 100644 --- a/crates/stackable-operator/src/crd/listener/class/mod.rs +++ b/crates/stackable-operator/src/crd/listener/class/mod.rs @@ -66,5 +66,19 @@ pub mod versioned { /// Defaults to `HostnameConservative`. #[serde(default = "ListenerClassSpec::default_preferred_address_type")] pub preferred_address_type: core_v1alpha1::PreferredAddressType, + + /// Wether a Pod exposed using a NodePort should be pinned to a specific Kubernetes node. + /// + /// By pinning the Pod to a specific (stable) Kubernetes node, stable addresses can be + /// provided using NodePorts. The stickiness is achieved by listener-operator setting the + /// `volume.kubernetes.io/selected-node` annotation on the Listener PVC. + /// + /// However, this only works on setups with long-living nodes. If your nodes are rotated on + /// a regular basis, the Pods previously running on a removed node will be stuck in Pending + /// until you delete the PVC with the stickiness. + /// + /// Because of this we don't enable stickiness by default to support all environments. + #[serde(default)] + pub sticky_node_ports: bool, } }