Skip to content

feat(components): every component honours its own toggle - #226

Merged
danielgines merged 1 commit into
mainfrom
feat/every-component-honours-its-toggle
Aug 23, 2026
Merged

feat(components): every component honours its own toggle#226
danielgines merged 1 commit into
mainfrom
feat/every-component-honours-its-toggle

Conversation

@danielgines

Copy link
Copy Markdown
Member

Sete templates eram marcados core: cannot be disabled e ignoravam o mapa components por completo. Cinco deles já tinham chave nesse mapaargocd, cert-manager, kyverno, external-secrets, cnpg — documentada como toggle e com default true. Ninguém a lia.

Por que isso importa

A consequência só aparece quando conta: subir a plataforma num provider novo, onde o objetivo inteiro é ligar um componente por vez e verificar antes do próximo. Com onze Applications renderizando independentemente de todos os toggles estarem false, o primeiro sync instala um conjunto que ninguém escolheu.

O que muda

Cada um passa a ler a própria chave. Os três sem chave própria seguem aquilo sem o que não funcionam, em vez de ganhar uma:

  • cluster-secret-store e platform-secretsexternal-secrets (um ClusterSecretStore e um ExternalSecret são custom resources dele)
  • kyverno-exceptionskyverno (PolicyExceptions, mesmo raciocínio)

resource-quotas ganha chave, porque não tinha nenhuma e era o único componente que nada conseguia desligar.

Essa chave é excluída do componentsForwarding: repassá-la adicionaria uma entrada ao mapa que os charts filhos de network-policies e resource-quotas consomem, mudando output renderizado em deployments que não mudaram nada — e um desses charts é justamente o que está sendo ligado/desligado.

Sem regressão

Todos os defaults seguem true:

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

digitalocean, todos os toggles false   ->  0 Applications
digitalocean, só argocd: true          ->  1 Application (argocd)

Os 4 AppProjects seguem renderizando: são o andaime que toda Application referencia (project: platform), não workload.

Seven templates were marked "core: cannot be disabled" and ignored the
components map entirely. Five of them — argocd, cert-manager, kyverno,
external-secrets, cnpg — already HAD a key in that map, documented as a toggle
and defaulting to true. Nothing read it.

The consequence is only visible when it matters: bringing a platform up on a
new provider, where the whole point is to enable one component at a time and
verify it before the next. With eleven Applications rendering regardless of
every toggle being false, the first sync installs a set nobody chose.

Now each reads its own key. Three that had no key of their own follow what they
cannot work without rather than gaining one: cluster-secret-store and
platform-secrets on external-secrets, since a ClusterSecretStore and an
ExternalSecret are its custom resources; kyverno-exceptions on kyverno, for the
same reason with PolicyExceptions. resource-quotas gets a key, because it had
none and was the one component nothing could switch off.

That key is excluded from componentsForwarding. Forwarding it would add an
entry to the map the network-policies and resource-quotas child charts consume,
changing rendered output on deployments that changed nothing — and one of those
charts is the thing being toggled.

Every default stays true, so rendering for aws and azure is byte-identical to
v0.73.0: 2719 and 2823 lines, zero diff. With all toggles false a DigitalOcean
deployment now renders zero Applications; with only argocd true, exactly one.
@danielgines
danielgines merged commit 3a1da8b into main Aug 23, 2026
2 checks passed
@danielgines
danielgines deleted the feat/every-component-honours-its-toggle branch August 23, 2026 13:26
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