Skip to content

Commit

Permalink
feat(cluster-backup): addressed review comments
Browse files Browse the repository at this point in the history
Signed-off-by: rajaSahil <[email protected]>
  • Loading branch information
rajaSahil committed Feb 4, 2025
1 parent 6712bcd commit 1c642a0
Show file tree
Hide file tree
Showing 15 changed files with 1,000 additions and 150 deletions.
130 changes: 113 additions & 17 deletions modules/api/cmd/kubermatic-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -8721,12 +8721,9 @@
],
"responses": {
"200": {
"description": "BackupStorageLocation",
"description": "BackupStorageLocationList",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/BackupStorageLocation"
}
"$ref": "#/definitions/BackupStorageLocationList"
}
},
"401": {
Expand Down Expand Up @@ -8772,7 +8769,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BslBody"
"$ref": "#/definitions/BSLBody"
}
}
],
Expand Down Expand Up @@ -8851,6 +8848,56 @@
}
}
}
},
"delete": {
"description": "Delete a backup storage location object present in the cluster specified by bsl_name. Only available in Kubermatic Enterprise Edition",
"produces": [
"application/json"
],
"tags": [
"backupstoragelocation"
],
"operationId": "deleteBackupStorageLocation",
"parameters": [
{
"type": "string",
"x-go-name": "ProjectID",
"name": "project_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "ClusterID",
"name": "cluster_id",
"in": "path",
"required": true
},
{
"type": "string",
"x-go-name": "BSLName",
"name": "bsl_name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/empty"
},
"401": {
"$ref": "#/responses/empty"
},
"403": {
"$ref": "#/responses/empty"
},
"default": {
"description": "errorResponse",
"schema": {
"$ref": "#/definitions/errorResponse"
}
}
}
}
},
"/api/v2/projects/{project_id}/clusters/{cluster_id}/bindings": {
Expand Down Expand Up @@ -28780,6 +28827,19 @@
},
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v1"
},
"BSLBody": {
"type": "object",
"properties": {
"bslSpec": {
"$ref": "#/definitions/BackupStorageLocationSpec"
},
"cbslName": {
"type": "string",
"x-go-name": "CBSLName"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/ee/clusterbackup/backupstoragelocation"
},
"BackupConfig": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -28909,9 +28969,9 @@
"type": "object",
"title": "BackupStorageLocation is the object representing a Backup Storage Location.",
"properties": {
"displayName": {
"cbslName": {
"type": "string",
"x-go-name": "DisplayName"
"x-go-name": "CBSLName"
},
"name": {
"type": "string",
Expand All @@ -28932,6 +28992,51 @@
"title": "BackupStorageLocationAccessMode represents the permissions for a BackupStorageLocation.",
"x-go-package": "github.com/vmware-tanzu/velero/pkg/apis/velero/v1"
},
"BackupStorageLocationList": {
"type": "object",
"title": "BackupStorageLocationList is the list of object representing a Backup Storage Location overview.",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/BackupStorageLocationOverview"
},
"x-go-name": "Items"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v2"
},
"BackupStorageLocationOverview": {
"description": "BackupStorageLocationOverview is the object representing a Backup Storage Location overview for a list",
"type": "object",
"properties": {
"cbslName": {
"type": "string",
"x-go-name": "CBSLName"
},
"creationTime": {
"type": "string",
"format": "date-time",
"x-go-name": "CreationDate"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"prefix": {
"type": "string",
"x-go-name": "Prefix"
},
"region": {
"type": "string",
"x-go-name": "Region"
},
"status": {
"$ref": "#/definitions/BackupStorageLocationStatus"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v2"
},
"BackupStorageLocationPhase": {
"description": "+kubebuilder:validation:Enum=Available;Unavailable\n+kubebuilder:default=Unavailable",
"type": "string",
Expand Down Expand Up @@ -29065,15 +29170,6 @@
"type": "object",
"x-go-package": "k8c.io/dashboard/v2/pkg/api/v2"
},
"BslBody": {
"type": "object",
"properties": {
"bslSpec": {
"$ref": "#/definitions/BackupStorageLocationSpec"
}
},
"x-go-package": "k8c.io/dashboard/v2/pkg/ee/clusterbackup/backupstoragelocation"
},
"ByPodStatus": {
"description": "ByPodStatus defines the observed state of ConstraintTemplate as seen by\nan individual controller\n+kubebuilder:pruning:PreserveUnknownFields",
"type": "object",
Expand Down
25 changes: 21 additions & 4 deletions modules/api/pkg/api/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2292,8 +2292,25 @@ type BackupDownloadUrl struct {
// BackupStorageLocation is the object representing a Backup Storage Location.
// swagger:model BackupStorageLocation
type BackupStorageLocation struct {
Name string `json:"name,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Spec velerov1.BackupStorageLocationSpec `json:"spec,omitempty"`
Status velerov1.BackupStorageLocationStatus `json:"status"`
Name string `json:"name"`
CBSLName string `json:"cbslName,omitempty"`
Spec velerov1.BackupStorageLocationSpec `json:"spec,omitempty"`
Status velerov1.BackupStorageLocationStatus `json:"status,omitempty"`
}

// BackupStorageLocationOverview is the object representing a Backup Storage Location overview for a list
// swagger:model BackupStorageLocationOverview
type BackupStorageLocationOverview struct {
Name string `json:"name"`
CBSLName string `json:"cbslName,omitempty"`
Prefix string `json:"prefix,omitempty"`
Region string `json:"region,omitempty"`
CreationDate time.Time `json:"creationTime,omitempty"`
Status velerov1.BackupStorageLocationStatus `json:"status,omitempty"`
}

// BackupStorageLocationList is the list of object representing a Backup Storage Location overview.
// swagger:model BackupStorageLocationList
type BackupStorageLocationList struct {
Items []BackupStorageLocationOverview `json:"items"`
}
Loading

0 comments on commit 1c642a0

Please sign in to comment.