Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions api/v1alpha1/snapshot_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,25 @@ type SnapshotStatus struct {
// Conditions represent the latest available observations for the Snapshot
// +optional
Conditions []metav1.Condition `json:"conditions"`

// ParentSnapshots contains a map of ComponentGroups that are parents of the
// ComponentGroup for which the snapshot was created and their corresponding
// snapshots
ParentSnapshots map[string]ParentSnapshotData `json:"parentSnapshots,omitempty"`
}

type ParentSnapshotData struct {
// Name of the parent snapshot
// +optional
Name string `json:"name,omitempty"`

// Whether the Snapshot has been created
Created bool `json:"created"`

// If the snapshot could not be created, this will contain an error string
// If it was created, this will contain a success message
// +optional
Message string `json:"err,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
68 changes: 60 additions & 8 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions config/crd/bases/appstudio.redhat.com_snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,28 @@ spec:
- type
type: object
type: array
parentSnapshots:
additionalProperties:
properties:
created:
description: Whether the Snapshot has been created
type: boolean
err:
description: |-
If the snapshot could not be created, this will contain an error string
If it was created, this will contain a success message
type: string
name:
description: Name of the parent snapshot
type: string
required:
- created
type: object
description: |-
ParentSnapshots contains a map of ComponentGroups that are parents of the
ComponentGroup for which the snapshot was created and their corresponding
snapshots
type: object
type: object
type: object
served: true
Expand Down
22 changes: 22 additions & 0 deletions manifests/application-api-customresourcedefinitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,28 @@ spec:
- type
type: object
type: array
parentSnapshots:
additionalProperties:
properties:
created:
description: Whether the Snapshot has been created
type: boolean
err:
description: |-
If the snapshot could not be created, this will contain an error string
If it was created, this will contain a success message
type: string
name:
description: Name of the parent snapshot
type: string
required:
- created
type: object
description: |-
ParentSnapshots contains a map of ComponentGroups that are parents of the
ComponentGroup for which the snapshot was created and their corresponding
snapshots
type: object
type: object
type: object
served: true
Expand Down
Loading