Skip to content

feat(ingress-controller): support Pod labels and align ServiceMonitor namespace - #1071

Open
ruanweihong-aaa wants to merge 4 commits into
apache:masterfrom
ruanweihong-aaa:feat/862-servicemonitor-release-namespace
Open

ruanweihong-aaa wants to merge 4 commits into
apache:masterfrom
ruanweihong-aaa:feat/862-servicemonitor-release-namespace

Conversation

@ruanweihong-aaa

@ruanweihong-aaa ruanweihong-aaa commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #862.
Fixes #978.

Add deployment.podLabels to configure extra labels on ingress controller Pods. Preserve selector labels on conflicts, including empty selector values, without changing Deployment or Service selectors.

Change the default serviceMonitor.namespace from monitoring to "", so the ServiceMonitor is created in the Helm release namespace, consistent with the main APISIX chart.

Use chart version 1.5.1 and update the values documentation and upgrade notes.

Existing users whose Prometheus only discovers ServiceMonitors in monitoring should retain the previous placement explicitly:

serviceMonitor:
  namespace: monitoring

Alternatively, update the Prometheus ServiceMonitor namespace selector to include the release namespace.

Verified with Helm 3.22.1 and 4.2.4: 20 render cases match the behavior of both original PRs, including custom labels, selector conflicts, null values, explicit ServiceMonitor namespaces, and disabled monitoring. Strict lint passes with ServiceMonitor enabled and disabled, and README regeneration is idempotent.

Supersedes #1070.

@ruanweihong-aaa ruanweihong-aaa changed the title feat(ingress-controller): default ServiceMonitor to the release namespace feat(ingress-controller): support Pod labels and align ServiceMonitor namespace Nov 28, 2026

This branch has not been deployed

No deployments
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.

apisix-ingress-controller chart missing podLabels support [ingress controller] maybe use "" namespace as serviceMonitor.namespace default

2 participants