Skip to content

fix(cert-manager): do not emit an empty helm parameters key - #225

Merged
danielgines merged 1 commit into
mainfrom
fix/cert-manager-empty-parameters
Aug 23, 2026
Merged

fix(cert-manager): do not emit an empty helm parameters key#225
danielgines merged 1 commit into
mainfrom
fix/cert-manager-empty-parameters

Conversation

@danielgines

Copy link
Copy Markdown
Member

Num provider que não é aws nem azure, e sem provenance de git injetada, toda entrada sob parameters: é pulada e a chave renderiza vazia. O API server lê isso como null e recusa a Application:

spec.sources[0].helm.parameters in body must be of type array: "null"

E o sync inteiro do platform-root falha junto — um objeto que não aplica reprova a operação, não só o seu próprio Application.

Por que nunca apareceu

Enquanto aws e azure eram os únicos providers, cada um sempre contribuía a anotação de identidade (IRSA / Workload Identity), então o bloco nunca ficava vazio. O helper de provenance também fica em silêncio quando não há provenance.

Encontrado num cluster DigitalOcean real, onde o cert-manager não precisa de anotação nenhuma na ServiceAccount — não há identidade de nuvem para pendurar.

A correção

A chave só é emitida quando há algo para pôr embaixo dela. parameters é opcional na CRD, mas uma vazia não é o mesmo que ausente.

Sem regressão

helm template  (v0.73.0  vs  este branch)
  aws     IDENTICO
  azure   IDENTICO

digitalocean: Applications com parameters null -> 0

On a provider that is neither aws nor azure, and with no git provenance
injected, every entry under `parameters:` is skipped and the key renders with
nothing beneath it. The API server reads that as null and rejects the
Application outright:

  spec.sources[0].helm.parameters in body must be of type array: "null"

The whole platform-root sync then fails, not just cert-manager, because one
object failing to apply fails the operation.

This could not surface while aws and azure were the only providers: each always
contributes its identity annotation, so the block was never empty. Found on a
DigitalOcean cluster, where cert-manager needs no ServiceAccount annotation at
all — there is no cloud identity to attach.

Rendering for aws and azure is byte-identical to v0.73.0.
@danielgines
danielgines merged commit b1fa61d into main Aug 23, 2026
2 checks passed
@danielgines
danielgines deleted the fix/cert-manager-empty-parameters branch August 23, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant