Skip to content

Deprecate -nodeport discovery ConfigMap #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Deprecated

- The `-nodeport` discovery ConfigMaps have been deprecated for removal ([#813]).
- Any existing uses should be migrated to the primary discovery ConfigMap instead.

### Added

- The lifetime of auto generated TLS certificates is now configurable with the role and roleGroup
Expand All @@ -25,6 +30,7 @@ All notable changes to this project will be documented in this file.
[#796]: https://github.com/stackabletech/kafka-operator/pull/796
[#803]: https://github.com/stackabletech/kafka-operator/pull/803
[#809]: https://github.com/stackabletech/kafka-operator/pull/809
[#813]: https://github.com/stackabletech/kafka-operator/pull/813

## [24.11.0] - 2024-11-18

Expand Down
2 changes: 2 additions & 0 deletions docs/modules/kafka/pages/reference/discovery.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The Stackable Operator for Apache Kafka publishes a xref:concepts:service_discov

The bundle includes a thrift connection string to access the Kafka broker service. This string may be used by other operators or tools to configure their products with access to Kafka. This is limited to internal cluster access.

NOTE: The operator also creates a deprecated secondary discovery ConfigMap named `\{clusterName\}-nodeport`. In 24.7 and older, this ConfigMap was used to access the Kafka installation from outside the Kubernetes cluster. In 24.11, this was replaced by xref:usage-guide/listenerclass.adoc[Listener-based exposition], and the `-nodeport` ConfigMap was made equivalent to the primary one. This behaviour is deprecated as of 25.3, and will be removed in the next release. Any existing uses of the `-nodeport` ConfigMap should be migrated to the primary. See https://github.com/stackabletech/kafka-operator/issues/765[the deprecation issue] for more details.

== Example

Given the following Kafka cluster:
Expand Down
32 changes: 22 additions & 10 deletions rust/operator-binary/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,28 @@ pub async fn build_discovery_configmaps(
&name,
listener_hosts(listeners, port_name)?,
)?,
// backwards compat: nodeport service is now the same as the main service, access type
// is determined by the listenerclass.
// do we want to deprecate/remove this?
build_discovery_configmap(
kafka,
owner,
resolved_product_image,
&format!("{name}-nodeport"),
listener_hosts(listeners, port_name)?,
)?,
{
let mut nodeport = build_discovery_configmap(
kafka,
owner,
resolved_product_image,
&format!("{name}-nodeport"),
listener_hosts(listeners, port_name)?,
)?;
nodeport
.metadata
.annotations
.get_or_insert_with(Default::default)
.insert(
"stackable.tech/deprecated".to_string(),
format!(
"Deprecated in 25.3, and scheduled for removal in the next version. \
Use {name:?} instead. \
See https://github.com/stackabletech/kafka-operator/issues/765 for more."
),
);
nodeport
},
])
}

Expand Down
Loading