Skip to content

feat(argocd): deploy the danielpetty-com event-stream from its repository #6644

Closed as not planned

Description

@dan-petty

Problem

Checked at devops-cli main 3f8f7a9.

  • dan-petty/danielpetty.com#29 adds Kustomize manifests in k8s/event-stream/ of the private repository dan-petty/danielpetty.com. They name the real host, so they need no deploy-time host patch. No Application syncs them. feat(argocd): accept the site repository as an outside source #6643 lets the devops-cli checks accept that source.
  • Argo CD Image Updater keeps only Application devops on new digests (k8s/argocd/image-updater-values.yaml:16-30). It writes spec.source.kustomize.images on the Application and nothing into git (:4-7). The app-of-apps cluster ignores that field only for the Applications that it lists (ignoreDifferences in k8s/argocd/bootstrap/cluster.yaml), and such an Application sets ServerSideApply=true (k8s/argocd/apps/devops.yaml:10). SERVICE_PATTERNS SC5: Image Updater pins each project image by digest. It reads GHCR with no credential, because the packages are public (image-updater-values.yaml:8-9).
  • k8s/catalog.toml has no entry for the site (rule SRE1). No alert covers a stale harvest: the page then shows old items, and only a log line tells.
  • The wildcard Access application of *.<domain> admits only the owner (k8s/README.md:930-934). A visitor of danielpetty-com.<domain> gets the Access login. The precedent for a public route is the Bypass application of hooks.<domain>/webhooks/github (docs/CLUSTER.md:39). devops cloudflare access sync makes only allow and IP-bypass policies (src/devops_cli/cloudflare/client.py:244-251), so the owner makes the Bypass application in the dashboard.
  • TLS ends at the Cloudflare edge, and each request reaches the Traefik web entrypoint as plain HTTP, so Traefik cannot redirect http:// to https://. With a Bypass application, a plain http:// request goes to the app unless the zone setting Always Use HTTPS is on. No devops-cli document names this setting. HSTS has an effect only after the first https:// visit, and the site sets no preload.
  • The deploy notifier writes a GitHub deployment with environment {{.app.metadata.name}} (k8s/argocd/values.yaml, template app-deployed) and acts as the GitHub App devops-cli-argocd (k8s/README.md:1258).
  • k8s/README.md:1160 says "Until feat(k8s): Point Argo CD to Gitea for git and PR dev images #1082, no workload pulls from it", but feat(k8s): Point Argo CD to Gitea for git and PR dev images #1082 is closed.

Proposed remedy

