diff --git a/manifests/crds/rollout-crd.yaml b/manifests/crds/rollout-crd.yaml index cfec386e98..35d0ab1f95 100644 --- a/manifests/crds/rollout-crd.yaml +++ b/manifests/crds/rollout-crd.yaml @@ -73,6 +73,12 @@ spec: description: Name of the service that the rollout modifies as the active service. type: string + autoPromotionEnabled: + description: AutoPromotionEnabled indicates if the rollout should + automatically promote the new ReplicaSet to the active service + or enter a paused state. If not specified, the default value + is true. + type: boolean autoPromotionSeconds: description: AutoPromotionSeconds automatically promotes the current ReplicaSet to active after the specified pause delay diff --git a/manifests/install.yaml b/manifests/install.yaml index 668366e604..59fc26d156 100644 --- a/manifests/install.yaml +++ b/manifests/install.yaml @@ -74,6 +74,12 @@ spec: description: Name of the service that the rollout modifies as the active service. type: string + autoPromotionEnabled: + description: AutoPromotionEnabled indicates if the rollout should + automatically promote the new ReplicaSet to the active service + or enter a paused state. If not specified, the default value + is true. + type: boolean autoPromotionSeconds: description: AutoPromotionSeconds automatically promotes the current ReplicaSet to active after the specified pause delay diff --git a/manifests/namespace-install.yaml b/manifests/namespace-install.yaml index e2d31ee28e..c3b9e16430 100644 --- a/manifests/namespace-install.yaml +++ b/manifests/namespace-install.yaml @@ -74,6 +74,12 @@ spec: description: Name of the service that the rollout modifies as the active service. type: string + autoPromotionEnabled: + description: AutoPromotionEnabled indicates if the rollout should + automatically promote the new ReplicaSet to the active service + or enter a paused state. If not specified, the default value + is true. + type: boolean autoPromotionSeconds: description: AutoPromotionSeconds automatically promotes the current ReplicaSet to active after the specified pause delay diff --git a/pkg/apis/rollouts/v1alpha1/openapi_generated.go b/pkg/apis/rollouts/v1alpha1/openapi_generated.go index dbc2b21161..f0392942ee 100644 --- a/pkg/apis/rollouts/v1alpha1/openapi_generated.go +++ b/pkg/apis/rollouts/v1alpha1/openapi_generated.go @@ -119,6 +119,13 @@ func schema_pkg_apis_rollouts_v1alpha1_BlueGreenStrategy(ref common.ReferenceCal Format: "int32", }, }, + "autoPromotionEnabled": { + SchemaProps: spec.SchemaProps{ + Description: "AutoPromotionEnabled indicates if the rollout should automatically promote the new ReplicaSet to the active service or enter a paused state. If not specified, the default value is true.", + Type: []string{"boolean"}, + Format: "", + }, + }, "autoPromotionSeconds": { SchemaProps: spec.SchemaProps{ Description: "AutoPromotionSeconds automatically promotes the current ReplicaSet to active after the specified pause delay in seconds after the ReplicaSet becomes ready. If omitted, the Rollout enters and remains in a paused state until manually resumed by resetting spec.Paused to false.", diff --git a/pkg/apis/rollouts/v1alpha1/types.go b/pkg/apis/rollouts/v1alpha1/types.go index 0b1d95d665..10003bb630 100644 --- a/pkg/apis/rollouts/v1alpha1/types.go +++ b/pkg/apis/rollouts/v1alpha1/types.go @@ -78,6 +78,10 @@ type BlueGreenStrategy struct { // resumed the new replicaset will be full scaled up before the switch occurs // +optional PreviewReplicaCount *int32 `json:"previewReplicaCount,omitempty"` + // AutoPromotionEnabled indicates if the rollout should automatically promote the new ReplicaSet + // to the active service or enter a paused state. If not specified, the default value is true. + // +optional + AutoPromotionEnabled *bool `json:"autoPromotionEnabled,omitempty"` // AutoPromotionSeconds automatically promotes the current ReplicaSet to active after the // specified pause delay in seconds after the ReplicaSet becomes ready. // If omitted, the Rollout enters and remains in a paused state until manually resumed by diff --git a/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go index 26d1c8d870..1346a8b495 100644 --- a/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/rollouts/v1alpha1/zz_generated.deepcopy.go @@ -54,6 +54,11 @@ func (in *BlueGreenStrategy) DeepCopyInto(out *BlueGreenStrategy) { *out = new(int32) **out = **in } + if in.AutoPromotionEnabled != nil { + in, out := &in.AutoPromotionEnabled, &out.AutoPromotionEnabled + *out = new(bool) + **out = **in + } if in.AutoPromotionSeconds != nil { in, out := &in.AutoPromotionSeconds, &out.AutoPromotionSeconds *out = new(int32)