Skip to content

Commit

Permalink
Merge pull request #475 from AmericanAirlines/feat--add-create-and-de…
Browse files Browse the repository at this point in the history
…lete-to-argocd

feat: add create and delete to argocd
  • Loading branch information
Xantier authored Apr 19, 2022
2 parents c44b308 + d1cb23c commit 97a06ca
Show file tree
Hide file tree
Showing 17 changed files with 1,970 additions and 39 deletions.
9 changes: 9 additions & 0 deletions .changeset/odd-walls-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@roadiehq/backstage-plugin-argo-cd-backend': minor
'@roadiehq/scaffolder-backend-argocd': patch
---

- Add create endpoints
- Add delete endpoints
- Add sync endpoints
- Add scaffolder action for create
5 changes: 5 additions & 0 deletions plugins/backend/backstage-plugin-argo-cd-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The Argo plugin will fetch the Argo CD instances an app is deployed to and use t
argocd:
username: ${ARGOCD_USERNAME}
password: ${ARGOCD_PASSWORD}
waitCycles: 25
appLocatorMethods:
- type: 'config'
instances:
Expand All @@ -22,6 +23,10 @@ argocd:
Add the required auth tokens to environmental variables, `ARGOCD_USERNAME` and `ARGOCD_PASSWORD`.

Between the Argo CD project delete and application delete there is a loop created to check for the deletion of the application before the deletion of a project can occur. Between each check there is a 3 second timer. The number of cycles to wait is an optional configuration value as shown above as `waitCycles`. If `waitCycles` is set to 25, the total time the loop can last before erroring out is 75 seconds.

You can also use an argo session token as mentioned above in the `argocd` object as shown above. If omitted, we will use the argo username and password from the code block above.

Setting permissions for the Argo CD user account can reduce the scope, but also reduce the functionality of the backend. If you choose to scope the permissions for read-only get actions will work such as the catalog plugin but creating, deleting, and resyncing applications will not be available. The error handling has been designed to alert the users when the proper permissions are not in place.

## Contributed By American Airlines
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './service/router';
export { ArgoService } from './service/argocd.service'
Loading

0 comments on commit 97a06ca

Please sign in to comment.