Argo CD Plugin for Backstage
https://roadie.io/backstage/plugins/argo-cd
Features
How to add argo-cd project dependency to Backstage app
If you have your own backstage application without this plugin, here it's how to add it:
- In the
backstage/packages/app
project add the plugin as a package.json
dependency:
yarn add @roadiehq/backstage-plugin-argo-cd
- add argo-cd to the proxy object in
app-config.yaml
file in the root directory:
proxy:
...
'/argocd/api':
target: https://159.65.209.132/api/v1/
changeOrigin: true
secure: false
headers:
Cookie:
$env: ARGOCD_AUTH_TOKEN
- Add plugin to the list of plugins:
export { plugin as ArgoCD } from '@roadiehq/backstage-plugin-argo-cd';
- Add plugin to the
entitytPage.tsx
source file:
How to use Argo-cd plugin in Backstage
The Argo CD plugin is a part of the Backstage sample app. To start using it for your component, you have to:
-
Add an annotation to the YAML config file of a component. If there is only a single Argo CD application for the component, you can use
argo-cd/app-name: <app-name>
You can also use labels to select multiple Argo CD applications for a component:
argo-cd/app-selector: <app-selector>
Note: You can only use one of the options per component.
-
Add your auth key to the environmental variables for your backstage backend server (you can acquire it by sending a GET HTTP request to Argo CD's /session
endpoint with username and password):
ARGOCD_AUTH_TOKEN="argocd.token=<auth-token>"
Develop plugin locally
You can clone the plugin repo into the plugins/
directory:
git clone https://github.com/RoadieHQ/backstage-plugin-argo-cd.git argo-cd
and run yarn
in the root backstage directory - it will create a symbolic link so the dependency will be provided from the source code instead of node_modules package.
Links