Skip to content

Configuring the SpectroCloud Cluster Provider Plugin#

The SpectroCloud cluster provider offers extensive configuration options.

Configuration Structure#

spectrocloud:
  annotationPrefix: terasky.backstage.io  # Optional
  environments:
    - name: production
      url: https://api.spectrocloud.com
      tenant: my-tenant
      apiToken: ${SPECTROCLOUD_API_TOKEN}
      clusterProvider:
        includeProjects: [production, staging]
        excludeProjects: [sandbox]
        excludeTenantScopedClusters: false
        refreshIntervalSeconds: 300
        clusterTimeoutSeconds: 30
        skipMetricsLookup: true
        rbac:
          namespace: backstage-system
          serviceAccountName: backstage-sa
          clusterRoleRules:
            - apiGroups: ['*']
              resources: ['*']
              verbs: ['get', 'list', 'watch']

Configuration Parameters#

Environment Settings#

Parameter Type Default Description
name string optional Instance name prefix for clusters
url string required SpectroCloud API URL
tenant string required SpectroCloud tenant
apiToken string required API token

Cluster Provider Settings#

Parameter Type Default Description
includeProjects string[] [] Projects to include (empty = all)
excludeProjects string[] [] Projects to exclude
excludeTenantScopedClusters boolean false Exclude tenant-scoped clusters
refreshIntervalSeconds number 300 Refresh interval
clusterTimeoutSeconds number 30 Timeout per cluster
skipMetricsLookup boolean false Skip metrics API check

RBAC Configuration#

Parameter Type Default Description
rbac.namespace string backstage-system Namespace name
rbac.serviceAccountName string backstage-sa Service account name
rbac.clusterRoleRules array read-only Custom RBAC rules

Configuration Examples#

Basic Setup#

spectrocloud:
  environments:
    - url: https://api.spectrocloud.com
      tenant: my-tenant
      apiToken: ${SPECTROCLOUD_API_TOKEN}
      clusterProvider: {}

Project Filtering#

spectrocloud:
  environments:
    - url: https://api.spectrocloud.com
      tenant: my-tenant
      apiToken: ${SPECTROCLOUD_API_TOKEN}
      clusterProvider:
        includeProjects:
          - production
          - staging
        excludeProjects:
          - development

Custom RBAC#

spectrocloud:
  environments:
    - url: https://api.spectrocloud.com
      tenant: my-tenant
      apiToken: ${SPECTROCLOUD_API_TOKEN}
      clusterProvider:
        rbac:
          namespace: backstage-readonly
          serviceAccountName: backstage-viewer
          clusterRoleRules:
            - apiGroups: ['core']
              resources: ['pods', 'services']
              verbs: ['get', 'list', 'watch']
            - apiGroups: ['apps']
              resources: ['deployments']
              verbs: ['get', 'list', 'watch']

Multi-Instance#

spectrocloud:
  environments:
    - name: us
      url: https://api-us.spectrocloud.com
      tenant: us-tenant
      apiToken: ${SPECTROCLOUD_US_TOKEN}
      clusterProvider:
        includeProjects: [production]
    - name: eu
      url: https://api-eu.spectrocloud.com
      tenant: eu-tenant
      apiToken: ${SPECTROCLOUD_EU_TOKEN}
      clusterProvider:
        includeProjects: [production]

Troubleshooting#

Common Issues#

  1. Clusters Not Appearing
  2. Verify project filters
  3. Check API connectivity
  4. Review refresh interval

  5. RBAC Errors

  6. Verify admin kubeconfig access
  7. Check namespace creation permissions
  8. Review RBAC rule syntax