From 3552b1158d5ede6ffa04dc6298eee1e450b58e74 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Tue, 5 May 2026 11:45:36 +0200 Subject: [PATCH] Update StatefulSet OnDelete strategy documentation Signed-off-by: Maciej Szulik --- pkg/apis/apps/types.go | 11 ++++++----- pkg/generated/openapi/zz_generated.openapi.go | 2 +- staging/src/k8s.io/api/apps/v1/types.go | 11 ++++++----- staging/src/k8s.io/api/apps/v1beta1/types.go | 11 ++++++----- staging/src/k8s.io/api/apps/v1beta2/types.go | 11 ++++++----- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pkg/apis/apps/types.go b/pkg/apis/apps/types.go index b8d8a1e8648..f2eabe0a496 100644 --- a/pkg/apis/apps/types.go +++ b/pkg/apis/apps/types.go @@ -83,11 +83,12 @@ const ( // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" - // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version - // tracking and ordered rolling restarts are disabled. Pods are recreated - // from the StatefulSetSpec when they are manually deleted. When a scale - // operation is performed with this strategy,specification version indicated - // by the StatefulSet's currentRevision. + // OnDeleteStatefulSetStrategyType disables ordered rolling restarts. Version + // tracking is done on a best-effort basis - the controller will try to + // eventually converge StatefulSet's currentRevision with updateRevision. + // Pods are recreated from the StatefulSetSpec when they are manually deleted. + // When a scale operation is performed with this strategy, new Pods will be + // created from the specification version indicated by the StatefulSet's updateRevision. OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 15ee5f82a2b..33826193fb6 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -9401,7 +9401,7 @@ func schema_k8sio_api_apps_v1_StatefulSetUpdateStrategy(ref common.ReferenceCall Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.\n\nPossible enum values:\n - `\"OnDelete\"` triggers the legacy behavior. Version tracking and ordered rolling restarts are disabled. Pods are recreated from the StatefulSetSpec when they are manually deleted. When a scale operation is performed with this strategy,specification version indicated by the StatefulSet's currentRevision.\n - `\"RollingUpdate\"` indicates that update will be applied to all Pods in the StatefulSet with respect to the StatefulSet ordering constraints. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.", + Description: "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.\n\nPossible enum values:\n - `\"OnDelete\"` disables ordered rolling restarts. Version tracking is done on a best-effort basis - the controller will try to eventually converge StatefulSet's currentRevision with updateRevision. Pods are recreated from the StatefulSetSpec when they are manually deleted. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.\n - `\"RollingUpdate\"` indicates that update will be applied to all Pods in the StatefulSet with respect to the StatefulSet ordering constraints. When a scale operation is performed with this strategy, new Pods will be created from the specification version indicated by the StatefulSet's updateRevision.", Type: []string{"string"}, Format: "", Enum: []interface{}{"OnDelete", "RollingUpdate"}, diff --git a/staging/src/k8s.io/api/apps/v1/types.go b/staging/src/k8s.io/api/apps/v1/types.go index 046274e9654..bb6ccdb34bd 100644 --- a/staging/src/k8s.io/api/apps/v1/types.go +++ b/staging/src/k8s.io/api/apps/v1/types.go @@ -105,11 +105,12 @@ const ( // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" - // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version - // tracking and ordered rolling restarts are disabled. Pods are recreated - // from the StatefulSetSpec when they are manually deleted. When a scale - // operation is performed with this strategy,specification version indicated - // by the StatefulSet's currentRevision. + // OnDeleteStatefulSetStrategyType disables ordered rolling restarts. Version + // tracking is done on a best-effort basis - the controller will try to + // eventually converge StatefulSet's currentRevision with updateRevision. + // Pods are recreated from the StatefulSetSpec when they are manually deleted. + // When a scale operation is performed with this strategy, new Pods will be + // created from the specification version indicated by the StatefulSet's updateRevision. OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) diff --git a/staging/src/k8s.io/api/apps/v1beta1/types.go b/staging/src/k8s.io/api/apps/v1beta1/types.go index 67e17aceeee..5c5467bbb40 100644 --- a/staging/src/k8s.io/api/apps/v1beta1/types.go +++ b/staging/src/k8s.io/api/apps/v1beta1/types.go @@ -149,11 +149,12 @@ const ( // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" - // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version - // tracking and ordered rolling restarts are disabled. Pods are recreated - // from the StatefulSetSpec when they are manually deleted. When a scale - // operation is performed with this strategy,specification version indicated - // by the StatefulSet's currentRevision. + // OnDeleteStatefulSetStrategyType disables ordered rolling restarts. Version + // tracking is done on a best-effort basis - the controller will try to + // eventually converge StatefulSet's currentRevision with updateRevision. + // Pods are recreated from the StatefulSetSpec when they are manually deleted. + // When a scale operation is performed with this strategy, new Pods will be + // created from the specification version indicated by the StatefulSet's updateRevision. OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" ) diff --git a/staging/src/k8s.io/api/apps/v1beta2/types.go b/staging/src/k8s.io/api/apps/v1beta2/types.go index b987c1d7ac1..a62a53fade6 100644 --- a/staging/src/k8s.io/api/apps/v1beta2/types.go +++ b/staging/src/k8s.io/api/apps/v1beta2/types.go @@ -158,11 +158,12 @@ const ( // strategy, new Pods will be created from the specification version indicated // by the StatefulSet's updateRevision. RollingUpdateStatefulSetStrategyType StatefulSetUpdateStrategyType = "RollingUpdate" - // OnDeleteStatefulSetStrategyType triggers the legacy behavior. Version - // tracking and ordered rolling restarts are disabled. Pods are recreated - // from the StatefulSetSpec when they are manually deleted. When a scale - // operation is performed with this strategy,specification version indicated - // by the StatefulSet's currentRevision. + // OnDeleteStatefulSetStrategyType disables ordered rolling restarts. Version + // tracking is done on a best-effort basis - the controller will try to + // eventually converge StatefulSet's currentRevision with updateRevision. + // Pods are recreated from the StatefulSetSpec when they are manually deleted. + // When a scale operation is performed with this strategy, new Pods will be + // created from the specification version indicated by the StatefulSet's updateRevision. OnDeleteStatefulSetStrategyType StatefulSetUpdateStrategyType = "OnDelete" )