Skip to content

fix(k8s): resolve argocd application out-of-sync and manifest generation failures (#1279) - #1281

Merged
dan-petty merged 3 commits into
release/v0.2.28from
fix/1279-argocd-out-of-sync
Oct 7, 2026
Merged

dan-petty merged 3 commits into
release/v0.2.28from
fix/1279-argocd-out-of-sync

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Problem

Argo CD applications were in degraded/out-of-sync or error states:

  1. ingress application: Out of sync because loki-ingress had port: null in k8s/overlays/homelab/ingress/kustomization.yaml and blank port in k8s/ingress/ingress-routes.yaml, failing Kubernetes Ingress schema validation (Ingress in version "v1" cannot be handled as a Ingress: json: cannot unmarshal bool into Go struct field ... of type int32).
  2. base and monitoring applications: Out of sync due to resource ownership conflicts:
    • Root k8s/kustomization.yaml included monitoring/dashboards while the dedicated monitoring application also deployed Grafana dashboards in namespace monitoring.
    • k8s/monitoring/service-aliases.yaml created Service/pyroscope, which conflicted with the pyroscope Helm chart managed by the infra stack.
      These ownership collisions caused continuous synchronization churn (SharedResourceWarning).
  3. devops application: Argo CD reported ComparisonError: ... k8s/devops/configmap.yaml: no such file or directory because k8s/devops/configmap.yaml was gitignored in PR feat(k8s): argo cd keeps cluster at declared state and release workflow alignment (#755) #1256 and missing from the git repository.

Closes #1279.

Solution

  1. Fix Loki Ingress Port Specification:
    • Explicitly configured port: { number: 3100 } on loki-ingress in k8s/ingress/ingress-routes.yaml and k8s/overlays/homelab/ingress/kustomization.yaml.
  2. Deduplicate Resource Ownership Between Stacks:
    • Removed monitoring/dashboards from root k8s/kustomization.yaml, leaving dashboard ownership strictly to the monitoring application.
    • Removed redundant Service/pyroscope from k8s/monitoring/service-aliases.yaml so the Pyroscope Helm release exclusively owns its Service.
    • Updated tests/test_k8s_monitoring_dashboards.py to assert root kustomization leaves dashboards to monitoring.
    • Updated tests/test_k8s_monitoring_integration.py to account for Helm-managed services when validating addressed monitoring services.
  3. Track Base Devops ConfigMap & Overlay:
    • Un-ignored /k8s/devops/configmap.yaml in .gitignore and committed the generic base ConfigMap template (k8s/devops/configmap.yaml).
    • Configured homelab overlay patch in k8s/overlays/homelab/devops/kustomization.yaml to provide homelab repo and machine account definitions while adhering to template hygiene and environment sanitization rules.
  4. Changelog:
    • Added changelog fragment changelog.d/1279.md.

Verification

  • Unit and integration tests:
    • tests/test_k8s_monitoring_dashboards.py (5/5 passed)
    • tests/test_k8s_monitoring_integration.py (11/11 passed)
  • Kustomize build validation:
    • kubectl kustomize k8s/overlays/homelab/devops (clean exit code 0)
    • kubectl kustomize k8s/overlays/homelab/ingress (clean exit code 0)
  • Pre-push quality gate:
    • uv run devops ci passed 100% locally across all 14 checks.

@dan-petty
dan-petty force-pushed the fix/1279-argocd-out-of-sync branch from eeb12b1 to dc46dec Compare October 7, 2026 12:57
…ve private references (#1279)

- Add devops k8s argocd-source command and devops_cli.k8s.argocd_source module
- Generate .argocd-source.yaml parameter overrides for devops and ingress overlays
- Remove hardcoded domain patches and ignoreDifferences
- Remove devops k8s push-config command in favor of .argocd-source.yaml overrides
- Sanitize internal hostnames, .lan servers, and private domains from repository
@dan-petty
dan-petty merged commit 3f02ee9 into release/v0.2.28 Oct 7, 2026
9 checks passed
@dan-petty
dan-petty deleted the fix/1279-argocd-out-of-sync branch October 7, 2026 14:28
dan-petty added a commit that referenced this pull request Oct 7, 2026
…d the repository holds no private or placeholder config (#1290) (#1292)

* fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config (#1290)

Argo CD reads .argocd-source.yaml only from the Git repository, so the gitignored generator from #1281 never reached it, and the tracked placeholder ConfigMap was enforced over the rendered one. deploy-stack now renders ConfigMap devops-cli-config from config.yaml outside Argo CD, and writes the configured hosts onto the devops and ingress Applications as Kustomize patches that the cluster app-of-apps ignores. Everything is rendered before anything is written, and an unset setting stops it with an error naming the setting.

Closes #1290

* fix(k8s): derive the argo cd host overrides from each application's revision, and close the review's gaps (#1290)

The host patches now come from what each Application renders at its targetRevision (or --argocd-revision), fetched into a temporary directory, never from the local checkout. They reuse the native template substitution and cover wildcard and TLS hosts. The ConfigMap renderer has no placeholder fallback, teardown deletes the ConfigMap, the dry run reports the new writes and refuses like the deploy, AppProject homelab ignores the orphaned ConfigMap, and the docs describe the release-merge steps.

* fix(k8s): git never reads an application's repository or revision as an option, and deploy-stack refuses to clear staged hosts (#1290)

The revision fetch reads the repository and revision after --end-of-options, without prompts and within a time limit. A revision whose Application renders no placeholder host is refused instead of writing an empty patch list, and a multi-source Application is refused by name. The dry run reports the domain the overrides would use, the docs set the service settings before the first deploy, describe the release-merge steps for releases after this one, and the changelog fragment drops the Removed entry for a command that never shipped.

* docs(k8s): the release-merge steps re-apply the devops config map when its template changes, and the dry run names why a domain is unusable (#1290)
dan-petty added a commit that referenced this pull request Oct 7, 2026
* fix(k8s): track main in argo cd git-source targetRevisions while service image pins release (#1261) (#1262)

* fix(k8s): track main in argo cd git-source targetRevisions while service image pins release (#1261)

* fix(release): parse applications in release prepare and generalize manifest counts

* fix(ui): defer dashboard refresh when unmounted to prevent NoMatches worker failure (#519) (#1263)

* fix(ui): defer dashboard refresh when unmounted to prevent NoMatches worker failure (#519)

* fix(k8s): ensure devops configmap exists in clean test environments

* fix(security): redact telemetry and kill process group on timeout in async process runner (#780) (#1264)

* fix(ai): web_fetch reports a failed fetch as a tool failure, not as page text (#894) (#1265)

* feat(ai): web_fetch renders pages as untrusted, escaped markdown within a budget (#896) (#1266)

* feat(ai): web_fetch renders pages as untrusted, escaped markdown within a budget (#896)

* fix(deps): pin markdownify and beautifulsoup4 to exact versions matching uv.lock

* fix(k8s): resolve portkey probe path and gpu-feature-discovery image tag (#1267) (#1268)

* fix(k8s): resolve portkey probe path and gpu-feature-discovery image tag (#1267)

- Fix Portkey AI Gateway liveness and readiness probe path to / instead of /health, resolving CrashLoopBackOff
- Align GPU Feature Discovery image to nvcr.io/nvidia/k8s-device-plugin:v0.16.2 to resolve ImagePullBackOff
- Update devops-cli AI gateway probe helper to check / for the Portkey provider
- Update test_k8s.py assertions and author changelog fragment and task tracking

* fix(test): disable logfire pytest plugin to prevent ambient telemetry DNS lookups (#1267)

* fix(ai): mcp command tools return the failing output and never write to the protocol stream (#839) (#1269)

* refactor(github): read a pull request's checks once, fail-closed, for wait, monitor and readiness (#769)

* feat(k8s): increase roadmap-service analysis context window to 64k (#1271) (#1272)

* fix(review): a verdict that both confirms and refutes its finding stays unverified with a contradiction note (#1059) (#1273)

* fix(ai): a failing embedding model pauses rag lookups instead of ending rag for the run (#1065) (#1274)

* fix(ai): review calls through the gateway no longer stall on ollama (#1069)

* docs: hand-written docs name only commands, options, and architecture patterns that exist (#921) (#1276)

* fix(review): a review scans a worktree of the reviewed revision, never hands a deleted file to a tool, and reports which files each tool scanned (#1047) (#1277)

* feat(review): every reported finding is admitted with anchor and commit location (#871) (#1278)

* fix(release): finalize v0.2.28 release preparation, changelog collation, and image pin

* fix(k8s): resolve argocd application out-of-sync and manifest generation failures (#1279) (#1281)

* fix(k8s): resolve argocd application out-of-sync and manifest generation failures (#1279)

* feat(k8s): add push-config command and dynamic configmap deployment

* feat(k8s): generate gitignored .argocd-source.yaml overrides and remove private references (#1279)

- Add devops k8s argocd-source command and devops_cli.k8s.argocd_source module
- Generate .argocd-source.yaml parameter overrides for devops and ingress overlays
- Remove hardcoded domain patches and ignoreDifferences
- Remove devops k8s push-config command in favor of .argocd-source.yaml overrides
- Sanitize internal hostnames, .lan servers, and private domains from repository

* fix(review): address copilot review remediations and collate changelog for v0.2.28 (#1284)

* fix(release): address second-round copilot review remediations for v0.2.28 (#1285)

* fix(k8s): apply active devops configmap dynamically via stdin without overwriting tracked files (#1286)

* fix(review): sanitize code language and propagate added diff lines to admission (#1287)

* fix(k8s): stream rendered ingress and patch argo cd application overrides during deployment (#1288)

* fix(review): integrate advisory anchor, base fingerprints, and fail-closed configmaps (#1289)

* fix(review): integrate advisory anchor, base fingerprints, and fail-closed configmaps

* refactor(review): isolate scanner file buckets into strongly-typed dataclass

* fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config (#1290) (#1292)

* fix(k8s): argo cd takes homelab values from deploy-time overrides, and the repository holds no private or placeholder config (#1290)

Argo CD reads .argocd-source.yaml only from the Git repository, so the gitignored generator from #1281 never reached it, and the tracked placeholder ConfigMap was enforced over the rendered one. deploy-stack now renders ConfigMap devops-cli-config from config.yaml outside Argo CD, and writes the configured hosts onto the devops and ingress Applications as Kustomize patches that the cluster app-of-apps ignores. Everything is rendered before anything is written, and an unset setting stops it with an error naming the setting.

Closes #1290

* fix(k8s): derive the argo cd host overrides from each application's revision, and close the review's gaps (#1290)

The host patches now come from what each Application renders at its targetRevision (or --argocd-revision), fetched into a temporary directory, never from the local checkout. They reuse the native template substitution and cover wildcard and TLS hosts. The ConfigMap renderer has no placeholder fallback, teardown deletes the ConfigMap, the dry run reports the new writes and refuses like the deploy, AppProject homelab ignores the orphaned ConfigMap, and the docs describe the release-merge steps.

* fix(k8s): git never reads an application's repository or revision as an option, and deploy-stack refuses to clear staged hosts (#1290)

The revision fetch reads the repository and revision after --end-of-options, without prompts and within a time limit. A revision whose Application renders no placeholder host is refused instead of writing an empty patch list, and a multi-source Application is refused by name. The dry run reports the domain the overrides would use, the docs set the service settings before the first deploy, describe the release-merge steps for releases after this one, and the changelog fragment drops the Removed entry for a command that never shipped.

* docs(k8s): the release-merge steps re-apply the devops config map when its template changes, and the dry run names why a domain is unusable (#1290)

* chore(release): the v0.2.28 changelog takes #1290 and drops the argocd-source entry it replaced (#1293)

* fix(k8s): a native deploy-stack applies the grafana dashboards again (#1297) (#1306)

* fix(ai): an interrupted rag index resumes every file whose chunks were not all stored (#1296) (#1305)

* fix(ai): an interrupted rag index resumes every file whose chunks were not all stored (#1296)

* fix(ai): a partly stored rag file is cached as incomplete, so its points are purged if it changes before the resume (#1296)

* fix(review): suppressed and pre-existing scanner findings reach their review.md sections, and profile.json counts admission rejections (#1295) (#1304)

* fix(review): suppressed and pre-existing scanner findings reach their review.md sections, and profile.json counts admission rejections (#1295)

* fix(review): each suppressed finding is its own row, by file and line, in review.md (#1295)

* chore(release): the v0.2.28 changelog takes #1295, #1296 and #1297 into the entries they complete (#1340)

* fix(review): an inline suppression marker hides only findings of the tool it belongs to (#1341) (#1342)

* fix(review): an inline suppression marker hides only findings of the tool it belongs to (#1341)

* chore(release): the v0.2.28 changelog records #1341 in the #871 entry, in this one pull request (#1341)

* chore(release): the v0.2.28 notes say dependency advisories are always listed as introduced and gateway reviews can exceed the slot count (#1355)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

1 participant