From f2610e0c9fe56bf9804066c7a92e2db52c503087 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 22 May 2024 12:18:01 +0200 Subject: [PATCH 1/2] chore!: Rename KubernetesServiceType back to ServiceType --- crates/stackable-operator/CHANGELOG.md | 3 +-- crates/stackable-operator/src/commons/listener.rs | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index fed60e21c..e84ba7dd8 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,8 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789]). -- BREAKING: Rename `commons::listener::ServiceType` to `commons::listener::KubernetesServiceType` ([#773]). +- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789], [#XXX]). [#773]: https://github.com/stackabletech/operator-rs/pull/773 [#789]: https://github.com/stackabletech/operator-rs/pull/789 diff --git a/crates/stackable-operator/src/commons/listener.rs b/crates/stackable-operator/src/commons/listener.rs index a0cdc56f5..4efbfc534 100644 --- a/crates/stackable-operator/src/commons/listener.rs +++ b/crates/stackable-operator/src/commons/listener.rs @@ -50,7 +50,7 @@ use crate::builder::pod::volume::ListenerOperatorVolumeSourceBuilder; )] #[serde(rename_all = "camelCase")] pub struct ListenerClassSpec { - pub service_type: KubernetesServiceType, + pub service_type: ServiceType, /// Annotations that should be added to the Service object. #[serde(default)] @@ -73,10 +73,11 @@ impl ListenerClassSpec { /// The method used to access the services. // -// Please note that this represents a Kubernetes type, so the name of the enum variant needs to exactly match the -// Kubernetes service type. -#[derive(Serialize, Deserialize, Clone, Copy, Debug, JsonSchema, PartialEq, Eq, strum::Display)] -pub enum KubernetesServiceType { +// Please note that this does not necessarely need to be restricted to the same Service types Kubernetes supports. +// Listeners currently happens to support the same set of service types as upstream Kubernetes, but we still want to +// have the freedom to add custom ones in the future (for example: Istio ingress?). +#[derive(Serialize, Deserialize, Clone, Copy, Debug, JsonSchema, PartialEq, Eq)] +pub enum ServiceType { /// Reserve a port on each node. NodePort, From e111ae3c39b85aa56c3fe229d503a4032ce9d4fc Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 22 May 2024 12:20:14 +0200 Subject: [PATCH 2/2] changelog --- crates/stackable-operator/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index e84ba7dd8..21e63389c 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,10 +4,11 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789], [#XXX]). +- Support specifying externalTrafficPolicy in Services created by listener-operator ([#773], [#789], [#791]). [#773]: https://github.com/stackabletech/operator-rs/pull/773 [#789]: https://github.com/stackabletech/operator-rs/pull/789 +[#791]: https://github.com/stackabletech/operator-rs/pull/791 ## [0.67.1] - 2024-05-08