Repository navigation
fix(k8s): a manual sync of the app-of-apps drops the homelab host overrides and every public hostname returns 404 - #2195
Merged
Conversation
…rrides and every public hostname returns 404 The app-of-apps `cluster` applied the Applications `devops` and `ingress` client-side. Client-side apply deletes each field that the last-applied annotation holds and git does not, and `RespectIgnoreDifferences=true` writes the host overrides into that annotation. A manual sync can omit that option, so the sync of 2026-10-21 deleted the overrides. - The two Applications have the annotation `argocd.argoproj.io/sync-options: ServerSideApply=true`. Argo CD reads it in every sync, automated or by hand. Server-side apply keeps the fields that deploy-stack and Image Updater own. - `cluster` names `argocd-controller` as its client-side apply migration manager, so a field that git removes from the two Applications also leaves the cluster. - The critical alert `IngressServesPlaceholderHost` fires when an Ingress routes a host under the placeholder domain, from `kube_ingress_path`, which the kube-state-metrics allow list now keeps. - k8s/README.md tells which actions still remove the overrides, the alert and the commands that set them again, and names #1291. Closes #1817
dan-petty
marked this pull request as ready for review
October 24, 2026 22:48
dan-petty
pushed a commit
that referenced
this pull request
Oct 24, 2026
🤖 I have created a release *beep* *boop* --- ## [0.4.3](v0.4.2...v0.4.3) (2026-10-24) ### Bug Fixes * **k8s:** a manual sync of the app-of-apps drops the homelab host overrides and every public hostname returns 404 ([#2195](#2195)) ([7c97467](7c97467)) * **review:** the review pipeline reports the eight failures it now swallows, and reads a file in one place ([#2196](#2196)) ([da401c6](da401c6)), closes [#2160](#2160) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
5 tasks
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.
Summary
On 2026-10-21, a manual sync of 17 Applications from the Argo CD UI, among them
cluster, deleted the host overrides inspec.source.kustomizeof the Applicationsingressanddevops. Argo CD then rendered the placeholder hosts of git, and every public host returned 404 untildevops k8s deploy-stackset the overrides again.Cause, from Argo CD v3.5.3 (the live version) and read-only commands on the cluster:
clusterapplied the two Applications client-side. Client-side apply deletes each field that thelast-applied-configurationannotation holds and git does not (Argo CD sync-options documentation). TheRespectIgnoreDifferences=trueoption ofclustercopies the live overrides into the applied manifest, so the live annotation of both Applications holdsspec.source.kustomize.controller/sync.go). A manual sync takes the options of the request, and the options of the spec only when the request has none (server/application/application.go). So a manual sync can omit the option, and no Argo CD setting adds it.kubectl diff --field-manager=argocd-controller(a server-side dry run, which writes nothing) of the two manifests as git holds them shows the deletion ofspec.source.kustomizeon both.Fix:
k8s/argocd/apps/ingress.yamlanddevops.yamlget the annotationargocd.argoproj.io/sync-options: ServerSideApply=true. gitops-engine reads it in every sync, whatever the options of the operation are (shouldUseServerSideApply). Server-side apply deletes only the fields of its own field manager. The live managed fields give the patches tokubectl-patch(deploy-stack) and the image digest to Image Updater.kubectl diff --server-side --force-conflicts --field-manager=argocd-controllerwith the annotation shows only the new annotation, andspec.source.kustomizestays.k8s/argocd/bootstrap/cluster.yamlgetsargocd.argoproj.io/client-side-apply-migration-manager: argocd-controller. The client-side apply of Argo CD writes the managed field entryargocd-controller(operationUpdate), not the default migration managerkubectl-client-side-apply. With the annotation, the first server-side sync moves the fields of that entry to the server-side apply entry, so a field that git removes from the two Applications also leaves the cluster.IngressServesPlaceholderHost(5m) fires for each Ingress that routes a host under the placeholder domain, fromkube_ingress_path. The kube-state-metricsincludeMetricsnow keeps that series, because the default allow list of the chart drops it. The alert only reads.k8s/README.md(GitOps, Homelab Values at Deploy Time) tells why a sync keeps the overrides, which actions still remove them (a recreated Application, a Replace sync without Respect Ignore Differences), the alert, and the commands that set them again. It names feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291, which moves the values out of the Applications to a private repository on the in-cluster Gitea after feat(k8s): Point Argo CD to Gitea for git and PR dev images #1082.Tests:
tests/test_k8s_argocd_apps.pypins the annotations.tests/test_k8s_monitoring_alerting.pypins the rule and its series, and checks its host pattern against every Ingress host in git. The tests read files only.devops ci fail-to-pass --base origin/mainshows the four new or changed tests fail on the base.Item
Closes #1817
Change:
openspec/changes/archive/2026-10-24-1817-manual-sync-keeps-host-overrides/