Skip to content

Commit 9a85f87

Browse files
MalewareTechassi
andauthored
Better descriptions suggested by reviewer
Co-authored-by: Techassi <[email protected]>
1 parent b474a3d commit 9a85f87

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

crates/stackable-operator/src/role_utils.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,14 +473,24 @@ impl<K: Resource> RoleGroupRef<K> {
473473
format!("{}-{}-{}", self.cluster.name, self.role, self.role_group)
474474
}
475475

476-
/// Set of functions to define service names on rolegroup level.
477-
/// Headless service for cluster internal purposes only.
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.
478483
pub fn rolegroup_headless_service_name(&self) -> String {
479484
format!("{name}-headless", name = self.object_name())
480485
}
481486

482-
/// Headless metrics service exposes Prometheus endpoint only
483-
pub fn rolegroup_headless_metrics_service_name(&self) -> String {
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 {
484494
format!("{name}-metrics", name = self.object_name())
485495
}
486496
}

0 commit comments

Comments
 (0)