-
Notifications
You must be signed in to change notification settings - Fork 58
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
Caching Rook addons resources #1353
Conversation
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.
Looks good, but we need to be consistent with cache names.
test/addons/rook-cluster/fetch
Outdated
from drenv import cache | ||
|
||
os.chdir(os.path.dirname(__file__)) | ||
path = cache.path("addons/cluster-test.yaml") |
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.
This is the cache of the rook-cluster addon, so we should name it "addons/rook-cluster.yaml"
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.
Code looks good, commit message needs re-wrapping.
@abhijeet219 Also update the pr message:
|
Tested using #1359 |
Added and explained |
@abhijeet219 yes, the current example are long and not clear and better remove. Describing how fetch works is not needed in this PR - it was needed only in the PR introducing the cache. |
Currently the addons fetch kustomization resources whenever they are started. This change will start using cache for those resources, so starting an addon can directly use the cached resources. Changes: - drenv fetch can be used to fetch resources anytime. - Starting an addon will first try to fetch resources, then apply the fetched resources. If there is no change, fetch won't do anything, so takes very less time. Signed-off-by: Abhijeet Shakya <[email protected]>
Currently the addons fetch kustomization resources whenever they are started.
This change will start using cache for those resources, so starting an addon can directly use the cached resources.
Changes:
Example demonstrating how the cache works:
Fetching of resources for envs/regional-dr.yaml:
Fetching resources may take different amount of time for different runs. And once fetched, addons can directly use these resources to get started, saving time and escaping the flaky network situation.