Skip to content

chore: deprecate monitoring.enablePodMonitor in Cluster and Pooler#8753

Merged
mnencia merged 8 commits intocloudnative-pg:mainfrom
phisco:dev/8075
Oct 13, 2025
Merged

chore: deprecate monitoring.enablePodMonitor in Cluster and Pooler#8753
mnencia merged 8 commits intocloudnative-pg:mainfrom
phisco:dev/8075

Conversation

@phisco
Copy link
Contributor

@phisco phisco commented Oct 6, 2025

Mark the enablePodMonitor field as deprecated in both Cluster and Pooler monitoring configuration. This field will be removed in future releases, and users should create PodMonitor resources manually if needed.

The deprecation notice has been added to:

  • API type definitions (cluster_types.go and pooler_types.go)
  • Generated CRD manifests for both Clusters and Poolers

Documentation has been updated accordingly.

Closes #8075

@phisco phisco requested a review from a team as a code owner October 6, 2025 08:24
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Oct 6, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.26 release-1.27 labels Oct 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@dosubot dosubot bot added the chore Intangible work to reduce technical debt label Oct 6, 2025
@phisco phisco force-pushed the dev/8075 branch 2 times, most recently from 4f4469f to c80ebc6 Compare October 6, 2025 08:50
@phisco phisco requested a review from jsilvela as a code owner October 6, 2025 08:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 6, 2025
@gbartolini gbartolini changed the title chore: deprecate spec.monitoring.enablePodMonitor chore: deprecate spec.monitoring.enablePodMonitor Oct 6, 2025
@gbartolini gbartolini changed the title chore: deprecate spec.monitoring.enablePodMonitor chore: deprecate monitoring.enablePodMonitor in Cluster and Pooler Oct 6, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 6, 2025
@gbartolini
Copy link
Contributor

I think we should backport this patch to give users more time to update.

@gbartolini
Copy link
Contributor

/test

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

@gbartolini, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18280849444

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Oct 6, 2025
@phisco
Copy link
Contributor Author

phisco commented Oct 9, 2025

while working on the helm chart PR, I noticed I missed deprecating a few other related fields, given that this is still in flight I'll update this pr.

@gbartolini
Copy link
Contributor

@phisco I have added a draft of documentation. However, could you please add a warning/notice to users that still set the option?

@phisco
Copy link
Contributor Author

phisco commented Oct 9, 2025

@gbartolini, just to be sure, you mean through the validating webhook, right?

@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 9, 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 9, 2025
@gbartolini
Copy link
Contributor

I think a webhook now is fine, as long as when we decomission support for enable pod monitor, we remove the ownership from the cluster and detach the pod monitor resource (unless you have better ideas). In the meantime we will just start telling users to manually configure them. The important thing for us is that it is clear that we won't invest in this feature anymore as it is not our domain.

@armru armru force-pushed the dev/8075 branch 2 times, most recently from 6c55ce4 to 8215481 Compare October 13, 2025 10:19
@mnencia
Copy link
Member

mnencia commented Oct 13, 2025

/test

@github-actions
Copy link
Contributor

@mnencia, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/18469731730

phisco and others added 8 commits October 13, 2025 21:03
Mark the `enablePodMonitor` field as deprecated in both Cluster and
Pooler monitoring configuration. This field will be removed in future
releases, and users should create PodMonitor resources manually if
needed.

The deprecation notice has been added to:
- API type definitions (cluster_types.go and pooler_types.go)
- Generated CRD manifests for both Clusters and Poolers

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
@mnencia mnencia merged commit 232979c into cloudnative-pg:main Oct 13, 2025
30 of 31 checks passed
cnpg-bot pushed a commit that referenced this pull request Oct 13, 2025
…8753)

Mark the `enablePodMonitor` field as deprecated in both `Cluster` and
`Pooler` monitoring configuration. This field will be removed in future
releases, and users should create `PodMonitor` resources manually if
needed.

The deprecation notice has been added to:

- API type definitions (`cluster_types.go` and `pooler_types.go`)
- Generated CRD manifests for both Clusters and Poolers

Documentation has been updated accordingly.

Closes #8075

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 232979c)
gbartolini added a commit that referenced this pull request Oct 14, 2025
…8753)

Mark the `enablePodMonitor` field as deprecated in both `Cluster` and
`Pooler` monitoring configuration. This field will be removed in future
releases, and users should create `PodMonitor` resources manually if
needed.

The deprecation notice has been added to:

- API type definitions (`cluster_types.go` and `pooler_types.go`)
- Generated CRD manifests for both Clusters and Poolers

Documentation has been updated accordingly.

Closes #8075

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 232979c)
mnencia added a commit that referenced this pull request Oct 14, 2025
…8753)

Mark the `enablePodMonitor` field as deprecated in both `Cluster` and
`Pooler` monitoring configuration. This field will be removed in future
releases, and users should create `PodMonitor` resources manually if
needed.

The deprecation notice has been added to:

- API type definitions (`cluster_types.go` and `pooler_types.go`)
- Generated CRD manifests for both Clusters and Poolers

Documentation has been updated accordingly.

Closes #8075

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
(cherry picked from commit 232979c)
@rouke-broersma
Copy link

I think a webhook now is fine, as long as when we decomission support for enable pod monitor, we remove the ownership from the cluster and detach the pod monitor resource (unless you have better ideas). In the meantime we will just start telling users to manually configure them. The important thing for us is that it is clear that we won't invest in this feature anymore as it is not our domain.

Personally I would much rather that CNPG removes the pod monitor instead of detaching ownership so it becomes clear immediately during testing of the new operator that you missed something important instead of silently continuing to receive metrics for existing resources but having unmanaged podmonitors all of a sudden.

THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request Oct 30, 2025
…loudnative-pg#8753)

Mark the `enablePodMonitor` field as deprecated in both `Cluster` and
`Pooler` monitoring configuration. This field will be removed in future
releases, and users should create `PodMonitor` resources manually if
needed.

The deprecation notice has been added to:

- API type definitions (`cluster_types.go` and `pooler_types.go`)
- Generated CRD manifests for both Clusters and Poolers

Documentation has been updated accordingly.

Closes cloudnative-pg#8075

Signed-off-by: Philippe Scorsolini <p.scorsolini@gmail.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases chore Intangible work to reduce technical debt lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 release-1.26 release-1.27 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Deprecation of .spec.monitoring.enablePodMonitor

6 participants