Skip to content

Commit

Permalink
chore: improve the code refactored for backup (#5306)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldming committed Nov 21, 2023
1 parent 915d33b commit 439fa12
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 21 deletions.
6 changes: 6 additions & 0 deletions helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ spec:
to connect to the target database cluster.
properties:
hostKey:
default: host
description: hostKey specifies the map key of the host in
the connection credential secret.
type: string
Expand All @@ -345,12 +346,17 @@ spec:
secretName:
description: secretName refers to the Secret object that contains
the connection credential.
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
usernameKey:
default: username
description: usernameKey specifies the map key of the user
in the connection credential secret.
type: string
required:
- passwordKey
- secretName
- usernameKey
type: object
podSelector:
description: podSelector is used to find the target pod. The volumes
Expand Down
6 changes: 6 additions & 0 deletions helm/crds/dataprotection.kubeblocks.io_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ spec:
to connect to the target database cluster.
properties:
hostKey:
default: host
description: hostKey specifies the map key of the host in
the connection credential secret.
type: string
Expand All @@ -540,12 +541,17 @@ spec:
secretName:
description: secretName refers to the Secret object that contains
the connection credential.
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
usernameKey:
default: username
description: usernameKey specifies the map key of the user
in the connection credential secret.
type: string
required:
- passwordKey
- secretName
- usernameKey
type: object
podSelector:
description: podSelector is used to find the target pod. The volumes
Expand Down
43 changes: 22 additions & 21 deletions helm/crds/dataprotection.kubeblocks.io_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
name: DURATION
type: string
- jsonPath: .metadata.creationTimestamp
name: CREATE-TIME
name: CREATION-TIME
type: string
- jsonPath: .status.completionTimestamp
name: COMPLETION-TIME
Expand All @@ -60,13 +60,13 @@ spec:
description: RestoreSpec defines the desired state of Restore
properties:
backup:
description: 'backup name, the following behavior based on the backup
type: 1. Full: will be restored the full backup directly. 2. Incremental:
will be restored sequentially from the most recent full backup of
this incremental backup. 3. Differential: will be restored sequentially
from the parent backup of the differential backup. 4. Continuous:
will find the most recent full backup at this time point and the
input continuous backup to restore.'
description: 'backup to be restored. The restore behavior based on
the backup type: 1. Full: will be restored the full backup directly.
2. Incremental: will be restored sequentially from the most recent
full backup of this incremental backup. 3. Differential: will be
restored sequentially from the parent backup of the differential
backup. 4. Continuous: will find the most recent full backup at
this time point and the continuous backups after it to restore.'
properties:
name:
description: backup name
Expand Down Expand Up @@ -132,7 +132,7 @@ spec:
env:
description: 'list of environment variables to set in the container
for restore and will be merged with the env of Backup and ActionSet.
the priority of merging is as follows: Restore env > Backup env
The priority of merging is as follows: Restore env > Backup env
> ActionSet env.'
items:
description: EnvVar represents an environment variable present in
Expand Down Expand Up @@ -1433,7 +1433,7 @@ spec:
volumeClaimManagementPolicy:
default: Parallel
description: 'VolumeClaimManagementPolicy defines recovery strategy
for persistent volume claim. supported policies are as follows:
for persistent volume claim. Supported policies are as follows:
1. Parallel: parallel recovery of persistent volume claim. 2.
Serial: restore the persistent volume claim in sequence, and
wait until the previous persistent volume claim is restored
Expand Down Expand Up @@ -2016,33 +2016,34 @@ spec:
readyConfig:
description: configuration for the action of "postReady" phase.
properties:
connectCredential:
connectionCredential:
description: credential template used for creating a connection
credential
properties:
hostKey:
default: host
description: hostKey the map key of the host in the connection
credential secret
description: hostKey specifies the map key of the host in
the connection credential secret.
type: string
passwordKey:
default: password
description: passwordKey the map key of the password in the
connection credential secret
description: passwordKey specifies the map key of the password
in the connection credential secret.
type: string
portKey:
default: port
description: portKey the map key of the port in the connection
credential secret
description: portKey specifies the map key of the port in
the connection credential secret.
type: string
secretName:
description: the secret name
description: secretName refers to the Secret object that contains
the connection credential.
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
usernameKey:
default: username
description: usernameKey the map key of the user in the connection
credential secret
description: usernameKey specifies the map key of the user
in the connection credential secret.
type: string
required:
- passwordKey
Expand Down Expand Up @@ -2322,7 +2323,7 @@ spec:
- message: forbidden to update spec.resources
rule: self == oldSelf
restoreTime:
description: restore according to a specified point in time.
description: restoreTime is the point in time for restoring.
pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$
type: string
x-kubernetes-validations:
Expand Down

0 comments on commit 439fa12

Please sign in to comment.