Service accounts
Service accounts are the accounts we use for authenticating automations such as CI/CD pipelines to the system. They should not be tied to a user because we don’t want our pipelines to start failing if we disable that user, or if we restrict its rights. Service accounts should have strict access control and should not be allowed to do more than what is required by the pipeline, while a real user will probably need to have access to a larger variety of resources.
There are two ways to create service accounts in Argo CD: one is with local users (for which we only use apiKey
and remove the login
part) and the other is to use project roles and have tokens assigned for those roles.
Local service accounts
We are now going to create a separate local account that only has the apiKey
functionality specified. This way, the user doesn’t have a password for the UI or the CLI and access can be accomplished only after we generate an API key for it (which gives...