Skip to content

Commit

Permalink
Add manifest option for workload
Browse files Browse the repository at this point in the history
Signed-off-by: Md. Ishtiaq Islam <[email protected]>
  • Loading branch information
ishtiaqhimel committed Sep 20, 2024
1 parent 1475cef commit e6bc585
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
16 changes: 13 additions & 3 deletions apis/core/v1alpha1/restoresession_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ type RestoreSessionSpec struct {
}

type ManifestRestoreOptions struct {
// Workload specifies the options for Workload components to restore in manifest restore
// +optional
Workload *WorkloadManifestOptions `json:"workload,omitempty"`

// MongoDB specifies the options for selecting particular MongoDB components to restore in manifest restore
// +optional
MongoDB *KubeDBManifestOptions `json:"mongoDB,omitempty"`
Expand Down Expand Up @@ -108,9 +112,15 @@ type ManifestRestoreOptions struct {
Redis *KubeDBManifestOptions `json:"redis,omitempty"`
}

type WorkloadManifestOptions struct {
// RestoreNamespace specifies the Namespace where the restored files will be applied
// +optional
RestoreNamespace string `json:"restoreNamespace,omitempty"`
}

type MSSQLServerManifestOptions struct {
// RestoreNamespace specifies the Namespace where the restored files will be applied
//+optional
// +optional
RestoreNamespace string `json:"restoreNamespace,omitempty"`

// DB specifies whether to restore the DB manifest or not
Expand Down Expand Up @@ -142,7 +152,7 @@ type MSSQLServerManifestOptions struct {

type DruidManifestOptions struct {
// RestoreNamespace specifies the Namespace where the restored files will be applied
//+optional
// +optional
RestoreNamespace string `json:"restoreNamespace,omitempty"`

// DB specifies whether to restore the DB manifest or not
Expand Down Expand Up @@ -180,7 +190,7 @@ type DruidManifestOptions struct {

type KubeDBManifestOptions struct {
// RestoreNamespace specifies the Namespace where the restored files will be applied
//+optional
// +optional
RestoreNamespace string `json:"restoreNamespace,omitempty"`

// DB specifies whether to restore the DB manifest or not
Expand Down
20 changes: 20 additions & 0 deletions apis/core/v1alpha1/zz_generated.deepcopy.go

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

9 changes: 9 additions & 0 deletions crds/core.kubestash.com_restoresessions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24464,6 +24464,15 @@ spec:
type: object
x-kubernetes-map-type: atomic
type: object
workload:
description: Workload specifies the options for Workload components
to restore in manifest restore
properties:
restoreNamespace:
description: RestoreNamespace specifies the Namespace where
the restored files will be applied
type: string
type: object
zooKeeper:
description: ZooKeeper specifies the options for selecting particular
ZooKeeper components to restore in manifest restore
Expand Down

0 comments on commit e6bc585

Please sign in to comment.