Skip to content

feat(fetcher): render the IDP_* permission declaration from lerian-common - #2547

Draft
qnen wants to merge 1 commit into
mainfrom
feat/fetcher-idp
Draft

qnen wants to merge 1 commit into
mainfrom
feat/fetcher-idp

Conversation

@qnen

@qnen qnen commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Fetcher

Draft: depende do release do lerian-common (#2543, que adiciona lerian-common.idp.*). A dependência lerian-common-helm continua em 2.3.0, que ainda não tem os helpers, então o render deste branch falha até a troca. Quando o lerian-common-helm 2.4.0 for publicado: trocar version: "2.3.0" por "2.4.0" no Chart.yaml, rodar helm dependency update (Chart.lock) e tirar do draft.

O que muda

  • templates/manager/configmap.yaml: inclui lerian-common.idp.env ao lado do lerian-common.auth.env. Precedência: manager.configmap > manager.extraEnvVars (legado, mesmo padrão do PLUGIN_AUTH_*) > global.idp.{declarationEnabled,host}. IDP_DECLARATION_ENABLED sempre sai (default "false"); IDP_HOST só quando setado. O range de manager.configmap e o de extraEnvVars pulam as duas chaves.
  • templates/manager/secrets.yaml: o par IDP_M2M_* sai do range de manager.secrets e vem de lerian-common.idp.secret (modo data, cada chave só quando setada, igual ao range). Escolhi o helper, e não deixar o range cobrir, para ficar igual ao bank-transfer (feat(plugin-br-bank-transfer): render the IDP_* permission declaration from lerian-common #2545) e ao reporter (feat(reporter): render the IDP_* permission declaration from lerian-common, manager only #2546).
  • values.yaml / README: global.idp, as chaves do ConfigMap e manager.secrets.IDP_M2M_* (com o aviso de que o secrets de topo vai também para o worker).

Compatibilidade

Aditivo. Render sem valores novos: só aparece IDP_DECLARATION_ENABLED: "false" no ConfigMap do manager. Quem já passa as chaves por manager.configmap/manager.secrets (o lerian-internal-gitops#3457) mantém os mesmos valores, que só mudam de posição no objeto. Release esperado: minor.

Teste local

helm v3.16.4, cópia do chart com lerian-common-helm apontando para o lerian-common do #2543 via file:// (só para teste, não commitado), comparada com o chart da main (OCI 2.3.0):

Caso Resultado
defaults diff: só IDP_DECLARATION_ENABLED: "false" no ConfigMap do manager
values do #3457: benedita dev-st e stg-st, anacleto chaos dev-st ConfigMap e Secret do manager com os mesmos valores, só reposicionados
extraEnvVars.IDP_* + FOO chaves pelo helper, FOO no passthrough, sem duplicata
configmap.IDP_HOST + extraEnvVars.IDP_HOST configmap vence
global.idp.host + só IDP_M2M_CLIENT_ID (secret vazio) host global; só o ID no Secret

helm lint: 0 falhas. validate-helm-charts --strict: 0 violações.

🤖 Generated with Claude Code

…mmon

IDP_DECLARATION_ENABLED/IDP_HOST reached the manager only through the
generic manager.configmap range, with no default and no env-wide value,
and the client pair only through the manager.secrets range.

- Manager ConfigMap: include lerian-common.idp.env next to the auth
  mask, resolved as manager.configmap > manager.extraEnvVars (legacy) >
  global.idp.{declarationEnabled,host}. IDP_DECLARATION_ENABLED is
  always rendered (default "false"), IDP_HOST only when set. Both the
  manager.configmap range and the extraEnvVars passthrough skip the two
  keys, so no key is emitted twice.
- Manager Secret: the IDP_M2M_CLIENT_ID/_SECRET pair comes from
  lerian-common.idp.secret (data mode, each key only when set, same as
  the range did); the range skips it.
- Document global.idp, the ConfigMap keys and manager.secrets.IDP_M2M_*.

Requires the lerian-common release that ships lerian-common.idp.*; the
lerian-common-helm dependency must move from 2.3.0 to it before merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@lerian-studio-midaz-push-bot

Copy link
Copy Markdown
Contributor

Chart image references

1 of 1 chart(s) did not pass. A chart published while it points at an image that does not exist installs into ImagePullBackOff.

chart verified verdict
fetcher 0 could not verify — see the run log
Every reference checked

fetcher

no image references


🖼️ View full logs

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant