-
Notifications
You must be signed in to change notification settings - Fork 49
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 local provider support for compaction #682
Conversation
edd8824
to
ad65c65
Compare
ad65c65
to
7b20732
Compare
/test pull-etcd-druid-e2e-kind-alpha-features |
/test pull-etcd-druid-e2e-kind |
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.
@abdasgupta thanks for the PR. I have a few comments. Please address them. Additionally, you might also need to use an init container to change file permissions for the store provider directories, as seen here:
etcd-druid/controllers/etcdcopybackupstask/reconciler.go
Lines 365 to 383 in 0477a27
if r.Config.FeatureGates[features.UseEtcdWrapper] { | |
if targetProvider == druidutils.Local { | |
// init container to change file permissions of the folders used as store to 65532 (nonroot) | |
// used only with local provider | |
job.Spec.Template.Spec.InitContainers = []corev1.Container{ | |
{ | |
Name: "change-backup-bucket-permissions", | |
Image: "alpine:3.18.2", | |
Command: []string{"sh", "-c", "--"}, | |
Args: []string{fmt.Sprintf("%s%s%s%s", "chown -R 65532:65532 /home/nonroot/", *targetStore.Container, " /home/nonroot/", *sourceStore.Container)}, | |
VolumeMounts: volumeMounts, | |
SecurityContext: &corev1.SecurityContext{ | |
RunAsGroup: pointer.Int64(0), | |
RunAsNonRoot: pointer.Bool(false), | |
RunAsUser: pointer.Int64(0), | |
}, | |
}, | |
} | |
} |
You may consult with @aaronfern for help with this.
Compaction job would not need an init container as it used an |
/test pull-etcd-druid-e2e-kind |
/test pull-etcd-druid-e2e-kind |
56e1260
to
15c662c
Compare
15c662c
to
fdf24c5
Compare
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.
@abdasgupta thanks for making the requested changes. Overall looks good, except for couple of nits. PTAL, thanks
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.
/lgtm
How to categorize this PR?
/area control-plane
/kind bug
What this PR does / why we need it:
This PR fixes the bug that was not letting the compaction job use local storage. Without this PR, compaction jobs were not running for gardener local setup with local provider.
Which issue(s) this PR fixes:
Fixes #709
Special notes for your reviewer:
Release note: