Skip to content

Commit

Permalink
OADP-3379: fix wrong descriptions on time fields (#1296)
Browse files Browse the repository at this point in the history
* fix: OADP-3379 fix wrong descriptions on time fields

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: OADP-3379 fix wrong descriptions on time fields

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

* fixup! fix: OADP-3379 fix wrong descriptions on time fields

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>

---------

Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
  • Loading branch information
mateusoliveira43 committed Feb 9, 2024
1 parent da83a07 commit 314cb26
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 30 deletions.
20 changes: 10 additions & 10 deletions bundle/manifests/oadp.openshift.io_dataprotectionapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ spec:
description: log to standard error as well as files (no effect when -logtostderr=true)
type: boolean
backup-sync-period:
description: How often to ensure all Velero backups in object storage exist as Backup API objects in the cluster. This is the default sync period if none is explicitly specified for a backup storage location.
description: How often (in nanoseconds) to ensure all Velero backups in object storage exist as Backup API objects in the cluster. This is the default sync period if none is explicitly specified for a backup storage location.
format: int64
type: integer
client-burst:
Expand All @@ -509,15 +509,15 @@ spec:
description: Show colored output in TTY
type: boolean
default-backup-ttl:
description: default 720h0m0s
description: How long (in nanoseconds) to wait by default before backups can be garbage collected. (default is 720 hours)
format: int64
type: integer
default-item-operation-timeout:
description: How long to wait on asynchronous BackupItemActions and RestoreItemActions to complete before timing out. (default 1h0m0s)
description: How long (in nanoseconds) to wait on asynchronous BackupItemActions and RestoreItemActions to complete before timing out. (default is 1 hour)
format: int64
type: integer
default-repo-maintain-frequency:
description: How often 'maintain' is run for backup repositories by default.
description: How often (in nanoseconds) 'maintain' is run for backup repositories by default.
format: int64
type: integer
default-volumes-to-fs-backup:
Expand All @@ -542,15 +542,15 @@ spec:
type: string
type: array
fs-backup-timeout:
description: How long pod volume file system backups/restores should be allowed to run before timing out. (default 4h0m0s)
description: How long (in nanoseconds) pod volume file system backups/restores should be allowed to run before timing out. (default is 4 hours)
format: int64
type: integer
garbage-collection-frequency:
description: How long to wait by default before backups can be garbage collected. (default 720h0m0s)
description: How long (in nanoseconds) to wait by default before backups can be garbage collected. (default is 720 hours)
format: int64
type: integer
item-operation-sync-frequency:
description: How often to check status on backup/restore operations after backup/restore processing.
description: How often (in nanoseconds) to check status on backup/restore operations after backup/restore processing.
format: int64
type: integer
log-format:
Expand Down Expand Up @@ -589,7 +589,7 @@ spec:
description: The address to expose the pprof profiler.
type: string
resource-timeout:
description: How long to wait for resource processes which are not covered by other specific timeout parameters. Default is 10 minutes. (default 10m0s)
description: How long (in nanoseconds) to wait for resource processes which are not covered by other specific timeout parameters. (default is 10 minutes)
format: int64
type: integer
restore-resource-priorities:
Expand All @@ -605,11 +605,11 @@ spec:
description: logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=false) (default 2)
type: integer
store-validation-frequency:
description: How often to verify if the storage is valid. Optional. Set this to `0s` to disable sync. Default 1 minute.
description: How often (in nanoseconds) to verify if the storage is valid. Optional. Set this to `0` to disable sync. (default is 1 minute)
format: int64
type: integer
terminating-resource-timeout:
description: How long to wait on persistent volumes and namespaces to terminate during a restore before timing out.
description: How long (in nanoseconds) to wait on persistent volumes and namespaces to terminate during a restore before timing out.
format: int64
type: integer
v:
Expand Down
20 changes: 10 additions & 10 deletions config/crd/bases/oadp.openshift.io_dataprotectionapplications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ spec:
description: log to standard error as well as files (no effect when -logtostderr=true)
type: boolean
backup-sync-period:
description: How often to ensure all Velero backups in object storage exist as Backup API objects in the cluster. This is the default sync period if none is explicitly specified for a backup storage location.
description: How often (in nanoseconds) to ensure all Velero backups in object storage exist as Backup API objects in the cluster. This is the default sync period if none is explicitly specified for a backup storage location.
format: int64
type: integer
client-burst:
Expand All @@ -509,15 +509,15 @@ spec:
description: Show colored output in TTY
type: boolean
default-backup-ttl:
description: default 720h0m0s
description: How long (in nanoseconds) to wait by default before backups can be garbage collected. (default is 720 hours)
format: int64
type: integer
default-item-operation-timeout:
description: How long to wait on asynchronous BackupItemActions and RestoreItemActions to complete before timing out. (default 1h0m0s)
description: How long (in nanoseconds) to wait on asynchronous BackupItemActions and RestoreItemActions to complete before timing out. (default is 1 hour)
format: int64
type: integer
default-repo-maintain-frequency:
description: How often 'maintain' is run for backup repositories by default.
description: How often (in nanoseconds) 'maintain' is run for backup repositories by default.
format: int64
type: integer
default-volumes-to-fs-backup:
Expand All @@ -542,15 +542,15 @@ spec:
type: string
type: array
fs-backup-timeout:
description: How long pod volume file system backups/restores should be allowed to run before timing out. (default 4h0m0s)
description: How long (in nanoseconds) pod volume file system backups/restores should be allowed to run before timing out. (default is 4 hours)
format: int64
type: integer
garbage-collection-frequency:
description: How long to wait by default before backups can be garbage collected. (default 720h0m0s)
description: How long (in nanoseconds) to wait by default before backups can be garbage collected. (default is 720 hours)
format: int64
type: integer
item-operation-sync-frequency:
description: How often to check status on backup/restore operations after backup/restore processing.
description: How often (in nanoseconds) to check status on backup/restore operations after backup/restore processing.
format: int64
type: integer
log-format:
Expand Down Expand Up @@ -589,7 +589,7 @@ spec:
description: The address to expose the pprof profiler.
type: string
resource-timeout:
description: How long to wait for resource processes which are not covered by other specific timeout parameters. Default is 10 minutes. (default 10m0s)
description: How long (in nanoseconds) to wait for resource processes which are not covered by other specific timeout parameters. (default is 10 minutes)
format: int64
type: integer
restore-resource-priorities:
Expand All @@ -605,11 +605,11 @@ spec:
description: logs at or above this threshold go to stderr when writing to files and stderr (no effect when -logtostderr=true or -alsologtostderr=false) (default 2)
type: integer
store-validation-frequency:
description: How often to verify if the storage is valid. Optional. Set this to `0s` to disable sync. Default 1 minute.
description: How often (in nanoseconds) to verify if the storage is valid. Optional. Set this to `0` to disable sync. (default is 1 minute)
format: int64
type: integer
terminating-resource-timeout:
description: How long to wait on persistent volumes and namespaces to terminate during a restore before timing out.
description: How long (in nanoseconds) to wait on persistent volumes and namespaces to terminate during a restore before timing out.
format: int64
type: integer
v:
Expand Down
89 changes: 89 additions & 0 deletions controllers/velero_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4018,6 +4018,95 @@ func TestDPAReconciler_buildVeleroDeployment(t *testing.T) {
},
},
},
{
name: "Check values of time fields in Velero args",
veleroDeployment: &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "test-velero-deployment",
Namespace: "test-ns",
},
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{MatchLabels: veleroDeploymentMatchLabels},
},
},
dpa: &oadpv1alpha1.DataProtectionApplication{
ObjectMeta: metav1.ObjectMeta{
Name: "test-Velero-CR",
Namespace: "test-ns",
},
Spec: oadpv1alpha1.DataProtectionApplicationSpec{
Configuration: &oadpv1alpha1.ApplicationConfig{
Velero: &oadpv1alpha1.VeleroConfig{
Args: &server.Args{
ServerConfig: server.ServerConfig{
BackupSyncPeriod: pointer.Duration(1),
PodVolumeOperationTimeout: pointer.Duration(1),
ResourceTerminatingTimeout: pointer.Duration(1),
DefaultBackupTTL: pointer.Duration(1),
StoreValidationFrequency: pointer.Duration(1),
ItemOperationSyncFrequency: pointer.Duration(1),
RepoMaintenanceFrequency: pointer.Duration(1),
GarbageCollectionFrequency: pointer.Duration(1),
DefaultItemOperationTimeout: pointer.Duration(1),
ResourceTimeout: pointer.Duration(1),
},
},
},
},
},
},
wantVeleroDeployment: &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "test-velero-deployment",
Namespace: "test-ns",
Labels: veleroDeploymentLabel,
},
TypeMeta: metav1.TypeMeta{
Kind: "Deployment",
APIVersion: appsv1.SchemeGroupVersion.String(),
},
Spec: appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{MatchLabels: veleroDeploymentMatchLabels},
Replicas: pointer.Int32(1),
Template: corev1.PodTemplateSpec{
ObjectMeta: veleroPodObjectMeta,
Spec: corev1.PodSpec{
RestartPolicy: corev1.RestartPolicyAlways,
ServiceAccountName: common.Velero,
Containers: []corev1.Container{
{
Name: common.Velero,
Image: common.VeleroImage,
ImagePullPolicy: corev1.PullAlways,
Ports: []corev1.ContainerPort{{Name: "metrics", ContainerPort: 8085}},
Resources: corev1.ResourceRequirements{Requests: corev1.ResourceList{corev1.ResourceCPU: resource.MustParse("500m"), corev1.ResourceMemory: resource.MustParse("128Mi")}},
Command: []string{"/velero"},
Args: []string{
"server",
"--backup-sync-period=1ns",
"--default-backup-ttl=1ns",
"--default-item-operation-timeout=1ns",
"--resource-timeout=1ns",
"--default-repo-maintain-frequency=1ns",
"--garbage-collection-frequency=1ns",
"--fs-backup-timeout=1ns",
"--item-operation-sync-frequency=1ns",
defaultRestoreResourcePriorities,
"--store-validation-frequency=1ns",
"--terminating-resource-timeout=1ns",
defaultDisableInformerCache,
},
VolumeMounts: baseVolumeMounts,
Env: baseEnvVars,
},
},
Volumes: baseVolumes,
InitContainers: []corev1.Container{},
},
},
},
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 314cb26

Please sign in to comment.