Skip to content
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

Deprecate storage class overrides #10407

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
On the listener `serverBearerTokenLocation` and `userNamePrefix` have been added.
On the client `accessTokenLocation`, `clientAssertion`, `clientAssertionLocation`, `clientAssertionType`, and `saslExtensions` have been added.

### Changes, deprecations and removals

* The storage overrides for configuring per-broker storage class are deprecated and will be removed in the future.
If you are using the storage overrides, you should migrate to KafkaNodePool resources and use multiple node pools with a different storage class each.

## 0.42.0

* Add support for Kafka 3.7.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.strimzi.api.annotations.DeprecatedProperty;
import io.strimzi.api.kafka.model.common.Constants;
import io.strimzi.crdgenerator.annotations.Description;
import io.strimzi.crdgenerator.annotations.Minimum;
Expand Down Expand Up @@ -114,6 +115,9 @@ public void setDeleteClaim(boolean deleteClaim) {
@Description("Overrides for individual brokers. " +
"The `overrides` field allows to specify a different configuration for different brokers.")
scholzj marked this conversation as resolved.
Show resolved Hide resolved
@JsonInclude(JsonInclude.Include.NON_NULL)
@Deprecated
@DeprecatedProperty(description = "The storage overrides for individual brokers are deprecated and will be removed in the future. " +
"Please use multiple KafkaNodePool custom resources with different storage classes instead.")
scholzj marked this conversation as resolved.
Show resolved Hide resolved
public List<PersistentClaimStorageOverride> getOverrides() {
return overrides;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static List<PersistentVolumeClaim> createPersistentVolumeClaims(
*
* @return Storage class which should be used for this PVC
*/
@SuppressWarnings("deprecation") // Storage overrides are deprecated
private static String storageClassNameForBrokerId(int brokerId, PersistentClaimStorage storage) {
String storageClass = storage.getStorageClass();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ public boolean issuesDetected() {
*
* @return True if only allowed override changes were done, false otherwise
*/
@SuppressWarnings("deprecation") // Storage overrides are deprecated
private boolean isOverrideChangeAllowed(Storage current, Storage desired, Set<Integer> currentNodeIds, Set<Integer> desiredNodeIds) {
List<PersistentClaimStorageOverride> currentOverrides = ((PersistentClaimStorage) current).getOverrides();
if (currentOverrides == null) {
Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/appendix_crds.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ It must have the value `persistent-claim` for the type `PersistentClaimStorage`.
|Specifies if the persistent volume claim has to be deleted when the cluster is un-deployed.
|overrides
|xref:type-PersistentClaimStorageOverride-{context}[`PersistentClaimStorageOverride`] array
|Overrides for individual brokers. The `overrides` field allows to specify a different configuration for different brokers.
|**The `overrides` property has been deprecated.** The storage overrides for individual brokers are deprecated and will be removed in the future. Please use multiple KafkaNodePool custom resources with different storage classes instead. Overrides for individual brokers. The `overrides` field allows to specify a different configuration for different brokers.
|====

[id='type-PersistentClaimStorageOverride-{context}']
Expand Down
15 changes: 15 additions & 0 deletions documentation/modules/configuring/ref-storage-persistent.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ storage:

== Storage class overrides

WARNING: Storage class overrides are deprecated and will be removed in the future. Please use Kafka Node Pool resources instead.
scholzj marked this conversation as resolved.
Show resolved Hide resolved

Instead of using the default storage class, you can specify a different storage class for one or more Kafka or ZooKeeper nodes.
This is useful, for example, when storage classes are restricted to different availability zones or data centers.
You can use the `overrides` field for this purpose.
Expand Down Expand Up @@ -190,6 +192,19 @@ As a result of the configured `overrides` property, the volumes use the followin
The `overrides` property is currently used only to override the storage `class`.
Overrides for other storage configuration properties is not currently supported.

=== Migrating from storage class overrides to Kafka Node Pools
scholzj marked this conversation as resolved.
Show resolved Hide resolved

Storage class overrides are deprecated and will be removed in the future.
If you use storage class overrides, you should use Kafka Node Pools instead.
scholzj marked this conversation as resolved.
Show resolved Hide resolved
To migrate the existing configuration, you should follow these steps:
scholzj marked this conversation as resolved.
Show resolved Hide resolved

1. Make sure you already use node pools resources.
If not, you should xref:proc-migrating-clusters-node-pools-str[migrate the cluster to use node pools] first.
2. Create new xref:config-node-pools-str[node pools] with storage configuration using the desired storage class without using the overrides.
3. Move all partition replicas from the old broker using the storage class overrides.
You can do this using xref:cruise-control-concepts-str[Cruise Control] or xref:assembly-reassign-tool-str[using the partition reassignment tool].
4. Delete the old node pool with the old brokers using the storage class overrides.

[id='ref-persistent-storage-pvc-{context}']
== PVC resources for persistent storage

Expand Down
Loading