SGDbOps does not set correctly the `.status.<op>.switchoverInitiated` field
Summary
Restart, minor version upgrade and security upgrade SGDbOps
does not set correctly the .status.<op>.switchoverInitiated
field.
Current Behaviour
The field documentation say that the switchoverInitiated
is "An ISO 8601 date indicating if and when the switchover took place". Instead a string value of true
is set when the switchover is completed.
Steps to reproduce
- Create an
SGCluster
- Create a restart, minor version upgrade or security upgrade
SGDbOps
Expected Behaviour
When the switchover is initiated the .status.<op>.switchoverInitiated
is set with the current ISO 8601 date.
Environment
- StackGres version: 1.0.0-beta3
- Kubernetes version: ?
- Cloud provider or hardware configuration: ?
Relevant logs and/or screenshots
$ kubectl explain sgdbops.status.restart.switchoverInitiated
KIND: SGDbOps
VERSION: stackgres.io/v1
FIELD: switchoverInitiated <string>
DESCRIPTION:
An ISO 8601 date indicating if and when the switchover took place
$ kubectl get sgdbops.stackgres.io minor-version-upgrade -o yaml
apiVersion: stackgres.io/v1
kind: SGDbOps
metadata:
creationTimestamp: "2021-07-29T10:04:20Z"
generation: 7
name: minor-version-upgrade
namespace: default
resourceVersion: "407079"
selfLink: /apis/stackgres.io/v1/namespaces/default/sgdbops/minor-version-upgrade
uid: 4e9eec3f-abeb-4c01-8b22-24016a84333e
spec:
maxRetries: 1
minorVersionUpgrade:
method: ReducedImpact
op: minorVersionUpgrade
sgCluster: stackgres
status:
conditions:
- lastTransitionTime: "2021-07-29T10:05:47.763585Z"
reason: OperationNotRunning
status: "False"
type: Running
- lastTransitionTime: "2021-07-29T10:05:47.763585Z"
reason: OperationCompleted
status: "True"
type: Completed
- lastTransitionTime: "2021-07-29T10:05:47.763585Z"
reason: OperationNotFailed
status: "False"
type: Failed
minorVersionUpgrade:
initialInstances:
- stackgres-0
pendingToRestartInstances: []
primaryInstance: stackgres-0
restartedInstances:
- stackgres-1
- stackgres-0
switchoverInitiated: "true"
opRetries: 0
opStarted: "2021-07-29T10:04:23.026526Z"
Edited by Matteo Melli