Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Disk Auto Grow for pgBackrest repo host volumes #4247

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

Merged
tjmoore4 merged 6 commits into CrunchyData:main from tjmoore4:repo-vol-autogrow
Aug 22, 2025

Conversation

Copy link
Contributor

@tjmoore4 tjmoore4 commented Aug 19, 2025

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)
    This update adds the ability to automatically grow repo host PVCs. The AutoGrowVolumes feature gate must be enabled and the relevant volumes must include a Limit value.

Once enabled, this feature tracks the current disk utilization and, when utilization reaches 75%, the disk request is updated to 150% of the observed value. At this point and beyond, the requested value will be tracked by CPK.

The volume request can grow up to the configured limit value. Note: This change now treats limit values as authoritative regardless of the feature gate setting. However, the implementation also now allows limits to be updated after being set.

Other Information:
Issue: PGO-1427

@tjmoore4 tjmoore4 force-pushed the repo-vol-autogrow branch 4 times, most recently from ca01ca3 to 267232b Compare August 20, 2025 20:32
This update adds the ability to automatically grow repo host PVCs. The
AutoGrowVolumes feature gate must be enabled and the relevant volumes
must include a Limit value.
Once enabled, this feature tracks the current disk utilization and, when
utilization reaches 75%, the disk request is updated to 150% of the
observed value. At this point and beyond, the requested value will be
tracked by CPK.
The volume request can grow up to the configured limit value.
Note: This change now treats limit values as authoritative
regardless of the feature gate setting. However, the implementation
also now allows limits to be updated after being set.
Issue: PGO-1427
@tjmoore4 tjmoore4 force-pushed the repo-vol-autogrow branch 2 times, most recently from b95d170 to fd70aba Compare August 22, 2025 16:35
refactor for repo-host autogrow
Issue: PGO-1427
Selector: naming.PGBackRestDedicatedLabels(cluster.Name).AsSelector()},
))

if len(pods.Items) == 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we have an else case here and create an error? it looks like "if len == 1" we will just return nil

Suggested change
if len(pods.Items) == 1 {
if err==nil&&len(pods.Items) == 1 {
...
} else {
err = errors.New("blah")
}
return err

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤔 I wonder if the err == nil is necessary? Is there a scenario where we get an error and the Pod is returned?
I think the else block makes sense, I can add that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about it a bit more and I refactored the function to handle the errors better. Let me know if that works for you.

@tjmoore4 tjmoore4 merged commit 1e43226 into CrunchyData:main Aug 22, 2025
17 checks passed
@tjmoore4 tjmoore4 deleted the repo-vol-autogrow branch August 22, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@jmckulk jmckulk jmckulk approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /