-
Notifications
You must be signed in to change notification settings - Fork 9
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
apps sc: add sub path and name suffix to rclone jobs, harbor restore support azure #2368
Conversation
Is this as intended or is it a bug in Harbor azure? |
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.
one small nit but otherwise lgtm so far! (did not test anything)
This is a known issue in upstream registry: distribution/distribution#1247 |
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 think the config additions look good, please do add the examples and the additions to rclone restores targets schema.
Nice use of defaults for the name suffix, makes it easy to see where they are rendered from 👍
Also great job testing with all those variations! 😅
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.
Looking good in general, just some minor nits
Added some more things in the schema now. |
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, could add a migration comment about manually adding the buckets but schema will complain anyways so would be hard to miss.
146e0ca
to
fff94cc
Compare
Thanks for the suggestion. Added a text in the migration document now as well. |
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
Requested changes have been implemented
3d1f0e9
to
587a2af
Compare
Added new config option for custom sync and restore to set path Added new validation to prevent default bucket sync on azure Added new restore part for harbor on azure
587a2af
to
49d22c6
Compare
Warning
This is a public repository, ensure not to disclose:
What kind of PR is this?
Required: Mark one of the following that is applicable:
Optional: Mark one or more of the following that are applicable:
Important
Breaking changes should be marked
kind/admin-change
orkind/dev-change
depending on typeCritical security fixes should be marked with
kind/security
What does this PR do / why do we need this PR?
Harbor in azure puts image data at
<bucket-name>//docker/
instead of<bucket-name>/docker/
. This causes issues both when restoring data to harbor in azure and when rclone is syncing from azure.Restoring from s3 to azure:
When rcloning to azure from s3 rclone will by default put the data at the same folder as in s3 (
<bucket-name>/docker/
). So then we need to move it to the correct folder for azure. This is done with the new rclone move job inrestore/harbor/
.Rclone syncing from azure:
When running rclone sync on a harbor bucket in azure, then rclone will by default ignore the image folder because of the
//
in the path. This can be fixed by running a rclone sync job that specifically targets<bucket-name>//docker
in the source. Then send it to<bucket-name>//docker/
if the destination is azure and<bucket-name>/docker/
if the destination is s3 (note that sending to//docker
in s3 will translate into/docker
, but in the next sync rclone will not find anything in//docker
so it will send all files again). However, the default rclone sync job for harbor will then delete everything in thedocker
folder at the destination (because it is skipping that folder at the source). So we need to disable the default sync jobs and instead create a second custom job for harbor that is syncing/backups
as well (the only other folder in the bucket).Information to reviewers
At time of writing this PR I still need to do some updates to the config schema, do some documentation updates, and add maybe add migration for running azure clusters. But the code should be complete.
I have tested the following things that are expected to work:
Example of sync config from azure to s3:
Checklist
NetworkPolicy Dashboard