File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
crates/stackable-operator Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ All notable changes to this project will be documented in this file.
3131 fieldPath: spec.nodeName
3232 ` ` `
3333
34+ - Add associated functions on `RoleGroupRef` to return the rolegroup headless and metrics service name ([#1069]).
35+
3436# ## Changed
3537
3638- Update `kube` to `1.1.0` ([#1049]).
@@ -51,6 +53,7 @@ All notable changes to this project will be documented in this file.
5153[#1060]: https://github.com/stackabletech/operator-rs/pull/1060
5254[#1064]: https://github.com/stackabletech/operator-rs/pull/1064
5355[#1068]: https://github.com/stackabletech/operator-rs/pull/1068
56+ [#1069]: https://github.com/stackabletech/operator-rs/pull/1069
5457[#1071]: https://github.com/stackabletech/operator-rs/pull/1071
5558
5659# # [0.93.2] - 2025-05-26
Original file line number Diff line number Diff line change @@ -472,6 +472,27 @@ impl<K: Resource> RoleGroupRef<K> {
472472 pub fn object_name ( & self ) -> String {
473473 format ! ( "{}-{}-{}" , self . cluster. name, self . role, self . role_group)
474474 }
475+
476+ /// Returns the service name used by rolegroups for cluster internal communication only.
477+ ///
478+ /// The internal use of of this service name is indicated by the `-headless` suffix.
479+ /// This service should not be used for communication to external services or clients
480+ /// and also should not be used to export metrics (like Prometheus). Metrics should be
481+ /// instead exposed via a dedicated service. Use [`Self::rolegroup_metrics_service_name`]
482+ /// instead.
483+ pub fn rolegroup_headless_service_name ( & self ) -> String {
484+ format ! ( "{name}-headless" , name = self . object_name( ) )
485+ }
486+
487+ /// Returns the service name used by rolegroups to expose metrics (like Prometheus).
488+ ///
489+ /// The use for metrics only is indicated by the `-metrics` suffix. This service
490+ /// should not be used for any internal communication or any other external
491+ /// communication. For internal communication, use [`Self::rolegroup_headless_service_name`]
492+ /// instead.
493+ pub fn rolegroup_metrics_service_name ( & self ) -> String {
494+ format ! ( "{name}-metrics" , name = self . object_name( ) )
495+ }
475496}
476497
477498impl < K : Resource > Display for RoleGroupRef < K > {
You can’t perform that action at this time.
0 commit comments