Sitelet https://github.com/stackabletech/operator-rs/pull/1291/files
Skip to content
Open
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
6 changes: 6 additions & 0 deletions crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- BREAKING: Add the `OpenShiftRoute` Listener `ServiceType` and `ListenerClass.spec.openshiftRoute` ([#1291]).

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

## [0.119.0] - 2026-09-23

### Removed
Expand Down
17 changes: 17 additions & 0 deletions crates/stackable-operator/crds/ListenerClass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ spec:
Ignored unless serviceType is LoadBalancer.
nullable: true
type: string
openshiftRoute:
description: Ignored unless `serviceType` is `OpenShiftRoute`.
nullable: true
properties:
port:
description: Required when the Listener has more than one port.
nullable: true
type: string
tls:
default: Passthrough
description: '`Passthrough` (default) uses port 443; `None` serves plain HTTP on port 80.'
enum:
- Passthrough
- None
type: string
type: object
pinnedNodePorts:
default: false
description: |-
Expand Down Expand Up @@ -106,6 +122,7 @@ spec:
- NodePort
- LoadBalancer
- ClusterIP
- OpenShiftRoute
type: string
required:
- serviceType
Expand Down
31 changes: 31 additions & 0 deletions crates/stackable-operator/src/crd/listener/class/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ pub mod versioned {
pub struct ListenerClassSpec {
pub service_type: core_v1alpha1::ServiceType,

/// Ignored unless `serviceType` is `OpenShiftRoute`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub openshift_route: Option<OpenShiftRouteConfig>,

/// Configures whether a LoadBalancer service should also allocate node ports (like NodePort).
///
/// Ignored unless serviceType is LoadBalancer.
Expand Down Expand Up @@ -121,6 +125,26 @@ pub mod versioned {
#[schemars(schema_with = "raw_object_schema")]
pub service_overrides: Service,
}

#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct OpenShiftRouteConfig {
/// Required when the Listener has more than one port.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub port: Option<String>,

/// `Passthrough` (default) uses port 443; `None` serves plain HTTP on port 80.
#[serde(default)]
pub tls: OpenShiftRouteTls,
}

#[derive(Clone, Copy, Debug, Default, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
pub enum OpenShiftRouteTls {
#[default]
Passthrough,

None,
}
}

#[cfg(test)]
Expand All @@ -130,6 +154,13 @@ impl stackable_versioned::test_utils::RoundtripTestData for v1alpha1::ListenerCl
- serviceType: ClusterIP
- serviceType: NodePort
- serviceType: LoadBalancer
- serviceType: OpenShiftRoute
- serviceType: OpenShiftRoute
openshiftRoute:
port: https
- serviceType: OpenShiftRoute
openshiftRoute:
tls: None
- serviceType: ClusterIP
loadBalancerAllocateNodePorts: false
loadBalancerClass: foo
Expand Down
3 changes: 3 additions & 0 deletions crates/stackable-operator/src/crd/listener/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ pub mod versioned {
/// Assigns an IP address from a pool of IP addresses that your cluster has reserved for
/// that purpose.
ClusterIP,

/// Expose a single port through an OpenShift Route.
OpenShiftRoute,
}

/// Service Internal Traffic Policy enables internal traffic restrictions to only route internal
Expand Down