Enable global labels and annotation setting for all the k8s objects created by the Operator

Description

With the current version of PG operator 2X , it’s not possible to set annotations / labels at a global level for custom resource. If the requirement is to set annotations and labels for every single object created by the operator , it’s not possible to do it.

Workaround is to set the labels/annotations at the following fields

This takes care of labels and annotation for most of the objects but this doesn’t add annotations/ labels for the objects which are not tied to the instances/backups/proxy like the following

 

One of the customer has this requirement to set objects at global level.

PS: There might be cases where Customresource annotations/labels might need to be different from the specific objects, so it would be better to have a separate field for this.

 

cc

Environment

None

Activity

Show:

Julio Pasinatto January 31, 2025 at 2:16 PM

Verified.
Deployed cr with:

Results:

Slava Sarzhan December 30, 2024 at 12:40 PM

these options were added and now you can set annotations and annotations globally via CR:

Aaditya Dubey December 26, 2023 at 4:19 PM

Hi

Thank you for the report and feedback.

Done

Details

Assignee

Reporter

Needs QA

Yes

Needs Doc

Yes

Story Points

Sprint

Fix versions

Priority

Smart Checklist

Created December 19, 2023 at 7:27 AM
Updated March 17, 2025 at 5:49 PM
Resolved March 10, 2025 at 3:26 PM