Commit ed8214c7 authored by Edmund Ochieng's avatar Edmund Ochieng

populate kubectl explain output for GLBackup resource

parent 6e0aa36e
......@@ -31,12 +31,13 @@ type GLBackupSpec struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Backup Schedule",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
Schedule string `json:"schedule,omitempty"`
// Comma separated list of components to omit from backup
// Comma-separated list of components to omit from backup.
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Backup Exclusions",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
Exclusions string `json:"skip,omitempty"`
// Prefix for the backup job
// Can be used when restoring backup
// If specified, overrides the timestamp of a backup.
// Forms the prefix of the backup e.g. '<timestamp-override-value>_gitlab_backup.tar'.
// Can also be specified to target a specific backup to be restored
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Backup Timestamp",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
Timestamp string `json:"timestamp,omitempty"`
......@@ -44,7 +45,8 @@ type GLBackupSpec struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Backup URL",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
URL string `json:"url,omitempty"`
// Restore when set to true the backup defined by
// If set to true, informs GitLab operator to perform a backup restore.
// Defaults to false or performing a backup.
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Backup Restore",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
Restore bool `json:"restore,omitempty"`
}
......@@ -68,7 +70,7 @@ const (
// GLBackupStatus defines the observed state of GLBackup
type GLBackupStatus struct {
// Reports status of backup task
// Reports status of backup job
// +kubebuilder:validation:Enum=Running;Completed;Scheduled;Failed
// +operator-sdk:csv:customresourcedefinitions:type=status,displayName="Backup Status",xDescriptors="urn:alm:descriptor:com.tectonic.ui:text"
Phase BackupState `json:"phase,omitempty"`
......@@ -88,12 +90,15 @@ type GLBackupStatus struct {
// +operator-sdk:csv:customresourcedefinitions:displayName="GitLab Backup"
// +operator-sdk:csv:customresourcedefinitions:resources={{Job,v1,""},{CronJob,v1beta1,""},{ConfigMap,v1,""}}
// GLBackup is the Schema for the glbackups API
// GLBackup resource backups and restores a GitLab instance
type GLBackup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GLBackupSpec `json:"spec,omitempty"`
// Specification of the desired behavior of a GitLab Backup
Spec GLBackupSpec `json:"spec,omitempty"`
// Most recently observed status of the GitLab Backup.
// It is read-only to the user
Status GLBackupStatus `json:"status,omitempty"`
}
......
......@@ -20,7 +20,7 @@ spec:
status: {}
validation:
openAPIV3Schema:
description: GLBackup is the Schema for the glbackups API
description: GLBackup resource backups and restores a GitLab instance
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
......@@ -31,22 +31,22 @@ spec:
metadata:
type: object
spec:
description: GLBackupSpec defines the desired state of GLBackup
description: Specification of the desired behavior of a GitLab Backup
properties:
instance:
description: Name of GitLab instance to backup
type: string
restore:
description: Restore when set to true the backup defined by
description: If set to true, informs GitLab operator to perform a backup restore. Defaults to false or performing a backup.
type: boolean
schedule:
description: Backup schedule in cron format. Leave blank for one time on-demand backup
type: string
skip:
description: Comma separated list of components to omit from backup
description: Comma-separated list of components to omit from backup.
type: string
timestamp:
description: Prefix for the backup job Can be used when restoring backup
description: If specified, overrides the timestamp of a backup. Forms the prefix of the backup e.g. '<timestamp-override-value>_gitlab_backup.tar'. Can also be specified to target a specific backup to be restored
type: string
url:
description: The URL of the backup resource to be restored
......@@ -55,13 +55,13 @@ spec:
- instance
type: object
status:
description: GLBackupStatus defines the observed state of GLBackup
description: Most recently observed status of the GitLab Backup. It is read-only to the user
properties:
completedAt:
description: Displays time the backup completed
type: string
phase:
description: Reports status of backup task
description: Reports status of backup job
enum:
- Running
- Completed
......
......@@ -172,7 +172,7 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
version: v1beta1
- description: GLBackup is the Schema for the glbackups API
- description: GLBackup resource backups and restores a GitLab instance
displayName: GitLab Backup
kind: GLBackup
name: glbackups.apps.gitlab.com
......@@ -192,7 +192,7 @@ spec:
path: instance
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Restore when set to true the backup defined by
- description: If set to true, informs GitLab operator to perform a backup restore. Defaults to false or performing a backup.
displayName: Backup Restore
path: restore
x-descriptors:
......@@ -202,12 +202,12 @@ spec:
path: schedule
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Comma separated list of components to omit from backup
- description: Comma-separated list of components to omit from backup.
displayName: Backup Exclusions
path: skip
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Prefix for the backup job Can be used when restoring backup
- description: If specified, overrides the timestamp of a backup. Forms the prefix of the backup e.g. '<timestamp-override-value>_gitlab_backup.tar'. Can also be specified to target a specific backup to be restored
displayName: Backup Timestamp
path: timestamp
x-descriptors:
......@@ -223,7 +223,7 @@ spec:
path: completedAt
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Reports status of backup task
- description: Reports status of backup job
displayName: Backup Status
path: phase
x-descriptors:
......
......@@ -21,7 +21,7 @@ spec:
status: {}
validation:
openAPIV3Schema:
description: GLBackup is the Schema for the glbackups API
description: GLBackup resource backups and restores a GitLab instance
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
......@@ -36,23 +36,26 @@ spec:
metadata:
type: object
spec:
description: GLBackupSpec defines the desired state of GLBackup
description: Specification of the desired behavior of a GitLab Backup
properties:
instance:
description: Name of GitLab instance to backup
type: string
restore:
description: Restore when set to true the backup defined by
description: If set to true, informs GitLab operator to perform a backup
restore. Defaults to false or performing a backup.
type: boolean
schedule:
description: Backup schedule in cron format. Leave blank for one time
on-demand backup
type: string
skip:
description: Comma separated list of components to omit from backup
description: Comma-separated list of components to omit from backup.
type: string
timestamp:
description: Prefix for the backup job Can be used when restoring backup
description: If specified, overrides the timestamp of a backup. Forms
the prefix of the backup e.g. '<timestamp-override-value>_gitlab_backup.tar'.
Can also be specified to target a specific backup to be restored
type: string
url:
description: The URL of the backup resource to be restored
......@@ -61,13 +64,14 @@ spec:
- instance
type: object
status:
description: GLBackupStatus defines the observed state of GLBackup
description: Most recently observed status of the GitLab Backup. It is read-only
to the user
properties:
completedAt:
description: Displays time the backup completed
type: string
phase:
description: Reports status of backup task
description: Reports status of backup job
enum:
- Running
- Completed
......
......@@ -168,7 +168,7 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
version: v1beta1
- description: GLBackup is the Schema for the glbackups API
- description: GLBackup resource backups and restores a GitLab instance
displayName: GitLab Backup
kind: GLBackup
name: glbackups.apps.gitlab.com
......@@ -188,7 +188,7 @@ spec:
path: instance
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Restore when set to true the backup defined by
- description: If set to true, informs GitLab operator to perform a backup restore. Defaults to false or performing a backup.
displayName: Backup Restore
path: restore
x-descriptors:
......@@ -198,12 +198,12 @@ spec:
path: schedule
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Comma separated list of components to omit from backup
- description: Comma-separated list of components to omit from backup.
displayName: Backup Exclusions
path: skip
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Prefix for the backup job Can be used when restoring backup
- description: If specified, overrides the timestamp of a backup. Forms the prefix of the backup e.g. '<timestamp-override-value>_gitlab_backup.tar'. Can also be specified to target a specific backup to be restored
displayName: Backup Timestamp
path: timestamp
x-descriptors:
......@@ -219,7 +219,7 @@ spec:
path: completedAt
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:text
- description: Reports status of backup task
- description: Reports status of backup job
displayName: Backup Status
path: phase
x-descriptors:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment