Skip to content

Commit e1f6fe8

Browse files
authored
chore!: Rename KubernetesServiceType back to ServiceType (#791)
* chore!: Rename KubernetesServiceType back to ServiceType * changelog
1 parent e937360 commit e1f6fe8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

crates/stackable-operator/CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7-
- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789]).
8-
- BREAKING: Rename `commons::listener::ServiceType` to `commons::listener::KubernetesServiceType` ([#773]).
7+
- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789], [#791]).
98

109
[#773]: https://github.com/stackabletech/operator-rs/pull/773
1110
[#789]: https://github.com/stackabletech/operator-rs/pull/789
11+
[#791]: https://github.com/stackabletech/operator-rs/pull/791
1212

1313
## [0.67.1] - 2024-05-08
1414

crates/stackable-operator/src/commons/listener.rs

+6-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use crate::builder::pod::volume::ListenerOperatorVolumeSourceBuilder;
5050
)]
5151
#[serde(rename_all = "camelCase")]
5252
pub struct ListenerClassSpec {
53-
pub service_type: KubernetesServiceType,
53+
pub service_type: ServiceType,
5454

5555
/// Annotations that should be added to the Service object.
5656
#[serde(default)]
@@ -73,10 +73,11 @@ impl ListenerClassSpec {
7373

7474
/// The method used to access the services.
7575
//
76-
// Please note that this represents a Kubernetes type, so the name of the enum variant needs to exactly match the
77-
// Kubernetes service type.
78-
#[derive(Serialize, Deserialize, Clone, Copy, Debug, JsonSchema, PartialEq, Eq, strum::Display)]
79-
pub enum KubernetesServiceType {
76+
// Please note that this does not necessarely need to be restricted to the same Service types Kubernetes supports.
77+
// Listeners currently happens to support the same set of service types as upstream Kubernetes, but we still want to
78+
// have the freedom to add custom ones in the future (for example: Istio ingress?).
79+
#[derive(Serialize, Deserialize, Clone, Copy, Debug, JsonSchema, PartialEq, Eq)]
80+
pub enum ServiceType {
8081
/// Reserve a port on each node.
8182
NodePort,
8283

0 commit comments

Comments
 (0)