Pause Reconciliation
The DataPower Operator’s reconciliation of the DataPower StatefulSet can be paused, allowing you to modify the StatefulSet directly for troubleshooting purposes.
Background
While the DataPowerService
CRD exposes a handful of helpful troubleshooting capabilities such as init script debugging and lifecycle hooks, there are cases where it’s necessary to modify the StatefulSet directly to troubleshoot an issue. This can lead to conflict with the DataPower Operator’s reconciliation of the StatefulSet, because any changes made to the StatefulSet directly can be overwritten by the operator.
Pausing reconciliation
To pause reconciliation of the DataPowerService
custom resource, and the owned StatefulSet, an annotation can be added to the DataPowerService
instance. There are two mechanisms supported: auto-expiring pause and indefinite pause.
Both pause mechanisms use the same annotation key: datapower.ibm.com/pause
. The difference in their behavior is determined by the value specified in the annotation.
Auto-expiring pause
Reconciliation can be paused for a duration of time, after which the pause will lift automatically. Once the time duration expires, the pause annotation is automatically removed by the operator and reconciliation of the StatefulSet will resume automatically.
The syntax for specifying an auto-expiring pause is as follows:
apiVersion: datapower.ibm.com/v1beta3kind: DataPowerServicemetadata:annotations:datapower.ibm.com/pause: <duration>
where <duration>
is a sequence of decimal numbers with time unit suffix.
Valid time units are s
, m
, h
. Some examples:
10m
would pause for 10 minutes120s
would pause for 120 seconds1h30m
would pause for 1 hour 30 minutes
Once the datapower.ibm.com/pause
annotation is added, the operator will generate a second annotation that indicates the expiration timestamp. Below is an example of an instance that has been paused for 10 minutes, and has the pause-expiration
timestamp added.
apiVersion: datapower.ibm.com/v1beta3kind: DataPowerServicemetadata:annotations:datapower.ibm.com/pause: 10mdatapower.ibm.com/pause-expiration: "2021-03-03T20:41:32Z"
During the time period that reconciliation is paused, a Warning
condition will be raised on the DataPowerService
instance, for example:
status:conditions:- lastTransitionTime: "2021-03-03T20:31:33Z"message: Reconciliation is paused until 2021-03-03T20:41:32Zreason: ReconcileWarningstatus: "True"type: Warning
Indefinite pause
Reconciliation can be paused indefinitely, meaning that the user must manually remove the annotation to resume normal operation. Once the annotation is removed by the user, reconciliation of the StatefulSet resumes normally.
The syntax for specifying an indefinite pause is as follows:
apiVersion: datapower.ibm.com/v1beta3kind: DataPowerServicemetadata:annotations:datapower.ibm.com/pause: "true"
Once this annotation is added, reconciliation will be paused indefinitely, until the annotation is removed by the user. During this time, a Warning
condition will be raised on the DataPowerService
instance indicating the status:
status:conditions:- lastTransitionTime: "2021-03-03T20:43:45Z"message: Reconciliation is paused indefinitelyreason: ReconcileWarningstatus: "True"type: Warning