chore(deploy): fetch infra PR token from Vault, match sentinel PR format - #221
Merged
Conversation
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.
Gaucho-Racing/vault-pull-secrets@v1instead of theINFRA_PR_TOKENrepo secretClick here to view all changescompare link to the generated PR bodyBrings
deploy.ymlin line with Sentinel's, which already made all three changes (Sentinel #100, #101).Why now
The v3.9.7 deploy run failed at
Checkout infrastructurewithInput required and not supplied: token—INFRA_PR_TOKENdoes not exist as a repo secret or an org secret. It existed for v3.9.6 in June, so the PAT most likely expired and the secret was removed. Sourcing from Vault removes the recurring expiry problem rather than re-adding a secret that will lapse again.Requires a Vault rule before this works
vault-pull-secrets authorizes on repository, Git ref, and requested selector. A GitHub Actions rule in Vault settings has to allow
Gaucho-Racing/Mapacheto readinfrastructure.pr_token— the Sentinel rule does not cover this repo. Without it thePull secretsstep fails and the run stops there, same as it does today.Notes
infrastructure.pr_tokenmaps toPR_TOKENper the action's naming (app prefix dropped, field uppercased), read viafromJSON(steps.vault.outputs.secrets_json).PR_TOKEN.id-token: writeadded to the job so the runner can mint the OIDC token.KUSTOMIZATIONkeeps the repo-relative form from the previous PR rather than Sentinel'sinfra/-prefixed variable. Sentinel still hardcodes the bare path a second time in its diff step, which is how its two copies drifted apart; keeping one source avoids that.