diff --git a/api/v1alpha1/istio_types.go b/api/v1alpha1/istio_types.go index fee392773..b5a4f766a 100644 --- a/api/v1alpha1/istio_types.go +++ b/api/v1alpha1/istio_types.go @@ -29,7 +29,7 @@ const ( UpdateStrategyTypeRevisionBased UpdateStrategyType = "RevisionBased" DefaultRevisionDeletionGracePeriodSeconds = 30 - MinRevisionDeletionGracePeriodSeconds = 30 + MinRevisionDeletionGracePeriodSeconds = 0 ) // IstioSpec defines the desired state of Istio @@ -86,9 +86,9 @@ type IstioUpdateStrategy struct { // Defines how many seconds the operator should wait before removing a non-active revision after all // the workloads have stopped using it. You may want to set this value on the order of minutes. - // The minimum and the default value is 30. + // The minimum is 0 and the default value is 30. // +operator-sdk:csv:customresourcedefinitions:type=spec,order=2,displayName="Inactive Revision Deletion Grace Period (seconds)",xDescriptors={"urn:alm:descriptor:com.tectonic.ui:number"} - // +kubebuilder:validation:Minimum=30 + // +kubebuilder:validation:Minimum=0 InactiveRevisionDeletionGracePeriodSeconds *int64 `json:"inactiveRevisionDeletionGracePeriodSeconds,omitempty"` // Defines whether the workloads should be moved from one control plane instance to another diff --git a/bundle/manifests/sailoperator.clusterserviceversion.yaml b/bundle/manifests/sailoperator.clusterserviceversion.yaml index b7706c278..54508937a 100644 --- a/bundle/manifests/sailoperator.clusterserviceversion.yaml +++ b/bundle/manifests/sailoperator.clusterserviceversion.yaml @@ -34,7 +34,7 @@ metadata: capabilities: Seamless Upgrades categories: OpenShift Optional, Integration & Delivery, Networking, Security containerImage: quay.io/maistra-dev/sail-operator:0.2-latest - createdAt: "2024-10-18T05:05:22Z" + createdAt: "2024-10-18T10:03:26Z" description: Experimental operator for installing Istio service mesh features.operators.openshift.io/cnf: "false" features.operators.openshift.io/cni: "true" @@ -256,7 +256,7 @@ spec: - description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. displayName: Inactive Revision Deletion Grace Period (seconds) path: updateStrategy.inactiveRevisionDeletionGracePeriodSeconds x-descriptors: @@ -329,7 +329,7 @@ spec: - description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. displayName: Inactive Revision Deletion Grace Period (seconds) path: updateStrategy.inactiveRevisionDeletionGracePeriodSeconds x-descriptors: diff --git a/bundle/manifests/sailoperator.io_istios.yaml b/bundle/manifests/sailoperator.io_istios.yaml index c82363824..f5e82d277 100644 --- a/bundle/manifests/sailoperator.io_istios.yaml +++ b/bundle/manifests/sailoperator.io_istios.yaml @@ -117,9 +117,9 @@ spec: description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. format: int64 - minimum: 30 + minimum: 0 type: integer type: default: InPlace diff --git a/bundle/manifests/sailoperator.io_remoteistios.yaml b/bundle/manifests/sailoperator.io_remoteistios.yaml index 3cf7d688a..a0a4ab8c3 100644 --- a/bundle/manifests/sailoperator.io_remoteistios.yaml +++ b/bundle/manifests/sailoperator.io_remoteistios.yaml @@ -108,9 +108,9 @@ spec: description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. format: int64 - minimum: 30 + minimum: 0 type: integer type: default: InPlace diff --git a/chart/crds/sailoperator.io_istios.yaml b/chart/crds/sailoperator.io_istios.yaml index 39ab1b09a..9054d6d29 100644 --- a/chart/crds/sailoperator.io_istios.yaml +++ b/chart/crds/sailoperator.io_istios.yaml @@ -117,9 +117,9 @@ spec: description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. format: int64 - minimum: 30 + minimum: 0 type: integer type: default: InPlace diff --git a/chart/crds/sailoperator.io_remoteistios.yaml b/chart/crds/sailoperator.io_remoteistios.yaml index f394984cf..ed5e65a39 100644 --- a/chart/crds/sailoperator.io_remoteistios.yaml +++ b/chart/crds/sailoperator.io_remoteistios.yaml @@ -108,9 +108,9 @@ spec: description: |- Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. - The minimum and the default value is 30. + The minimum is 0 and the default value is 30. format: int64 - minimum: 30 + minimum: 0 type: integer type: default: InPlace diff --git a/docs/api-reference/sailoperator.io.md b/docs/api-reference/sailoperator.io.md index 935f3a767..eda6e2f09 100644 --- a/docs/api-reference/sailoperator.io.md +++ b/docs/api-reference/sailoperator.io.md @@ -949,7 +949,7 @@ _Appears in:_ | Field | Description | Default | Validation | | --- | --- | --- | --- | | `type` _[UpdateStrategyType](#updatestrategytype)_ | Type of strategy to use. Can be "InPlace" or "RevisionBased". When the "InPlace" strategy is used, the existing Istio control plane is updated in-place. The workloads therefore don't need to be moved from one control plane instance to another. When the "RevisionBased" strategy is used, a new Istio control plane instance is created for every change to the Istio.spec.version field. The old control plane remains in place until all workloads have been moved to the new control plane instance. The "InPlace" strategy is the default. TODO: change default to "RevisionBased" | InPlace | Enum: [InPlace RevisionBased] | -| `inactiveRevisionDeletionGracePeriodSeconds` _integer_ | Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. The minimum and the default value is 30. | | Minimum: 30 | +| `inactiveRevisionDeletionGracePeriodSeconds` _integer_ | Defines how many seconds the operator should wait before removing a non-active revision after all the workloads have stopped using it. You may want to set this value on the order of minutes. The minimum is 0 and the default value is 30. | | Minimum: 0 | | `updateWorkloads` _boolean_ | Defines whether the workloads should be moved from one control plane instance to another automatically. If updateWorkloads is true, the operator moves the workloads from the old control plane instance to the new one after the new control plane is ready. If updateWorkloads is false, the user must move the workloads manually by updating the istio.io/rev labels on the namespace and/or the pods. Defaults to false. | | | diff --git a/tests/integration/api/istio_test.go b/tests/integration/api/istio_test.go index fa3bc39ed..d939f9cd3 100644 --- a/tests/integration/api/istio_test.go +++ b/tests/integration/api/istio_test.go @@ -39,7 +39,7 @@ var _ = Describe("Istio resource", Ordered, func() { istioNamespace = "istio-test" workloadNamespace = "istio-test-workloads" - gracePeriod = 30 * time.Second + gracePeriod = 5 * time.Second pilotImage = "sail-operator/test:latest" ) istioKey := client.ObjectKey{Name: istioName}