Use Argo CD and Argo CD Image Updater as the cluster runs them.

  • k8s/argocd/apps/danielpetty-com.yaml, the pattern of k8s/argocd/apps/mattermost.yaml: project danielpetty-com (feat(k8s): add the danielpetty-com namespace, project and Secret row #6642); repoURL: https://github.com/dan-petty/danielpetty.com; targetRevision: main; path: k8s/event-stream; destination namespace danielpetty-com; finalizer resources-finalizer.argocd.argoproj.io; automated prune and selfHeal; retry limit 5; SkipDryRunOnMissingResource=true; annotations notifications.argoproj.io/subscribe.on-deployed.github and argocd.argoproj.io/sync-options: ServerSideApply=true. No entry in CONST_K8S_ARGOCD_HOMELAB_APPLICATIONS_BY_STACK: the manifests need no host patch.
  • k8s/argocd/bootstrap/cluster.yaml: an ignoreDifferences entry on /spec/source/kustomize of Application danielpetty-com.
  • k8s/argocd/image-updater-values.yaml: an ImageUpdater for Application danielpetty-com, image ghcr.io/dan-petty/danielpetty.com/event-stream:main, updateStrategy: digest. A pod of the Application runs the image, so forceUpdate is not needed.
  • k8s/catalog.toml: a [[service]] danielpetty-com, applications = ["danielpetty-com"], tier = 3, data_class = "owned" (the notes exist only there).
  • k8s/monitoring/prometheus-values.yaml, alerting_rules.yml: EventStreamHarvestStale, severity warning (no page). It fires when a source has no good harvest for 1 hour (event_stream_harvest_last_success_timestamp_seconds, feat(event-stream): export harvest metrics on a private port danielpetty.com#28). Add the promtool unit test tests/fixtures/prometheus_rules/danielpetty_com_tests.yaml, which tests/prometheus/test_k8s_monitoring_alerting.py runs, and a runbook row in the Alerting table of k8s/README.md. TargetDown already covers a lost scrape.
  • k8s/README.md and docs/CLUSTER.md: name the Application, its outside source and its Image Updater target. In the Cloudflare section, give the Bypass application and the Always Use HTTPS check of the person steps, with the host written as danielpetty-com.<domain>. Give the rollback path: a revert in the site repository (dan-petty/danielpetty.com#29 runbook), not argocd app rollback. At k8s/README.md:1160, remove the stale feat(k8s): Point Argo CD to Gitea for git and PR dev images #1082 sentence and say that the site image is a public GHCR package.

Premise check: as in #6642 (#5134 plan step 12).

Acceptance criteria

  • uv run devops ci --check --only k8s,kube-linter,domain passes. On this pull request, the Image Pins workflow and the kube-linter step of the CI workflow pass in GitHub Actions.
  • The promtool unit test of EventStreamHarvestStale passes.
  • After the merge: kubectl -n argocd get application danielpetty-com -o jsonpath='{.status.sync.status} {.status.health.status}' prints Synced Healthy.
  • kubectl -n argocd get application danielpetty-com -o jsonpath='{.spec.source.kustomize.images}' shows the event-stream image with an @sha256: digest.
  • devops gh api repos/dan-petty/danielpetty.com/deployments --jq '.[0].environment' prints danielpetty-com.
  • kubectl -n danielpetty-com get pods shows 1 Ready pod with 0 restarts after 30 minutes, and the PV of claim event-stream-data has the reclaim policy Retain.
  • Within 10 minutes of the first start, Prometheus has event_stream_harvest_last_success_timestamp_seconds for github and for each feed host, and increase(event_stream_harvest_failures_total[10m]) is 0. curl -fsS https://danielpetty-com.<domain>/api/activities returns at least one item.
  • Prometheus has up == 1 for the event-stream target, and its rules API lists EventStreamHarvestStale.
  • After person step 3: devops cloudflare access status lists an application for danielpetty-com.<domain>, and devops cloudflare access policies <app-id> --json shows one policy with decision bypass that includes everyone.
  • From the workstation: curl -sI https://danielpetty-com.<domain>/ returns 200 with a Strict-Transport-Security header, and curl -fsS 'https://danielpetty-com.<domain>/.well-known/webfinger?resource=acct:dan@danielpetty-com.<domain>' returns the actor link.
  • curl -s -o /dev/null -w '%{http_code}' -X POST https://danielpetty-com.<domain>/api/notes (no key) prints 401.
  • After person step 5: curl -sI http://danielpetty-com.<domain>/ returns 301 with a Location that starts with https://.
  • curl -sN --max-time 300 https://danielpetty-com.<domain>/api/stream/events stays open for 300 s and gets a comment line at least every 20 s.

Person steps

Before the merge:

  1. Do feat(k8s): add the danielpetty-com namespace, project and Secret row #6642 person steps 2, 3 and 4: push the Secret, add the site repository to the installation of devops-cli-argocd, and create the repository Secret.
  2. Make the event-stream package public (ci(image): publish the event-stream image to GHCR danielpetty.com#25).

After the merge and a Healthy sync:
3. In Cloudflare Zero Trust, add a self-hosted Access application for host danielpetty-com.<domain> with one Bypass policy that includes Everyone, as for the GitHub webhook path.
4. Check that Bot Fight Mode is off for the zone. WAF custom rules and Page Rules cannot skip it, and it can challenge the requests of remote servers that read the actor and WebFinger (https://developers.cloudflare.com/bots/get-started/bot-fight-mode/).
5. Check that Always Use HTTPS is on for the zone, or add a single redirect rule for the host.
6. From a network outside the IP bypass (for example a phone on mobile data), open https://danielpetty-com.<domain>/. The page loads with no Access login. Write the result on this issue.

Dependencies

Alternatives check of 2026-11-21: 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-20, maintained.
Reason: Searches found Argo CD, which the project already runs, and its Image Updater: together they sync the Kustomize manifests from the site repository and pin the image by digest, but they do not supply the catalog entry, alert rule or Cloudflare steps.

Covers:

  • Application syncs Kustomize manifests from a private Git repository
  • Automated prune and selfHeal with a retry limit
  • Image Updater pins the event-stream image by digest
  • ignoreDifferences stops self-heal reverting kustomize.images

Lacks:

  • No catalog entry with service tier and data class
  • No stale-harvest alert rule or promtool unit test
  • No Cloudflare Access bypass, Always Use HTTPS or docs
  • Application and ImageUpdater entries are still written by hand

Activity

  1. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
  2. added
    type/feature
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    scope/argocd
    on Nov 21, 2026
  3. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (10)

    Tools considered:

    Searches run:

    • Argo CD Image Updater digest update strategy image, results: 5
    • Argo CD deploy Kustomize manifests from private Git repository Application, results: 5
    • argocd-image-updater GitHub, results: 5
    • Prometheus alert rule last success timestamp stale data, results: 5
    • Cloudflare Access bypass policy public application, results: 5
    • kustomize, results: 5
    • Argo CD ApplicationSet generator git repository, results: 5
    • argocd-image-updater, results: 5
    • Flux CD image automation digest kustomize controller, results: 5
    • argo-cd private repository credentials kustomize documentation, results: 5

    Sources:

  4. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned. The services ApplicationSet (dan-petty/infra#11, dan-petty/homelab#80) makes Application danielpetty-com from the services entry of the site (dan-petty/homelab#85): automated sync, the ignore of /spec/source/kustomize/images, and the Image Updater annotations (image list, digest strategy, argocd write-back) that the template writes from the image list of the entry. One ImageUpdater object service-repos with labelSelectors and useAnnotations: true selects it. Deploy statuses come from the AppProject annotation of the tenant chart (dan-petty/infra#10). The Cloudflare Access Bypass, the Always Use HTTPS check, the rollback runbook and the live checks move to dan-petty/danielpetty.com#29. The alert EventStreamHarvestStale moves to the site repository as a labelled ConfigMap, which homelab loads through the generic path of dan-petty/homelab#83. No row goes into k8s/catalog.toml, because no code reads that file.

  5. removed
    status/new
    on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/argocdsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions