Feat/messaging pr 0 crossplane config - #91
Open
flaviomarcheni wants to merge 9 commits into
Open
Conversation
…onfig Messaging sync needs a fixed Crossplane cluster and AWS region per environment instead of least-load selection or inferring region from api_address. Co-authored-by: Cursor <cursoragent@cursor.com>
…ting token Make cluster token optional on update, keep generic Crossplane setting descriptions, and improve Portal edit flow for crossplane_available. Co-authored-by: Cursor <cursoragent@cursor.com>
…source Move Crossplane settings out of the generic environment settings bag into a dedicated table, API, and portal feature so messaging sync can read a typed environment-scoped config. Co-authored-by: Cursor <cursoragent@cursor.com>
…ne config Store the AWS account id alongside region and provider_config so messaging and sync can resolve ARNs from environment settings instead of env vars. Co-authored-by: Cursor <cursoragent@cursor.com>
Surface load/save failures in the Crossplane dialog so they are not hidden behind the overlay when the page-level notification sits under z-50. Co-authored-by: Cursor <cursoragent@cursor.com>
Align ADR 002 with the existing ADR structure and document ownership, SNS/SQS catalog rules, and Crossplane environment prerequisites. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
👋 Welcome to Tron! Thanks for your first pull request.
A maintainer will review it soon. Here's what to expect:
- ✅ Automated tests will run on your changes
- 👀 A maintainer will review your code
- 💬 You may receive feedback or requests for changes
- 🎉 Once approved, your PR will be merged!
While you wait:
- Make sure all tests pass
- Check that your PR follows the contribution guidelines
- Feel free to ask questions if you need help
Thank you for contributing to Tron! 🚀
…sterUpdate Keep cluster update on ClusterCreate (same as main), surface Crossplane health on the clusters list through the injected Crossplane probe, and gate the env modal save until config has loaded. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove docs/pr-0-messaging-crossplane-config.md from the remote tree and ignore docs/pr-*.md so these notes stay on the machine. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep PR writeups on the machine and out of the remote branch. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR-0 — Crossplane config por Environment
Branch:
feat/messaging-pr-0-crossplane-configJira: NS-190
ADR: 002-messaging-org-level-catalog.md
Summary
environment_crossplane_configs), não no bag genérico de settings.api/app/crossplane/(api / core / infra): config, validação e probe de health.enabled=true, cluster do mesmo environment, e probe live de Crossplane healthy no cluster.crossplane_available.region/provider_configno payload — herdam do environment.Bounded context
crossplane/(service, validators, repo, handlers)available/healthy/providers)crossplane/infra/k8s_crossplane_probe.py→K8sClient.check_crossplane_statusClusterServicerecebeprobe_crossplaneinjetado no composition root (cluster_handlers); core de Clusters não chama Crossplane APIs diretoCrossplaneFeatures)crossplane/api/crossplane_dto.py(Clusters só compõe no response)ClusterUpdate/ update de gateway não mudam nesta PR — permanecem iguais amain(ClusterCreateno PUT).Justificativa das configs (envs / campos)
Crossplane é por environment, não por Topic/Queue: um env tem um cluster K8s fixo para sync de messaging e uma conta/região AWS. Isso evita drift e ARNs pré-montados no Jinja.
Mapeamento legado (settings bag) → recurso atual:
crossplane_enabledenabledresolve_context_for_sync— sefalse, sync de messaging não provisionacrossplane_cluster_uuidcluster_uuidK8sClientno sync; no save, probe de health do Crossplane nesse clustercrossplane_aws_regionaws_regionClusterProviderConfig/ provider AWS não guardam region; cada MR precisa despec.forProvider.region.region:em Topic/Queue/Subscription); validação no savecrossplane_provider_configprovider_configClusterProviderConfigno cluster (ex.:default). Define credenciais/endpoint AWS (IRSA em stg, Secret+Floci no local).providerConfigRef.name+kind: ClusterProviderConfigaws_account_id(também no recurso)Não existia na lista antiga de keys do settings bag, mas faz parte da config atual:
aws_account_idClusterProviderConfigquandoskip_requesting_account_idestá ativo (ex.: Floci local).Resumo
Regras de validação no save
Com
enabled=true:probe_crossplane_health/ BC Crossplane).Com
enabled=false, a config pode ser salva sem os demais campos (e sem probe).O probe de health no save da env roda só nesse caminho — não a cada resolve de sync — para que outages temporários do control plane não bloqueiem leituras do catálogo.
A coluna na listagem de Clusters usa o mesmo probe (informativo Available / Unhealthy / Not Available + providers).
UI — modal Environments
Save fica desabilitado até o GET da config Crossplane completar (evita gravar draft vazio e apagar config existente).
Commits
e9703d9253d49459705d3630669e682f8cf811a27d(Alterações locais ainda não commitadas: BC probe + coluna Crossplane na listagem, remoção de
crossplane_available, gate de Save no modal.)Test plan
enabled=falsesem demais campos → sucessoenabled=truesem region/account/provider/cluster → erro de validaçãomain)Screenshots
Environments — modal Crossplane
Clusters — coluna Crossplane