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

Critical operation PDB #2830

Merged
merged 9 commits into from
Jan 29, 2025
Merged

Critical operation PDB #2830

merged 9 commits into from
Jan 29, 2025

Conversation

hughcapet
Copy link
Member

Create the second PDB to cover Pods with a special "critical operation" label set.

This label is going to be assigned to all pg cluster's Pods by the Operator during a PG major version upgrade, by Patroni during a cluster/replica bootstrap. It can also be set manually or by any other automation tool.

@hughcapet hughcapet added enhancement architectural New features and architectural changes, e.g. framework changes, migrations, rollout of new services. and removed enhancement labels Dec 31, 2024
@hughcapet hughcapet force-pushed the feature/critical-operations-pdb branch from 892fda8 to ac0634d Compare January 3, 2025 16:38
e2e/tests/test_e2e.py Outdated Show resolved Hide resolved
@hughcapet hughcapet marked this pull request as ready for review January 12, 2025 19:51
@FxKu FxKu added this to the 1.15.0 milestone Jan 17, 2025
Statefulset *appsv1.StatefulSet
VolumeClaims map[types.UID]*v1.PersistentVolumeClaim
GeneralPodDisruptionBudget *policyv1.PodDisruptionBudget
CriticalOpPodDisruptionBudget *policyv1.PodDisruptionBudget
Copy link
Member

Choose a reason for hiding this comment

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

why not make it a map, too?

Copy link
Member

Choose a reason for hiding this comment

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

ok probably it would require quite a few more code changes then ... we can also leave it as is

pkg/cluster/k8sres.go Outdated Show resolved Hide resolved
pkg/cluster/k8sres_test.go Outdated Show resolved Hide resolved
@FxKu
Copy link
Member

FxKu commented Jan 27, 2025

Documentation is still missing.

pkg/cluster/cluster.go Outdated Show resolved Hide resolved
pkg/cluster/resources.go Outdated Show resolved Hide resolved
pkg/cluster/resources.go Outdated Show resolved Hide resolved
c.CriticalOpPodDisruptionBudget = newPdb

return nil
}
Copy link
Member

Choose a reason for hiding this comment

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

with a map we would not need so much redundant code

pkg/cluster/resources.go Outdated Show resolved Hide resolved
pkg/cluster/k8sres.go Outdated Show resolved Hide resolved
pkg/cluster/k8sres_test.go Outdated Show resolved Hide resolved
@hughcapet hughcapet force-pushed the feature/critical-operations-pdb branch from dddcd56 to a877524 Compare January 28, 2025 12:16
pkg/cluster/resources.go Outdated Show resolved Hide resolved
@FxKu
Copy link
Member

FxKu commented Jan 28, 2025

👍

1 similar comment
@hughcapet
Copy link
Member Author

👍

@hughcapet hughcapet merged commit a56ecaa into master Jan 29, 2025
10 checks passed
@hughcapet hughcapet deleted the feature/critical-operations-pdb branch January 29, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architectural New features and architectural changes, e.g. framework changes, migrations, rollout of new services.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants