feat(client): suit le retrait du préfixe /v1 de l'API - #209
Merged
Conversation
There was a problem hiding this comment.
Mechanical /v1/ prefix removal, scoped correctly to the ferrvault mode only (legacy FerrFlow paths untouched, as the description explains). The Go test now locks the new path, and the deployment-window tradeoff is well reasoned. No functional issues found.
Nit: two doc spots referencing the old path weren't updated, so they'll be stale after this merges:
cli/README.md— "validates the token against/v1/operator/me"charts/ferrvault-operator/templates/crd-ferrvaultconnections.yaml— CRD description still says "flat/v1/operator/secrets/revealshape" (the matching comment inconnectionspec_types.gowas updated, this one wasn't)
Neither blocks — just drift worth a follow-up fix.
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.
Suit le retrait du préfixe
/v1côté API (FerrLabs/FerrVault-Cloud#626).Portée réelle : un seul chemin
Le client Go a deux modes, et un seul est concerné :
ferrvault/v1/operator/secrets/reveal→/operator/secrets/reveal/api/v1/orgs/{org}/projects/{p}/vaults/by-name/{v}/secrets/revealLe second appartient à l'API FerrFlow historique et n'a pas bougé. Confondre les deux aurait cassé les connexions legacy sans raison.
Côté CLI Rust, les sept appels
/v1/operator/*passent à la racine.Le test
client_test.goqui verrouillait l'ancien chemin verrouille désormais le nouveau — c'est lui qui garantit le comportement.Ordre de déploiement
L'API et cet opérateur ne peuvent pas basculer au même instant : deux dépôts, deux images. Il y aura donc une fenêtre pendant laquelle la synchronisation des
FerrVaultSecretéchoue.Ce que cette fenêtre coûte, précisément : les
Secretdéjà matérialisés persistent.ghcr-credentialsne disparaît pas des sept namespaces, il cesse d'être rafraîchi. Les pods tournent, les pulls d'images continuent. Seule une création ou une rotation de secret serait bloquée.Déployer l'API d'abord, puis cet opérateur, ou l'inverse — dans les deux cas la fenêtre existe et reste bénigne.
Vérifications
cargo checkpropre sur la CLI Rust.La partie Go n'est pas vérifiée localement : la chaîne d'outils Go n'est pas installée sur la machine où ce changement a été préparé. Le
go buildetgo testse feront en CI — et c'est là que le test du chemin sera réellement exercé.