feat(report,operator): add support for least-privilege access by armru · Pull Request #8982 · cloudnative-pg/cloudnative-pg

@dosubot dosubot bot added the size:L

This PR changes 100-499 lines, ignoring generated files.

label

Oct 28, 2025

@armru armru changed the title feat(report,operator): support namespace-scoped access feat(report,operator): reduce required permissions to run

Oct 28, 2025

@armru armru changed the title feat(report,operator): reduce required permissions to run feat(report,operator): reduce the required permissions to run

Oct 28, 2025

@armru armru changed the title feat(report,operator): reduce the required permissions to run feat(report): enable least-privilege access for report operator command

Oct 28, 2025

@armru armru changed the title feat(report): enable least-privilege access for report operator command feat(plugin,report): enable least-privilege access for report operator command

Oct 28, 2025

@dosubot dosubot bot added size:XL

This PR changes 500-999 lines, ignoring generated files.

and removed size:L

This PR changes 100-499 lines, ignoring generated files.

labels

Oct 28, 2025

@armru armru changed the title feat(plugin,report): enable least-privilege access for report operator command feat(report,operator): support least-privilege access

Oct 29, 2025

@armru armru changed the title feat(report,operator): support least-privilege access feat(report,operator): add support for least-privilege access

Oct 29, 2025

@dosubot dosubot bot added size:L

This PR changes 100-499 lines, ignoring generated files.

and removed size:XL

This PR changes 500-999 lines, ignoring generated files.

labels

Oct 29, 2025

jbattiato

@dosubot dosubot bot added the lgtm

This PR has been approved by a maintainer

label

Nov 4, 2025
Enable `cnpg report operator` to work with namespace-scoped permissions
by making cluster-scoped resource collection optional instead of required.

The command now gracefully handles permission errors for webhooks, webhook
services, and OLM resources by logging warnings and continuing report
generation with available data, rather than failing completely.

Fixes issue where least-privilege users were blocked from
generating troubleshooting reports due to missing cluster-level
permissions for webhook and OLM resources.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>

@gbartolini

Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>

@dosubot dosubot bot added size:XL

This PR changes 500-999 lines, ignoring generated files.

and removed size:L

This PR changes 100-499 lines, ignoring generated files.

labels

Nov 6, 2025

gbartolini