Skip to content

feat(k8s): post a GitHub deployment for each Argo CD deploy - #3783

Merged
dan-petty merged 4 commits into
mainfrom
feat/3779-argocd-github-deployments
Nov 6, 2026
Merged

dan-petty merged 4 commits into
mainfrom
feat/3779-argocd-github-deployments

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Argo CD writes a GitHub deployment for each deploy of an Application that has one GitHub source. The change adds the notifier service.github, which uses the GitHub App devops-cli-argocd and only the Deployments permission. It also repairs the existing Mattermost notifier. With the chart argo-cd 10.9.6, a mapping under notifications.notifiers renders as a mapping in ConfigMap.data. The sync of the Application argocd then fails with 'cannot unmarshal object into Go struct field ConfigMap.data of type string', and the controller logs 'trigger on-deployed is not configured' each minute. So each notifier is now a string, and a test pins it. A static test is used, because a chart render needs the network. The trigger keys oncePer on the revision that the notifier reads. The three GitHub secret keys are required, because one bad notifier stops all notifications. Merging deploys this through Argo CD.

Closes #3779

Change: openspec/changes/archive/2026-11-06-3779-argocd-github-deployments/

Add the notifier service.github, a github.deployment block in the template app-deployed, and the on-deployed.github subscription on each single-source GitHub Application. Plans #3779 as an OpenSpec change.
Key oncePer on operationState.syncResult.revision, require the three GitHub secret keys, and split long sentences of the plan.
A mapping under notifications.notifiers renders as a mapping in ConfigMap.data, which the API server refuses. Write each notifier as a block scalar and test that every value is a string.
@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 6, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Test results and review notes.

Full uv run devops ci on the final code: all gates passed except pytest & coverage. In that run 19665 tests passed, 2 failed and 1 errored. The three are host-state cases of #3585. They are outside this change:

  • tests/ai/test_tool_executor_contract.py (popeye binary path, host path guard)
  • tests/commands/test_devcontainer_install_tools_dry_run.py (tool install state)

After the rebase onto origin/main, tests/invariants/test_k8s_argocd_apps.py, tests/k8s and tests/commands/k8s pass (1172 tests), and devops openspec check passes.

This is a feat, so CONTRIBUTING.md asks for no fail-to-pass run. The new tests were written first and failed on the base values.

Review findings (all three were right and are fixed):

  1. oncePer now is app.status.operationState?.syncResult?.revision, the revision that the notifier reads. The message and the Mattermost text read the same value. A test pins it.
  2. The three GitHub keys of argocd/argocd-notifications-secret are required in the push. The README table and the OpenSpec change say so.
  3. Sentences of more than 25 words in the README and the OpenSpec files are split.

Extra finding, from the parent session: a mapping under notifications.notifiers renders as a mapping in ConfigMap.data (chart argo-cd 10.9.6), and the sync of the Application argocd fails. Each notifier is now a block scalar string. A static test checks that every notifier, trigger and template value is a string. A render test would need network access, so the test reads the values. I checked the render by hand: helm template argocd argo-cd --repo https://argoproj.github.io/argo-helm --version 10.9.6 --namespace argocd -f k8s/argocd/values.yaml gives only string values in argocd-notifications-cm, with the new oncePer and template.

@dan-petty
dan-petty marked this pull request as ready for review November 6, 2026 08:45
@dan-petty
dan-petty merged commit 5515975 into main Nov 6, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/3779-argocd-github-deployments branch November 6, 2026 08:49
dan-petty pushed a commit that referenced this pull request Nov 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.69.0](v0.68.0...v0.69.0)
(2026-11-06)


### Features

* **k8s:** post a GitHub deployment for each Argo CD deploy
([#3783](#3783))
([5515975](5515975))


### Bug Fixes

* **k8s:** the ebpf profiler skips the node hawk
([#3788](#3788))
([bd65ef6](bd65ef6))


### Code Refactoring

* **cli:** one HTTP entry point with a shared fake
([#3786](#3786))
([0feeb8b](0feeb8b)),
closes [#3755](#3755)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): Argo CD posts a GitHub deployment for each deploy

1 participant