-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add repository maintenance job #7451
Conversation
d6fd309
to
4b93b49
Compare
4b93b49
to
ded1e74
Compare
ded1e74
to
8f8759d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7451 +/- ##
==========================================
+ Coverage 61.71% 61.74% +0.02%
==========================================
Files 263 265 +2
Lines 28869 29257 +388
==========================================
+ Hits 17816 18064 +248
- Misses 9793 9910 +117
- Partials 1260 1283 +23 ☔ View full report in Codecov by Sentry. |
375d8ab
to
6363355
Compare
c8a8349
to
f6bb743
Compare
5e4a396
to
cea75bc
Compare
ae9dbcf
to
bb571f8
Compare
bb571f8
to
4712ca8
Compare
4712ca8
to
6665608
Compare
6665608
to
534816c
Compare
return jobName | ||
} | ||
|
||
func buildMaintenanceJob(m MaintenanceConfig, param provider.RepoParam, cli client.Client, namespace string) (*batchv1.Job, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we copy the Velero pod directly and only remove or replace the specific needed fields (e.g. cmd)?
I raise this because the Velero pod may be configured in different ways to support kinds of scenarios, e.g. a label is added to it to support auth with Azure Workload Identity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed the label settings for the job, I added them now.
As some properties are also used by other features later such as data mover microservice
, so I want these properties to be a series of common functions.
f227be4
to
6751207
Compare
RepoName string | ||
BackupStorageLocation string | ||
RepoType string | ||
KeepLatestMaitenanceJobs int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is KeepLatestMaitenanceJobs
used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! I should remove it
Signed-off-by: Ming Qiu <[email protected]>
6751207
to
8d63c76
Compare
pkg/cmd/cli/install/install.go
Outdated
@@ -128,6 +135,13 @@ func (o *Options) BindFlags(flags *pflag.FlagSet) { | |||
flags.BoolVar(&o.DefaultSnapshotMoveData, "default-snapshot-move-data", o.DefaultSnapshotMoveData, "Bool flag to configure Velero server to move data by default for all snapshots supporting data movement. Optional.") | |||
flags.BoolVar(&o.DisableInformerCache, "disable-informer-cache", o.DisableInformerCache, "Disable informer cache for Get calls on restore. With this enabled, it will speed up restore in cases where there are backup resources which already exist in the cluster, but for very large clusters this will increase velero memory usage. Default is false (don't disable). Optional.") | |||
flags.BoolVar(&o.ScheduleSkipImmediately, "schedule-skip-immediately", o.ScheduleSkipImmediately, "Skip the first scheduled backup immediately after creating a schedule. Default is false (don't skip).") | |||
flags.Var(o.FormatFlag, "log-format", fmt.Sprintf("The format for log output. Valid values are %s.", strings.Join(o.FormatFlag.AllowedValues(), ", "))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expose log-format
and log-level
from installation? Previously, we don't have them since they are not required only in troubleshooting cases.
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes #(issue)
#7375
Please indicate you've done the following:
/kind changelog-not-required
as a comment on this pull request.site/content/docs/main
.