Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file.
- Allow configuring proxy host behavior ([#668]).
- Support disabling the `create-reporting-task` Job ([#690]).
- Support podOverrides on the `create-reporting-task` Job using the field `spec.clusterConfig.createReportingTaskJob.podOverrides` ([#690]).
- The operator can now run on Kubernetes clusters using a non-default cluster domain. It should automatically detect the
correct domain to use, but you can also use the env var `KUBERNETES_CLUSTER_DOMAIN` to set the domain explicitly
or use the helm-chart property `kubernetesClusterDomain` ([#694]).

### Changed

Expand Down Expand Up @@ -40,6 +43,7 @@ All notable changes to this project will be documented in this file.
[#675]: https://github.com/stackabletech/nifi-operator/pull/675
[#686]: https://github.com/stackabletech/nifi-operator/pull/686
[#690]: https://github.com/stackabletech/nifi-operator/pull/690
[#694]: https://github.com/stackabletech/nifi-operator/pull/694

## [24.7.0] - 2024-07-24

Expand Down
20 changes: 17 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
snafu = "0.8"
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.76.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.79.0" }
strum = { version = "0.26", features = ["derive"] }
tokio = { version = "1.40", features = ["full"] }
tracing = "0.1"
url = { version = "2.5.2" }
xml-rs = "0.8"

# [patch."https://github.com/stackabletech/operator-rs.git"]
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
[patch."https://github.com/stackabletech/operator-rs.git"]
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "spike/domain-in-client" }
5 changes: 5 additions & 0 deletions deploy/helm/nifi-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ nodeSelector: {}
tolerations: []

affinity: {}

# When running on a non-default Kubernetes cluster domain and the auto detection is not working correctly,
# you can set your custom cluster domain here.
# See the https://docs.stackable.tech/home/stable/guides/kubernetes-cluster-domain guide for details
# kubernetesClusterDomain: my-cluster.local
21 changes: 14 additions & 7 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ use stackable_operator::{
schemars::{self, JsonSchema},
status::condition::{ClusterCondition, HasStatusCondition},
time::Duration,
utils::crds::{raw_object_list_schema, raw_object_schema},
utils::{
cluster_info::KubernetesClusterInfo,
crds::{raw_object_list_schema, raw_object_schema},
},
};
use strum::Display;
use tls::NifiTls;
Expand Down Expand Up @@ -542,11 +545,12 @@ impl NifiCluster {
}

/// The fully-qualified domain name of the role-level load-balanced Kubernetes `Service`
pub fn node_role_service_fqdn(&self) -> Option<String> {
pub fn node_role_service_fqdn(&self, cluster_info: &KubernetesClusterInfo) -> Option<String> {
Some(format!(
"{}.{}.svc.cluster.local",
"{}.{}.svc.{}",
self.node_role_service_name(),
self.metadata.namespace.as_ref()?
self.metadata.namespace.as_ref()?,
cluster_info.cluster_domain,
))
}

Expand Down Expand Up @@ -637,10 +641,13 @@ pub struct PodRef {
}

impl PodRef {
pub fn fqdn(&self) -> String {
pub fn fqdn(&self, cluster_info: &KubernetesClusterInfo) -> String {
format!(
"{}.{}.{}.svc.cluster.local",
self.pod_name, self.role_group_service_name, self.namespace
"{}.{}.{}.svc.{}",
self.pod_name,
self.role_group_service_name,
self.namespace,
cluster_info.cluster_domain
)
}
}
Loading
Loading