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.
31
31
fieldPath: spec.nodeName
32
32
` ` `
33
33
34
+ - Add associated functions on `RoleGroupRef` to return the rolegroup headless and metrics service name ([#1069]).
35
+
34
36
# ## Changed
35
37
36
38
- Update `kube` to `1.1.0` ([#1049]).
@@ -51,6 +53,7 @@ All notable changes to this project will be documented in this file.
51
53
[#1060]: https://github.com/stackabletech/operator-rs/pull/1060
52
54
[#1064]: https://github.com/stackabletech/operator-rs/pull/1064
53
55
[#1068]: https://github.com/stackabletech/operator-rs/pull/1068
56
+ [#1069]: https://github.com/stackabletech/operator-rs/pull/1069
54
57
[#1071]: https://github.com/stackabletech/operator-rs/pull/1071
55
58
56
59
# # [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> {
472
472
pub fn object_name ( & self ) -> String {
473
473
format ! ( "{}-{}-{}" , self . cluster. name, self . role, self . role_group)
474
474
}
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
+ }
475
496
}
476
497
477
498
impl < K : Resource > Display for RoleGroupRef < K > {
You can’t perform that action at this time.
0 commit comments