Skip to content
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

Use emptydir for db pg_dump #2661

Merged
merged 1 commit into from
Oct 10, 2022
Merged

Conversation

harshad16
Copy link
Member

Use emptydir for db pg_dump
Signed-off-by: Harshad Reddy Nalla [email protected]

Related Issues and Dependencies

Related-to: thoth-station/graph-backup-job#242

@harshad16 harshad16 requested a review from VannTen September 26, 2022 20:29
@sesheta sesheta added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 26, 2022
Copy link
Member

@VannTen VannTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use emptyDir on all the environments or some don't have enough local storage ?
If we can, I would move the volume def in base/.

Besides that, I think we should add a resources.requests.ephemeral-storage matching the expected size of the db dumb. (If it's available. It's a beta k8s feature, not sure if exposed on the openshift versions we have)

Comment on lines 25 to 26
path: "/spec/jobTemplate/spec/template/spec/containers/0/resources"
value: {"requests": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}, "limits": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: "/spec/jobTemplate/spec/template/spec/containers/0/resources"
value: {"requests": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}, "limits": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}}
path: "/spec/jobTemplate/spec/template/spec/containers/0/resources/requests/ephemeral-storage"
value: "20Gi"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: "/spec/jobTemplate/spec/template/spec/containers/0/resources"
value: {"requests": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}, "limits": {"memory":"1Gi", "cpu": "1", "ephemeral-storage": "20Gi"}}
- op: add
path: "/spec/jobTemplate/spec/template/spec/containers/0/resources/limits/ephemeral-storage"
value: "20Gi"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only add the ephemeral in the patch (same for other environment).
Or maybe we can add 20Gi as the base and only override test at 1Gi ?

Side note: Do we want to add the limit on ephemeral-storage ? The idea is to be alerted immediately if db dump starts to go over 20Gi ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(not sure if my second sugg applies cleanly on top on the other, but the idea : two add ops specifying the value only at the correct path.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, i have made the changes as you suggested.
The limits is something requested by cluster team so fit with the namespace limits.

about we being alerted , the exceed of those limit would cause failure in system, so we should be notified.

@sesheta sesheta added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 6, 2022
Copy link
Member

@VannTen VannTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone read the json patch docs and I think we need replace rather than add since we have a base value now ?
For the rest it's
/lgtm

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2022
Signed-off-by: Harshad Reddy Nalla <[email protected]>
@sesheta sesheta removed the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2022
@VannTen
Copy link
Member

VannTen commented Oct 10, 2022

/lgtm

@sesheta sesheta added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2022
@codificat
Copy link
Member

/approve

@sesheta
Copy link
Member

sesheta commented Oct 10, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: codificat, VannTen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sesheta sesheta added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2022
@sesheta sesheta merged commit da50a32 into thoth-station:master Oct 10, 2022
@harshad16 harshad16 deleted the use-empty-dir branch January 17, 2023 23:07
@goern
Copy link
Member

goern commented May 29, 2023

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants