-
Notifications
You must be signed in to change notification settings - Fork 618
chore: Add example templates for ArgoCD actions #8704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
b82bbed
52f655c
843add2
382b7a6
974bd16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@backstage-community/plugin-argocd-backend': patch | ||
| --- | ||
|
|
||
| Add example templates for ArgoCD plugin actions |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # ArgoCD Find Applications Action | ||
| # | ||
| # Action ID: argocd:find-applications | ||
|
||
| # | ||
| # This action is automatically registered by the @backstage-community/plugin-argocd-backend | ||
| # plugin via the Backstage Actions API. No additional setup is required beyond | ||
| # installing the backend plugin. | ||
| # | ||
| # Prerequisites: | ||
| # - ArgoCD backend plugin installed and configured | ||
| # - ArgoCD instance(s) configured in app-config.yaml under argocd.appLocatorMethods | ||
|
|
||
| --- | ||
| # Minimal example (required fields only) | ||
| actionId: argocd:find-applications | ||
| input: | ||
| appName: my-service | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| --- | ||
| # Full example (all fields) | ||
| actionId: argocd:find-applications | ||
| input: | ||
| appName: my-service | ||
| project: my-project # Filter by ArgoCD project name | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
| appNamespace: argocd # Filter by application namespace | ||
|
|
||
| # Expected output: | ||
| # instances: | ||
| # - instanceName: production | ||
| # instanceUrl: https://argocd.example.com | ||
| # applications: | ||
| # - name: my-service | ||
| # namespace: argocd | ||
| # project: my-project | ||
| # syncStatus: Synced | ||
| # healthStatus: Healthy | ||
| # revision: abc123def | ||
| # destination: | ||
| # server: https://kubernetes.default.svc | ||
| # namespace: my-namespace | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # ArgoCD Get Application Action | ||
| # | ||
| # Action ID: argocd:get-application | ||
| # | ||
| # This action is automatically registered by the @backstage-community/plugin-argocd-backend | ||
| # plugin via the Backstage Actions API. No additional setup is required beyond | ||
| # installing the backend plugin. | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
| # | ||
| # Prerequisites: | ||
| # - ArgoCD backend plugin installed and configured | ||
| # - ArgoCD instance(s) configured in app-config.yaml under argocd.appLocatorMethods | ||
|
|
||
| --- | ||
| # Minimal example (required fields only) | ||
| actionId: argocd:get-application | ||
| input: | ||
| instanceName: local | ||
| appName: my-service | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| --- | ||
| # Full example (all fields) | ||
| actionId: argocd:get-application | ||
| input: | ||
| instanceName: local | ||
| appName: my-service | ||
| appNamespace: argocd # Namespace of the application | ||
| project: my-project # ArgoCD project name | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Expected output: | ||
| # name: my-service | ||
| # namespace: argocd | ||
| # project: my-project | ||
| # syncStatus: Synced | ||
| # healthStatus: Healthy | ||
| # revision: abc123def | ||
| # operationPhase: Succeeded | ||
| # operationMessage: successfully synced | ||
| # destination: | ||
| # server: https://kubernetes.default.svc | ||
| # namespace: my-namespace | ||
| # resourcesCount: 5 | ||
| # historyCount: 3 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # ArgoCD Get Revision Details Action | ||
| # | ||
| # Action ID: argocd:get-revision-details | ||
| # | ||
| # This action is automatically registered by the @backstage-community/plugin-argocd-backend | ||
| # plugin via the Backstage Actions API. No additional setup is required beyond | ||
| # installing the backend plugin. | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
| # | ||
| # Prerequisites: | ||
| # - ArgoCD backend plugin installed and configured | ||
| # - ArgoCD instance(s) configured in app-config.yaml under argocd.appLocatorMethods | ||
|
|
||
| --- | ||
| # Minimal example (required fields only) | ||
| actionId: argocd:get-revision-details | ||
| input: | ||
| instanceName: local | ||
| appName: my-service | ||
| revisionID: abc123def456 | ||
|
||
|
|
||
| --- | ||
| # Full example (all fields) | ||
| actionId: argocd:get-revision-details | ||
| input: | ||
| instanceName: local | ||
| appName: my-service | ||
| revisionID: abc123def456 | ||
| appNamespace: argocd # Namespace of the application | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Expected output: | ||
| # author: Jane Developer | ||
| # date: 2026-04-15T10:30:00Z | ||
| # message: "feat: add new deployment config" | ||
| # revisionID: abc123def456 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # ArgoCD List Applications Action | ||
| # | ||
| # Action ID: argocd:list-applications | ||
| # | ||
| # This action is automatically registered by the @backstage-community/plugin-argocd-backend | ||
| # plugin via the Backstage Actions API. No additional setup is required beyond | ||
| # installing the backend plugin. | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
| # | ||
| # Prerequisites: | ||
| # - ArgoCD backend plugin installed and configured | ||
| # - ArgoCD instance(s) configured in app-config.yaml under argocd.appLocatorMethods | ||
|
|
||
| --- | ||
| # Minimal example (required fields only) | ||
| actionId: argocd:list-applications | ||
| input: | ||
| instanceName: local | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| --- | ||
| # Full example (all fields) | ||
| actionId: argocd:list-applications | ||
| input: | ||
| instanceName: local | ||
| selector: app.kubernetes.io/part-of=my-app # Label selector to filter applications | ||
| project: my-project # Filter by ArgoCD project name | ||
| appNamespace: argocd # Filter by application namespace | ||
|
CryptoRodeo marked this conversation as resolved.
Outdated
|
||
|
|
||
| # Expected output: | ||
| # totalCount: 2 | ||
| # applications: | ||
| # - name: my-service | ||
| # namespace: argocd | ||
| # project: my-project | ||
| # syncStatus: Synced | ||
| # healthStatus: Healthy | ||
| # revision: abc123def | ||
| # destination: | ||
| # server: https://kubernetes.default.svc | ||
| # namespace: my-namespace | ||
| # - name: my-other-service | ||
| # namespace: argocd | ||
| # project: my-project | ||
| # syncStatus: OutOfSync | ||
| # healthStatus: Degraded | ||
| # revision: def456ghi | ||
| # destination: | ||
| # server: https://kubernetes.default.svc | ||
| # namespace: other-namespace | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| apiVersion: scaffolder.backstage.io/v1beta3 | ||
| kind: Template | ||
| metadata: | ||
| name: argocd-find-applications | ||
| title: Find ArgoCD Applications | ||
| description: Find all ArgoCD applications across all configured instances by application name | ||
| tags: | ||
| - argocd | ||
| - deployment | ||
| - kubernetes | ||
| spec: | ||
| owner: group:default/infrastructure | ||
| type: deployment | ||
| parameters: | ||
| - title: Find ArgoCD Applications | ||
| required: | ||
| - appName | ||
| properties: | ||
| appName: | ||
| title: Application Name | ||
| type: string | ||
| description: The ArgoCD application name to search for | ||
| project: | ||
| title: Project Name | ||
| type: string | ||
| description: Filter by ArgoCD project name | ||
| appNamespace: | ||
| title: Application Namespace | ||
| type: string | ||
| description: Filter by application namespace | ||
| steps: | ||
| - id: find-applications | ||
| name: Find ArgoCD Applications | ||
| action: backstage-community-argocd:argocd:find-applications | ||
| input: | ||
| appName: ${{ parameters.appName }} | ||
| project: ${{ parameters.project }} | ||
| appNamespace: ${{ parameters.appNamespace }} | ||
| output: | ||
| text: | ||
| - title: Found Instances | ||
| content: | | ||
| ```json | ||
| ${{ steps['find-applications'].output.instances | dump }} | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| apiVersion: scaffolder.backstage.io/v1beta3 | ||
| kind: Template | ||
| metadata: | ||
| name: argocd-get-application | ||
| title: Get ArgoCD Application | ||
| description: Get full details of a specific ArgoCD application from a named instance | ||
| tags: | ||
| - argocd | ||
| - deployment | ||
| - kubernetes | ||
| spec: | ||
| owner: group:default/infrastructure | ||
| type: deployment | ||
| parameters: | ||
| - title: ArgoCD Application Details | ||
| required: | ||
| - instanceName | ||
| - appName | ||
| properties: | ||
| instanceName: | ||
| title: ArgoCD Instance | ||
| type: string | ||
| description: Name of the ArgoCD instance as configured in argocd.appLocatorMethods[].instances | ||
| appName: | ||
| title: Application Name | ||
| type: string | ||
| description: The ArgoCD application name | ||
| appNamespace: | ||
| title: Application Namespace | ||
| type: string | ||
| description: Namespace of the application | ||
| project: | ||
| title: Project Name | ||
| type: string | ||
| description: ArgoCD project name | ||
| steps: | ||
| - id: get-application | ||
| name: Get ArgoCD Application | ||
| action: backstage-community-argocd:argocd:get-application | ||
| input: | ||
| instanceName: ${{ parameters.instanceName }} | ||
| appName: ${{ parameters.appName }} | ||
| appNamespace: ${{ parameters.appNamespace }} | ||
| project: ${{ parameters.project }} | ||
| output: | ||
| text: | ||
| - title: Application Status | ||
| content: | | ||
| **Name:** ${{ steps['get-application'].output.name }} | ||
| **Sync:** ${{ steps['get-application'].output.syncStatus }} | ||
| **Health:** ${{ steps['get-application'].output.healthStatus }} | ||
| **Resources:** ${{ steps['get-application'].output.resourcesCount }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| apiVersion: scaffolder.backstage.io/v1beta3 | ||
| kind: Template | ||
| metadata: | ||
| name: argocd-get-revision-details | ||
| title: Get ArgoCD Revision Details | ||
| description: Fetch the Git commit metadata for a specific revision of an ArgoCD application deployment | ||
| tags: | ||
| - argocd | ||
| - deployment | ||
| - kubernetes | ||
| spec: | ||
| owner: group:default/infrastructure | ||
| type: deployment | ||
| parameters: | ||
| - title: Revision Details | ||
| required: | ||
| - instanceName | ||
| - appName | ||
| - revisionID | ||
| properties: | ||
| instanceName: | ||
| title: ArgoCD Instance | ||
| type: string | ||
| description: Name of the ArgoCD instance | ||
| appName: | ||
| title: Application Name | ||
| type: string | ||
| description: The ArgoCD application name | ||
| revisionID: | ||
| title: Revision ID | ||
| type: string | ||
| description: Git commit SHA or tag to get details for | ||
| appNamespace: | ||
| title: Application Namespace | ||
| type: string | ||
| description: Namespace of the application | ||
| steps: | ||
| - id: get-revision-details | ||
| name: Get Revision Details | ||
| action: backstage-community-argocd:argocd:get-revision-details | ||
| input: | ||
| instanceName: ${{ parameters.instanceName }} | ||
| appName: ${{ parameters.appName }} | ||
| revisionID: ${{ parameters.revisionID }} | ||
| appNamespace: ${{ parameters.appNamespace }} | ||
| output: | ||
| text: | ||
| - title: Revision Info | ||
| content: | | ||
| **Author:** ${{ steps['get-revision-details'].output.author }} | ||
| **Date:** ${{ steps['get-revision-details'].output.date }} | ||
| **Message:** ${{ steps['get-revision-details'].output.message }} |
Uh oh!
There was an error while loading. Please reload this page.