When ACLs are enabled gateway tasks do a consul login to get a token using the IAM Auth Method. The ACL controller will delete the tokens during its reconciliation cycle but we want task to do a consul logout when it stops to destroy the tokens. This PR adds a health-sync container to the gateway-task so that the task automatically attempts a consul logout when the task stops.
How I've tested this PR:
Ran the updated gateway-task and confirmed that health-sync performs the consul logout:
2022-06-15T18:50:34.380Z [INFO] signal received, ignoring: signal=terminated
2022-06-15T18:50:34.380Z [INFO] log out token: file=/consul/service-token
2022-06-15T18:50:34.387Z [INFO] log out token: file=/consul/client-token
How I expect reviewers to test this PR:
:eyes: (Suggest ignoring whitespace to skip the indenting changes)
Changes proposed in this PR:
When ACLs are enabled gateway tasks do a
consul login
to get a token using the IAM Auth Method. The ACL controller will delete the tokens during its reconciliation cycle but we want task to do aconsul logout
when it stops to destroy the tokens. This PR adds ahealth-sync
container to the gateway-task so that the task automatically attempts aconsul logout
when the task stops.How I've tested this PR:
consul logout
:How I expect reviewers to test this PR:
:eyes: (Suggest ignoring whitespace to skip the indenting changes)
Checklist: