Skip to content

Commit

Permalink
Add InstanceSnapshot status validation
Browse files Browse the repository at this point in the history
  • Loading branch information
air-31 authored and kingmakerbot committed Nov 14, 2024
1 parent 8336a5f commit 46049e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions operators/api/v1alpha2/instancesnapshot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:validation:Enum="";"Pending";"Processing";"Completed";"Failed"

// SnapshotStatus is an enumeration representing the current state of the InstanceSnapshot.
type SnapshotStatus string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ spec:
properties:
phase:
description: Phase represents the current state of the Instance Snapshot.
enum:
- ""
- Pending
- Processing
- Completed
- Failed
type: string
required:
- phase
Expand Down

0 comments on commit 46049e2

Please sign in to comment.