83 lines
4.0 KiB
YAML
83 lines
4.0 KiB
YAML
# Tracked copy of the live `medical-chatbot-app` Application (k3s, personal
|
|
# ArgoCD instance at argocd.realvuxbaro.me). Verified against the live object
|
|
# 2026-08-18 — every field below matches `status.sync.status: Synced`,
|
|
# `status.health.status: Healthy`.
|
|
#
|
|
# This Application serves BOTH realvuxbaro.me and readytochat.realvuxbaro.me
|
|
# (same release, same Pods) since the 2026-08-17 cutover.
|
|
#
|
|
# Deliberately NOT reproduced here: `spec.source.helm.values`. The live
|
|
# Application carries two things inline that must never live in Git:
|
|
#
|
|
# - aiService.image.tag / web.image.tag — rewritten on every push by
|
|
# .github/scripts/sync_practice_argocd.py (or by rollback-k3s.yml for a
|
|
# rollback). A tag committed here would go stale the moment CI runs again,
|
|
# and applying this file naively would silently roll the running image
|
|
# back to whatever tag happened to be in Git.
|
|
# - secret.grafanaAdminPassword — a real credential. It must never enter
|
|
# Git history. It belongs in a proper Kubernetes Secret referenced via
|
|
# `secret.existingSecret` (see infra/helm/medical-chatbot/values.yaml),
|
|
# not inline on the Application — that migration hasn't been done yet
|
|
# (it needs cluster write access this repo's automation doesn't have).
|
|
#
|
|
# Applying this file (`argocd app create -f` or the ArgoCD UI) recreates the
|
|
# Application's STRUCTURE — source, destination, sync policy — for disaster
|
|
# recovery. It does NOT restore the current image tag or the Grafana
|
|
# password: set the tag afterward via `rollback-k3s.yml` (target_sha = the
|
|
# last known-good commit) and re-enter the Grafana password by hand.
|
|
#
|
|
# ---------------------------------------------------------------------------
|
|
# EDITING THE INLINE VALUES BY HAND — read this first (2026-08-18 outage)
|
|
# ---------------------------------------------------------------------------
|
|
# Editing `spec.source.helm.values` through the ArgoCD UI broke this
|
|
# Application for ~16 hours. The UI saved the block as a FOLDED scalar
|
|
# (`values: >`), and a folded scalar joins consecutive same-indent lines into
|
|
# one. Three comment lines sat directly above `aiService:` at the same indent,
|
|
# so all four became a single line and `aiService:` ended up *inside* the
|
|
# comment — leaving YAML that cannot parse at all.
|
|
#
|
|
# It failed silently and misleadingly. ArgoCD kept reporting `Synced` (its
|
|
# last successful render was hours stale), the UI's PARAMETERS tab still
|
|
# showed sensible values, and the site stayed up — Kubernetes will not retire
|
|
# working pods until a replacement goes Ready, and the replacement never
|
|
# could. Meanwhile every override in the block was being ignored: the GHCR
|
|
# image repositories (so Deployments fell back to the chart-default
|
|
# `duocthu-*:local`, which exists in no registry) and `authService`/
|
|
# `apiGateway` `enabled: true` (so neither was ever created).
|
|
#
|
|
# Therefore:
|
|
# - Do NOT put comments in the inline values. Explain things here instead;
|
|
# this file is version-controlled and no text box can mangle it.
|
|
# - Prefer the API over the UI for edits — see
|
|
# .github/scripts/repair_argocd_inline_values.py, which reads the live
|
|
# object, edits the string, and PUTs it back with the structure intact.
|
|
# - After ANY inline edit, verify with
|
|
# `.github/workflows/inspect-argocd-app.yml`: it dumps the raw string one
|
|
# escaped line at a time, which is the only view that reveals where the
|
|
# newlines actually are. The pretty-printed view looked almost correct
|
|
# throughout the outage.
|
|
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: medical-chatbot-app
|
|
namespace: argocd
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: https://github.com/BaoVu2k4/vsf-duocthu.git
|
|
targetRevision: master
|
|
path: infra/helm/medical-chatbot
|
|
helm:
|
|
valueFiles:
|
|
- values.yaml
|
|
- values-production.yaml
|
|
destination:
|
|
server: https://kubernetes.default.svc
|
|
namespace: medical-chatbot-app
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|