Skip to content
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- The history server and Spark Connect server StatefulSets now carry the
`restarter.stackable.tech/enabled: "true"` label, opting them into the restarter-controller so
that their Pods are automatically rolled when a mounted ConfigMap or Secret changes ([#754]).

### Changed

- Internal operator refactoring: introduce a build() step in the history and connect
Expand Down Expand Up @@ -51,6 +57,7 @@ All notable changes to this project will be documented in this file.
[#746]: https://github.com/stackabletech/spark-k8s-operator/pull/746
[#750]: https://github.com/stackabletech/spark-k8s-operator/pull/750
[#753]: https://github.com/stackabletech/spark-k8s-operator/pull/753
[#754]: https://github.com/stackabletech/spark-k8s-operator/pull/754

## [26.7.0] - 2026-07-21

Expand Down
4 changes: 4 additions & 0 deletions rust/operator-binary/src/connect/controller/build/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use stackable_operator::{
},
},
},
constants::RESTART_CONTROLLER_ENABLED_LABEL,
crd::listener,
k8s_openapi::{
DeepMerge,
Expand Down Expand Up @@ -332,6 +333,9 @@ pub(crate) fn build_stateful_set(
object_name(&validated.name_any(), SparkConnectRole::Server),
SparkConnectRole::Server,
)
// Opt into the restarter-controller: it rolls the StatefulSet's Pods when a mounted
// ConfigMap or Secret changes. See stackabletech/issues#816.
.with_label(RESTART_CONTROLLER_ENABLED_LABEL.to_owned())
.build(),
spec: Some(StatefulSetSpec {
template: pod_template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use stackable_operator::{
pod::{PodBuilder, security::PodSecurityContextBuilder, volume::VolumeBuilder},
},
constant,
constants::RESTART_CONTROLLER_ENABLED_LABEL,
k8s_openapi::{
DeepMerge,
api::apps::v1::{StatefulSet, StatefulSetSpec},
Expand Down Expand Up @@ -247,6 +248,9 @@ pub(crate) fn build_stateful_set(
resource_names.stateful_set_name().to_string(),
role_group_name,
)
// Opt into the restarter-controller: it rolls the StatefulSet's Pods when a mounted
// ConfigMap or Secret changes. See stackabletech/issues#816.
.with_label(RESTART_CONTROLLER_ENABLED_LABEL.to_owned())
.build();

Ok(StatefulSet {
Expand Down
3 changes: 3 additions & 0 deletions tests/templates/kuttl/spark-connect-kerberos/12-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: spark-connect-server
# generation stays at 1: the restarter-controller label must not itself trigger a rollout.
generation: 1
Comment thread
sweb marked this conversation as resolved.
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: spark-connect
app.kubernetes.io/managed-by: spark.stackable.tech_connect
app.kubernetes.io/name: spark-connect
restarter.stackable.tech/enabled: "true"
stackable.tech/vendor: Stackable
ownerReferences:
- apiVersion: spark.stackable.tech/v1alpha1
Expand Down
3 changes: 3 additions & 0 deletions tests/templates/kuttl/spark-connect/12-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: spark-connect-server
# generation stays at 1: the restarter-controller label must not itself trigger a rollout.
generation: 1
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: spark-connect
app.kubernetes.io/managed-by: spark.stackable.tech_connect
app.kubernetes.io/name: spark-connect
restarter.stackable.tech/enabled: "true"
stackable.tech/vendor: Stackable
ownerReferences:
- apiVersion: spark.stackable.tech/v1alpha1
Expand Down
4 changes: 4 additions & 0 deletions tests/templates/kuttl/spark-history-server/06-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: spark-history-node-default
# generation stays at 1: the restarter-controller label must not itself trigger a rollout.
generation: 1
labels:
restarter.stackable.tech/enabled: "true"
status:
readyReplicas: 1
---
Expand Down
Loading