PMM-15149: support installing PMM-HA into multiple namespaces#865
Open
theTibi wants to merge 6 commits into
Open
PMM-15149: support installing PMM-HA into multiple namespaces#865theTibi wants to merge 6 commits into
theTibi wants to merge 6 commits into
Conversation
The cluster-wide monitoring sub-charts (kube-state-metrics, prometheus-node-exporter) are already conditional on main, which makes it possible to run a second PMM-HA instance in another namespace (e.g. a DR / restore target or an isolated test instance) by disabling them and using a distinct Helm release name. This closes the remaining gaps so that path is clean and documented: - vmagent: gate the kube-state-metrics and node-exporter scrape jobs on the same `kube-state-metrics.enabled` / `prometheus-node-exporter.enabled` toggles. They were rendered unconditionally, so disabling the sub-charts left dangling scrape configs with no targets. Other jobs (kubelet, cadvisor, kube-apiserver, and the PMM components) are untouched. - README: add an "Installing into multiple namespaces" section - operators installed once (cluster-wide), a distinct release name per instance, and monitoring sub-charts disabled on secondary instances (node-exporter uses hostNetwork:9100, so only one set can run per node), plus per-namespace prerequisites (pmm-secret, backup-storage access). - .gitignore: ignore local-only value overrides (values-dev.yaml, values-*.local.yaml) so per-environment files containing real bucket/account/IRSA details are never committed. Backward compatible: both monitoring sub-charts default to enabled, so existing single-namespace installs are unchanged. Verified with `helm template` (default keeps the jobs; disabled drops only the two gated jobs) and `helm lint`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: theTibi <tkorocz@gmail.com>
theTibi
requested review from
a team,
eleo007,
hors,
jvpasinatto and
nmarukovich
as code owners
June 12, 2026 08:00
theTibi
requested review from
4nte and
JiriCtvrtka
and removed request for
a team
June 12, 2026 08:01
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables running multiple pmm-ha Helm releases across different namespaces in the same Kubernetes cluster by ensuring optional cluster-wide monitoring components can be disabled cleanly, and by documenting the intended installation pattern.
Changes:
- Gate VMAgent scrape jobs for
kube-state-metricsandprometheus-node-exporteron the same*.enabledtoggles that control the sub-charts. - Add a README section describing how to install multiple PMM-HA instances into different namespaces.
- Update
.gitignoreto prevent committing local, environment-specific Helm values override files.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
charts/pmm-ha/templates/vmagent.yaml |
Conditionally renders kube-state-metrics and node-exporter scrape jobs based on sub-chart enablement flags. |
charts/pmm-ha/README.md |
Documents a multi-namespace installation approach and the need for distinct release names / exporter settings. |
.gitignore |
Ignores common local-only Helm values override files to reduce accidental secret/config commits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ademidoff
reviewed
Jun 23, 2026
ademidoff
reviewed
Jun 23, 2026
Co-authored-by: Alex Demidoff <a@demidoff.me>
Disabling kube-state-metrics / prometheus-node-exporter on secondary instances does NOT reuse the first instance's agents: each vmagent's KSM/node-exporter scrape jobs are scoped to namespaces.names=[.Release.Namespace], so a secondary instance collects no kube-state-metrics or node-exporter metrics at all (those live only in the first instance's VictoriaMetrics). Reword the section + code-block comment to say so; note kubelet/cadvisor (role: node) still provide basic node/container metrics, and that this is fine for a DR target. Addresses review comments on PR percona#865. Signed-off-by: theTibi <tkorocz@gmail.com>
…mple Signed-off-by: theTibi <tkorocz@gmail.com>
theTibi
requested review from
gkech,
mayankshah1607 and
oksana-grishchenko
as code owners
July 3, 2026 16:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cluster-wide monitoring sub-charts (kube-state-metrics, prometheus-node-exporter) are already conditional on main, which makes it possible to run a second PMM-HA instance in another namespace (e.g. a DR / restore target or an isolated test instance) by disabling them and using a distinct Helm release name. This closes the remaining gaps so that path is clean and documented:
vmagent: gate the kube-state-metrics and node-exporter scrape jobs on the same
kube-state-metrics.enabled/prometheus-node-exporter.enabledtoggles. They were rendered unconditionally, so disabling the sub-charts left dangling scrape configs with no targets. Other jobs (kubelet, cadvisor, kube-apiserver, and the PMM components) are untouched.README: add an "Installing into multiple namespaces" section - operators installed once (cluster-wide), a distinct release name per instance, and monitoring sub-charts disabled on secondary instances (node-exporter uses hostNetwork:9100, so only one set can run per node), plus per-namespace prerequisites (pmm-secret, backup-storage access).
.gitignore: ignore local-only value overrides (values-dev.yaml, values-*.local.yaml) so per-environment files containing real bucket/account/IRSA details are never committed.
Backward compatible: both monitoring sub-charts default to enabled, so existing single-namespace installs are unchanged. Verified with
helm template(default keeps the jobs; disabled drops only the two gated jobs) andhelm lint.