Skip to content

K8SPG-1039 Add perconapgrestores/finalizers permission#1605

Merged
hors merged 1 commit into
mainfrom
update-rbac
May 19, 2026
Merged

K8SPG-1039 Add perconapgrestores/finalizers permission#1605
hors merged 1 commit into
mainfrom
update-rbac

Conversation

@mayankshah1607
Copy link
Copy Markdown
Member

CHANGE DESCRIPTION

Problem:
Short explanation of the problem.

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Copilot AI review requested due to automatic review settings May 19, 2026 14:22
Copy link
Copy Markdown
Contributor

@valmiranogueira valmiranogueira left a comment

Choose a reason for hiding this comment

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

Verified on openshift

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the operator’s RBAC to allow updating/patching perconapgrestores/finalizers, which is required when controllers add/remove finalizers on PerconaPGRestore resources.

Changes:

  • Add perconapgrestores/finalizers to kubebuilder RBAC markers.
  • Extend generated/static RBAC manifests (Role/ClusterRole and bundles) to include perconapgrestores/finalizers.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
percona/controller/pgbackup/controller.go Adds a kubebuilder RBAC marker for perconapgrestores/finalizers.
deploy/rbac.yaml Adds perconapgrestores/finalizers to namespaced Role resources list.
deploy/cw-rbac.yaml Adds perconapgrestores/finalizers to ClusterRole resources list.
deploy/cw-bundle.yaml Propagates the RBAC resource addition into the CW bundle.
deploy/bundle.yaml Propagates the RBAC resource addition into the main bundle.
config/rbac/namespace/role.yaml Adds perconapgrestores/finalizers to generated namespace Role.
config/rbac/cluster/role.yaml Adds perconapgrestores/finalizers to generated ClusterRole.

// +kubebuilder:rbac:groups=pgv2.percona.com,resources=perconapgbackups/status,verbs=create;patch;update
// +kubebuilder:rbac:groups=pgv2.percona.com,resources=perconapgclusters,verbs=get;list;create;update;patch;watch
// +kubebuilder:rbac:groups=pgv2.percona.com,resources=perconapgbackups/finalizers,verbs=update;patch
// +kubebuilder:rbac:groups=pgv2.percona.com,resources=perconapgrestores/finalizers,verbs=update;patch
@JNKPercona
Copy link
Copy Markdown
Collaborator

Test Name Result Time
backup-enable-disable passed 00:13:48
builtin-extensions passed 00:05:59
cert-manager-tls passed 00:09:43
custom-envs passed 00:19:12
custom-extensions passed 00:13:52
custom-tls passed 00:08:31
database-init-sql passed 00:02:30
demand-backup passed 00:23:45
demand-backup-offline-snapshot passed 00:13:32
dynamic-configuration passed 00:03:19
finalizers passed 00:03:30
init-deploy passed 00:02:53
huge-pages passed 00:03:00
major-upgrade-13-to-14 passed 00:10:39
major-upgrade-14-to-15 passed 00:11:02
major-upgrade-15-to-16 passed 00:10:05
major-upgrade-16-to-17 passed 00:10:20
major-upgrade-17-to-18 passed 00:12:48
ldap passed 00:05:52
ldap-tls passed 00:05:50
monitoring passed 00:07:57
monitoring-pmm3 passed 00:09:00
one-pod passed 00:05:58
operator-self-healing passed 00:10:37
pitr passed 00:11:48
scaling passed 00:06:26
scheduled-backup passed 00:27:18
self-healing passed 00:08:30
sidecars passed 00:03:00
standby-pgbackrest passed 00:17:26
standby-streaming passed 00:13:29
start-from-backup passed 00:12:33
tablespaces passed 00:07:47
telemetry-transfer passed 00:05:58
upgrade-consistency passed 00:06:56
upgrade-minor passed 00:09:09
users passed 00:04:55
Summary Value
Tests Run 37/37
Job Duration 02:16:48
Total Test Time 05:59:17

commit: 8624368
image: perconalab/percona-postgresql-operator:PR-1605-862436861

@hors hors changed the title Add perconapgrestores/finalizers permission K8SPG-1039 Add perconapgrestores/finalizers permission May 19, 2026
@hors hors merged commit b2293d7 into main May 19, 2026
21 checks passed
@hors hors deleted the update-rbac branch May 19, 2026 17:56
valmiranogueira pushed a commit that referenced this pull request May 19, 2026
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants