From 318c6e1fff09c437b9fa0b02bb9bcadcea7fefed Mon Sep 17 00:00:00 2001 From: dervoeti Date: Tue, 21 Jan 2025 14:02:08 +0100 Subject: [PATCH 1/2] fix: Revert default cluster domain to 'cluster.local' --- crates/stackable-operator/CHANGELOG.md | 2 ++ crates/stackable-operator/src/utils/cluster_info.rs | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index b9e33e004..6fca98d91 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -7,8 +7,10 @@ All notable changes to this project will be documented in this file. ### Fixed - Remove `Merge` trait bound from `erase` and make `product_specific_common_config` public ([#946]). +- BREAKING: Revert the change of appending a dot to the default cluster domain to make it a FQDN, it is now `cluster.local` again. Users can instead explicitly opt-in to FQDNs via the ENV variable `KUBERNETES_CLUSTER_DOMAIN`. ([#947]). [#946]: https://github.com/stackabletech/operator-rs/pull/946 +[#947]: https://github.com/stackabletech/operator-rs/pull/947 ## [0.84.0] - 2025-01-16 diff --git a/crates/stackable-operator/src/utils/cluster_info.rs b/crates/stackable-operator/src/utils/cluster_info.rs index 9bad4c00d..1d26be2fd 100644 --- a/crates/stackable-operator/src/utils/cluster_info.rs +++ b/crates/stackable-operator/src/utils/cluster_info.rs @@ -2,18 +2,18 @@ use std::str::FromStr; use crate::commons::networking::DomainName; -const KUBERNETES_CLUSTER_DOMAIN_DEFAULT: &str = "cluster.local."; +const KUBERNETES_CLUSTER_DOMAIN_DEFAULT: &str = "cluster.local"; /// Some information that we know about the Kubernetes cluster. #[derive(Debug, Clone)] pub struct KubernetesClusterInfo { - /// The Kubernetes cluster domain, typically `cluster.local.`. + /// The Kubernetes cluster domain, typically `cluster.local`. pub cluster_domain: DomainName, } #[derive(clap::Parser, Debug, Default, PartialEq, Eq)] pub struct KubernetesClusterInfoOpts { - /// Kubernetes cluster domain, usually this is `cluster.local.`. + /// Kubernetes cluster domain, usually this is `cluster.local`. /// /// Please note that we recommend adding a trailing dot (".") to reduce DNS requests, see /// for details. From b75dfc2843671fda889d8ced997298238735f4ab Mon Sep 17 00:00:00 2001 From: dervoeti Date: Tue, 21 Jan 2025 14:25:35 +0100 Subject: [PATCH 2/2] fix: remove recommendations for trailing dot in Kubernetes cluster domain --- crates/stackable-operator/src/utils/cluster_info.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crates/stackable-operator/src/utils/cluster_info.rs b/crates/stackable-operator/src/utils/cluster_info.rs index 1d26be2fd..d31275668 100644 --- a/crates/stackable-operator/src/utils/cluster_info.rs +++ b/crates/stackable-operator/src/utils/cluster_info.rs @@ -14,10 +14,6 @@ pub struct KubernetesClusterInfo { #[derive(clap::Parser, Debug, Default, PartialEq, Eq)] pub struct KubernetesClusterInfoOpts { /// Kubernetes cluster domain, usually this is `cluster.local`. - /// - /// Please note that we recommend adding a trailing dot (".") to reduce DNS requests, see - /// for details. - // // We are not using a default value here, as operators will probably do an more advanced // auto-detection of the cluster domain in case it is not specified in the future. #[arg(long, env)] @@ -29,9 +25,6 @@ impl KubernetesClusterInfo { let cluster_domain = match &cluster_info_opts.kubernetes_cluster_domain { Some(cluster_domain) => { tracing::info!(%cluster_domain, "Using configured Kubernetes cluster domain"); - if !cluster_domain.ends_with('.') { - tracing::warn!(%cluster_domain, "Your configured Kubernetes cluster domain is not fully qualified (it does not end with a dot (\".\")). We recommend adding a trailing dot to reduce DNS requests, see https://github.com/stackabletech/issues/issues/656 for details"); - } cluster_domain.clone() }