K8SPSMDB-1542: use startingDeadlineSeconds for PBM#2156
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new configurable field pbmStartingDeadlineSeconds to the BackupSpec API, allowing users to customize the timeout for backups stuck in the "starting" state. The default timeout remains 120 seconds, with the ability to override it at the cluster backup specification level.
Key Changes
- New
PBMStartingDeadlineSecondsfield added to BackupSpec with int64 type - Updated backup status logic to use the configurable timeout instead of hardcoded value
- Test coverage added for custom deadline scenarios
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/apis/psmdb/v1/psmdb_types.go | Adds PBMStartingDeadlineSeconds field to BackupSpec struct |
| pkg/apis/psmdb/v1/zz_generated.deepcopy.go | Auto-generated DeepCopy method for the new field |
| pkg/controller/perconaservermongodbbackup/backup.go | Updates timeout logic to use configurable value with default fallback |
| pkg/controller/perconaservermongodbbackup/psmdb_backup_controller.go | Passes cluster parameter to Status method |
| pkg/controller/perconaservermongodbbackup/backup_test.go | Adds test case for custom deadline scenario |
| config/crd/bases/psmdb.percona.com_perconaservermongodbs.yaml | Adds CRD schema definition for new field |
| deploy/crd.yaml | Adds CRD schema definition for new field |
| deploy/bundle.yaml | Adds CRD schema definition for new field |
| deploy/cw-bundle.yaml | Adds CRD schema definition for new field |
| e2e-tests/version-service/conf/crd.yaml | Adds CRD schema definition for new field |
| deploy/cr.yaml | Adds commented example configuration with default value |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pbmStartingDeadlineSeconds fieldstartingDeadlineSeconds for PBM
| Configuration BackupConfig `json:"configuration,omitempty"` | ||
| VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` | ||
| StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty"` | ||
| // +kubebuilder:validation:Minimum=1 |
There was a problem hiding this comment.
| // +kubebuilder:validation:Minimum=1 | |
| // +kubebuilder:validation:Minimum=1 | |
| // +kubebuilder:default:=120 |
mayankshah1607
left a comment
There was a problem hiding this comment.
LGTM, just one suggestion
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: 29266b5 |
https://perconadev.atlassian.net/browse/K8SPSMDB-1542
DESCRIPTION
This PR makes operator to use a
.spec.backup.startingDeadlineSecondsas a deadline for PBM backup being in starting status. If this field is not specified, it defaults to 120 secondsCHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability