-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add velero analyzer (#806) * updated schema * analyzer without collector * tests * covers deprecated Restic repository type * velero version from deployment image to check deprecated type * read for both velero pod kinds (velero*, node-agent*) --------- Signed-off-by: Archit Sharma <[email protected]>
- Loading branch information
Archit Sharma
authored
Nov 3, 2023
1 parent
a7bb9ea
commit 7038da8
Showing
17 changed files
with
1,987 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package analyzer | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// ResticRepositorySpec is the specification for a ResticRepository. | ||
type ResticRepositorySpec struct { | ||
// VolumeNamespace is the namespace this restic repository contains | ||
// pod volume backups for. | ||
VolumeNamespace string `json:"volumeNamespace"` | ||
|
||
// BackupStorageLocation is the name of the BackupStorageLocation | ||
// that should contain this repository. | ||
BackupStorageLocation string `json:"backupStorageLocation"` | ||
|
||
// ResticIdentifier is the full restic-compatible string for identifying | ||
// this repository. | ||
ResticIdentifier string `json:"resticIdentifier"` | ||
|
||
// MaintenanceFrequency is how often maintenance should be run. | ||
MaintenanceFrequency metav1.Duration `json:"maintenanceFrequency"` | ||
} | ||
|
||
// ResticRepositoryPhase represents the lifecycle phase of a ResticRepository. | ||
// +kubebuilder:validation:Enum=New;Ready;NotReady | ||
type ResticRepositoryPhase string | ||
|
||
const ( | ||
ResticRepositoryPhaseNew ResticRepositoryPhase = "New" | ||
ResticRepositoryPhaseReady ResticRepositoryPhase = "Ready" | ||
ResticRepositoryPhaseNotReady ResticRepositoryPhase = "NotReady" | ||
) | ||
|
||
// ResticRepositoryStatus is the current status of a ResticRepository. | ||
type ResticRepositoryStatus struct { | ||
// Phase is the current state of the ResticRepository. | ||
// +optional | ||
Phase ResticRepositoryPhase `json:"phase,omitempty"` | ||
|
||
// Message is a message about the current status of the ResticRepository. | ||
// +optional | ||
Message string `json:"message,omitempty"` | ||
|
||
// LastMaintenanceTime is the last time maintenance was run. | ||
// +optional | ||
// +nullable | ||
LastMaintenanceTime *metav1.Time `json:"lastMaintenanceTime,omitempty"` | ||
} | ||
|
||
type ResticRepository struct { | ||
metav1.TypeMeta `json:",inline"` | ||
|
||
// +optional | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// +optional | ||
Spec ResticRepositorySpec `json:"spec,omitempty"` | ||
|
||
// +optional | ||
Status ResticRepositoryStatus `json:"status,omitempty"` | ||
} |
Oops, something went wrong.