Repository navigation
Description
Problem Description
The Argo CD Applications llm, open-webui and qdrant show OrphanedResourceWarning: Application has 1 orphaned resources since 2026-11-06T06:42:01Z. The Application mattermost shows the same warning since 2026-10-31T21:23Z.
The orphan is the ConfigMap cnpg-default-monitoring. The CloudNativePG operator copies its default monitoring queries into each namespace that has a Cluster. The gateway database Cluster llm-gateway-db came on 2026-11-06, and the ConfigMap llm/cnpg-default-monitoring was created at 2026-11-06T06:42:00Z. The copy has the label app.kubernetes.io/managed-by=cloudnative-pg, no ownerReferences and no Argo CD tracking id. It is not in git.
The AppProject homelab warns on orphans (k8s/argocd/apps/projects.yaml:54-56), and its ignore list does not hold this name. The warning hides a real orphan among the expected ones.
Reproduction Steps
- Run
kubectl get application -n argocd llm open-webui qdrant mattermost -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.conditions}{"\n"}{end}'. - Run
kubectl -n llm get configmap cnpg-default-monitoring -o yamland read its labels andownerReferences.
Expected vs Actual Behavior
Expected: Argo CD does not report the ConfigMap that the CloudNativePG operator writes as an orphan.
Actual: 4 Applications show OrphanedResourceWarning for cnpg-default-monitoring.
Environment Diagnostics
- DevOps CLI Version: 0.124.0
- Execution Environment: homelab Kubernetes cluster, managed by Argo CD, with the CloudNativePG operator
Logs, Traces, or Terminal Output
# kubectl get application -n argocd (2026-11-13)
llm, open-webui, qdrant: OrphanedResourceWarning: Application has 1 orphaned resources (since 2026-11-06T06:42:01Z)
mattermost: OrphanedResourceWarning (since 2026-10-31T21:23Z)
devops: Application has 7 orphaned resources (since 2026-11-12T22:41:21Z)Proposed Fix
k8s/argocd/apps/projects.yaml:56: add{group: '', kind: ConfigMap, name: cnpg-default-monitoring}tospec.orphanedResources.ignoreof the AppProjecthomelab.- Do not set
disableDefaultQuerieson the Clusters. The default CloudNativePG metrics feed the database alerts. - Out of scope for the manifest change: the 7 orphans of the Application
devopsare the manual Jobsfix-plan-validate-*, and the ignore list covers onlydevops-cli-*Jobs. Delete the finished manual Jobs after use.
Acceptance Criteria
- After the sync, the Applications
llm,open-webui,qdrantandmattermostshow noOrphanedResourceWarningforcnpg-default-monitoring. - The ConfigMap stays in place, and
cnpg_collector_upand the default CloudNativePG metrics still have samples. -
orphanedResources.warnstays true, so Argo CD still reports other orphans.
Alternatives check of 2026-11-16: in-use.
The repository already uses this tool.
Tool: argoproj/argo-cd (https://github.com/argoproj/argo-cd), Apache-2.0, last activity 2026-11-16, maintained.
Proposed design
Problem statement
Add {group: '', kind: ConfigMap, name: cnpg-default-monitoring} to the spec.orphanedResources.ignore list of the AppProject homelab. The CloudNativePG operator writes this ConfigMap into each namespace that has a Cluster. The ConfigMap has no ownerReferences and no Argo CD tracking id, so Argo CD reports it as an orphan. The Applications llm, open-webui, qdrant and mattermost show OrphanedResourceWarning for it, and the warning hides a real orphan among the expected ones.
Acceptance criteria
Requirement: The k8s manifests pass the k8s check
The changed k8s manifests MUST pass the k8s check.
Scenario: The k8s check passes on the change
- WHEN
uv run devops ci --check --only k8sruns on the change - THEN the command exits 0 and shows the k8s check as passed
Requirement: The homelab AppProject ignores the monitoring ConfigMap
The AppProject homelab SHALL list {group: '', kind: ConfigMap, name: cnpg-default-monitoring} in spec.orphanedResources.ignore.
Scenario: The AppProject shows the ignore entry after the sync
- WHEN A person runs
kubectl -n argocd get appproject homelab -o jsonpath='{.spec.orphanedResources.ignore}'after the sync - THEN the output holds
cnpg-default-monitoringin theignorelist
Requirement: The four Applications report no orphan for the ConfigMap
The Applications llm, open-webui, qdrant and mattermost MUST show no OrphanedResourceWarning condition.
Scenario: The Applications show no orphan condition for the ConfigMap
- WHEN A person runs
kubectl get application -n argocd llm open-webui qdrant mattermost -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.conditions}{"\n"}{end}'after the sync - THEN the output shows no
OrphanedResourceWarningcondition for these four Applications
Requirement: The monitoring ConfigMap stays in place
The ConfigMap cnpg-default-monitoring MUST stay in the namespace llm with the label app.kubernetes.io/managed-by=cloudnative-pg.
Scenario: The operator keeps the ConfigMap
- WHEN A person runs
kubectl -n llm get configmap cnpg-default-monitoring -o yamlafter the sync - THEN the command returns the ConfigMap with its CloudNativePG label
Requirement: The default CloudNativePG queries stay enabled
The Clusters MUST NOT set disableDefaultQueries, so the default monitoring queries stay active.
Scenario: The gateway database Cluster keeps the default queries
- WHEN A person runs
kubectl -n llm get cluster llm-gateway-db -o yamlafter the sync - THEN the output holds no
disableDefaultQueriesfield
Requirement: The exporter keeps its samples
The metric cnpg_collector_up MUST keep a sample for llm/llm-gateway-db.
Scenario: Prometheus returns the exporter sample
- WHEN A person runs
uv run devops prometheus query 'cnpg_collector_up{namespace="llm"}'after the sync - THEN the query returns the value 1 for the pod
llm-gateway-db-1
Requirement: Argo CD still warns on other orphans
The AppProject homelab MUST keep orphanedResources.warn set to true.
Scenario: The AppProject keeps the orphan warning on
- WHEN A person runs
kubectl -n argocd get appproject homelab -o jsonpath='{.spec.orphanedResources.warn}'after the sync - THEN the output is
true
Existing Tool Considered
argoproj/argo-cd (https://github.com/argoproj/argo-cd), Apache-2.0, maintained, last activity 2026-11-16. The repository already uses Argo CD, and its AppProject spec.orphanedResources.ignore covers the need. The tool lacks a way to stop the CloudNativePG operator from creating the per-namespace ConfigMap. It adds no ownerReferences or tracking id to the ConfigMap. The ignore list is maintained by hand, so each new operator-managed resource needs its own entry.
Key questions
- How does the change stop Argo CD from reporting the operator-written ConfigMap as an orphan?: Add the entry
{group: '', kind: ConfigMap, name: cnpg-default-monitoring}tospec.orphanedResources.ignoreof the AppProjecthomelab. (best practice) [sources: k8s/argocd/apps/projects.yaml:55, https://argo-cd.readthedocs.io/en/stable/user-guide/orphaned-resources/]- Chosen: AppProject orphanedResources.ignore. It is Argo CD's own mechanism, and the project already uses it for other operator-written resources.
- Rejected: Set disableDefaultQueries on the Clusters. It removes the default monitoring queries, so cnpg_collector_up and the database alerts lose their samples.
- Rejected: Patch the ConfigMap with an ownerReference or a tracking id. The CloudNativePG operator writes the ConfigMap and sets no ownerReference, so a patch is reverted.
- Which fields does the ignore entry need for a core/v1 ConfigMap?: The entry has three fields:
group: ''for the core group,kind: ConfigMapandname: cnpg-default-monitoring. Argo CD defines an ignore rule as a Group, a Kind and a Name, and the rule has no namespace field, so the one entry matches the ConfigMap of that name in every namespace. The existing entries of thehomelabproject use the same three fields (page fetched 2026-11-17). [sources: https://argo-cd.readthedocs.io/en/stable/user-guide/orphaned-resources/, k8s/argocd/apps/projects.yaml:58, k8s/argocd/apps/projects.yaml:95] - Does the change keep the default CloudNativePG monitoring queries?: Yes. The Cluster
llm-gateway-dbink8s/llm/gateway-db.yamlsets nodisableDefaultQueries, and the change sets none, socnpg_collector_upand the default metrics keep their samples. TheGatewayDatabaseDownalert and the CloudNativePG dashboard read that metric. (best practice) [sources: k8s/llm/gateway-db.yaml:79, k8s/monitoring/prometheus-values.yaml:739, k8s/README.md:656, tests/fixtures/prometheus_rules/llm_gateway_db_tests.yaml:21, openspec/specs/llm-gateway-database/spec.md:73]- Chosen: Keep the default queries. The default metrics feed the database alerts, and GatewayDatabaseDown reads cnpg_collector_up.
- Rejected: Set disableDefaultQueries: true. It stops the default queries, so the alerts that read cnpg_collector_up lose their samples.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 13, 2026
Both edit the homelab AppProject in projects.yaml for orphan handling, but 1646 restricts allowed kinds and sets up orphan reporting while the candidate adds one ConfigMap to the ignore list.devops-cli-service commentedon Nov 16, 2026
Alternatives check: in-use
Reason: Argo CD already ships the exact mechanism the issue proposes: AppProject orphanedResources ignore rules, keyed by Group, Kind and Name, prevent a resource from being reported as an orphan. The issue's body names Argo CD (and its AppProject ignore list) as a tool the homelab already runs, so the need is covered by a tool already in use rather than by new code.
The repository already uses this tool.
Tool: argoproj/argo-cd (https://github.com/argoproj/argo-cd)
Covers:
Lacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-16. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 17, 2026
Status set to Ready at 73743a2 (see proposed design in issue body).
devops-cli-service commentedon Nov 18, 2026
Released in v0.177.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.177.0
devops-cli-service commentedon Nov 18, 2026
Live since 2026-11-18 16:28 UTC