Post

Teaching My CI Gate About Kagent's Public Secret Reference

Teaching My CI Gate About Kagent's Public Secret Reference

A red CI status is only useful if it points at a real problem. This push fixes a false positive: my checks were rejecting the Secret reference that Kagent legitimately points at, because the rule that validates secret references did not know that this particular name is meant to be public in the manifest tree. The commit is small and merged, but its value is calibration — a guardrail that stays quiet on the intended pattern is a guardrail I will keep trusting for the cases that actually matter.

Making the CI check recognize the intended Secret reference

The change lands under the Argo CD application directory for Kagent, alongside the manifests that declare the agent. Rather than contorting the workload to satisfy the linter, I taught the recognition logic about the public reference so the gate distinguishes an intentionally shared name from a leaked credential. That keeps the declaration readable and puts the exception where it belongs: in the policy layer, not smeared across the application manifests.

The design principle I leaned on is that checks should encode intent explicitly. An inline ignore comment on the offending line is invisible to anyone auditing the rule, and it makes the whole policy look untrustworthy. Naming the pattern once, in the place that owns the decision, gives future me a single spot to review when the reference changes.

What the merge proves, and what it does not

The evidence here is a merged commit and its subject line; the changed manifests are not exposed in this push’s summary, so I am describing the shape of the fix, not re-reading its diff. What is established is that the CI configuration moved. What is not established is any runtime behaviour: nothing in this evidence shows the application reconciling, the workload starting, or the reference resolving at cluster level.

The next check I owe this change is a sync in Argo CD followed by a look at whether the agent’s pods reach a healthy state and can still reach its configured model or tool endpoints. If that surfaces a genuine credential problem, the CI rule was right the first time and my exception is wrong. Until then I am treating this as a pipeline fix, not an operational win.

Where this transfers to a platform team

Every platform team eventually hits the same tension: a policy that guards against secret sprawl also fires on deliberately public names, and the first instinct is to bypass it per workload. The durable pattern is a named, reviewable exception that the validator understands, with the policy change living in the same repository as the manifests it governs. The situation I would hand to a team is a new service onboarding into an existing admission or lint pipeline where a shared non-sensitive reference trips the scanner — fix the rule’s vocabulary once, document why the name is public, and keep the alarm loud for everything else.

This post is licensed under CC BY 4.0 by the author.