Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added

- Re-export the `YamlSchema` trait and the `stackable-shared` crate as the `shared` module ([#883]).
- BREAKING: Added `preferredAddressType` field to ListenerClass CRD ([#885]).

### Changed

Expand All @@ -17,9 +18,10 @@ All notable changes to this project will be documented in this file.

- BREAKING: The `CustomResourceExt` trait doesn't provide a `generate_yaml_schema` function any
more. Instead, use the high-level functions to write the schema to a file, write it to stdout or
use it as a `String`.
use it as a `String` ([#883]).

[#883]: https://github.com/stackabletech/operator-rs/pull/883
[#885]: https://github.com/stackabletech/operator-rs/pull/885

## [0.78.0] - 2024-09-30

Expand Down
11 changes: 11 additions & 0 deletions crates/stackable-operator/src/commons/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,23 @@ pub struct ListenerClassSpec {
/// break Local mode (IONOS so far).
#[serde(default = "ListenerClassSpec::default_service_external_traffic_policy")]
pub service_external_traffic_policy: KubernetesTrafficPolicy,

/// Whether addresses should prefer using the IP address (`IP`) or the hostname (`Hostname`).
///
/// The other type will be used if the preferred type is not available.
/// By default `Hostname` is used.
#[serde(default = "ListenerClassSpec::default_preferred_address_type")]
pub preferred_address_type: AddressType,
}

impl ListenerClassSpec {
const fn default_service_external_traffic_policy() -> KubernetesTrafficPolicy {
KubernetesTrafficPolicy::Local
}

const fn default_preferred_address_type() -> AddressType {
AddressType::Hostname
}
}

/// The method used to access the services.
Expand Down
Loading