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

Reduce minimum deletion grace period to 0s #436

Merged
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
6 changes: 3 additions & 3 deletions api/v1alpha1/istio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
UpdateStrategyTypeRevisionBased UpdateStrategyType = "RevisionBased"

DefaultRevisionDeletionGracePeriodSeconds = 30
MinRevisionDeletionGracePeriodSeconds = 30
MinRevisionDeletionGracePeriodSeconds = 0
)

// IstioSpec defines the desired state of Istio
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions bundle/manifests/sailoperator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bundle/manifests/sailoperator.io_istios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bundle/manifests/sailoperator.io_remoteistios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions chart/crds/sailoperator.io_istios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions chart/crds/sailoperator.io_remoteistios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/sailoperator.io.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | | |


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/api/istio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down