Configuring the SpectroCloud Frontend Plugin#
The SpectroCloud frontend plugin can be configured to customize its behavior and integrate with Backstage's permission framework.
Configuration Options#
Add the following to your app-config.yaml:
spectrocloud:
annotationPrefix: terasky.backstage.io # Optional, default value
enablePermissions: true # Enable permission checks
kubernetesIngestor:
annotationPrefix: terasky.backstage.io # Optional, for Kubernetes Resources tab
Configuration Parameters#
| Parameter | Type | Default | Description |
|---|---|---|---|
annotationPrefix |
string | terasky.backstage.io |
Prefix used for SpectroCloud entity annotations |
enablePermissions |
boolean | false |
Enable frontend permission checks |
kubernetesIngestor.annotationPrefix |
string | - | Fallback annotation prefix for Kubernetes Resources tab |
Permission Configuration#
Available Permissions#
The frontend respects the following permissions:
| Permission | Description | Controls |
|---|---|---|
spectrocloud.cluster.view-info |
View cluster information | Cluster card visibility, cluster viewer |
spectrocloud.cluster.download-kubeconfig |
Download kubeconfig | Download button in cards and viewer |
spectrocloud.cluster.view-pack-values |
View pack values | Pack expansion and values viewing |
spectrocloud.cluster.view-pack-manifests |
View pack manifests | Manifest tabs in pack viewer |
spectrocloud.cluster.create |
Create clusters | Cluster deployment page access |
spectrocloud.profile.view-info |
View profile information | Profile card visibility |
spectrocloud.profile.view-clusters |
View clusters for profile | Cluster list expansion in profile card |
Enabling Permissions#
To enable permission checks:
-
Enable in config:
-
Configure permission policies (using RBAC plugin):
# Developers - read-only access p, role:default/developers, spectrocloud.cluster.view-info, read, allow p, role:default/developers, spectrocloud.profile.view-info, read, allow # Platform Team - full access p, role:default/platform-team, spectrocloud.cluster.view-info, read, allow p, role:default/platform-team, spectrocloud.cluster.download-kubeconfig, read, allow p, role:default/platform-team, spectrocloud.cluster.view-pack-values, read, allow p, role:default/platform-team, spectrocloud.cluster.view-pack-manifests, read, allow p, role:default/platform-team, spectrocloud.cluster.create, create, allow p, role:default/platform-team, spectrocloud.profile.view-info, read, allow p, role:default/platform-team, spectrocloud.profile.view-clusters, read, allow
Entity Card Configuration#
Cluster Card#
The cluster card automatically displays for entities with:
- kind: Resource
- spec.type: spectrocloud-cluster
Required annotations:
metadata:
annotations:
terasky.backstage.io/cluster-id: <cluster-uid>
terasky.backstage.io/project-id: <project-uid> # Optional, for project-scoped clusters
terasky.backstage.io/instance: <instance-name> # Optional, for multi-instance setups
Additional annotations used by the card:
metadata:
annotations:
terasky.backstage.io/cloud-type: eks|aws|aks|azure|vsphere
terasky.backstage.io/state: Running|Pending|Failed|...
terasky.backstage.io/kubernetes-version: "1.28.5"
terasky.backstage.io/scope: project|tenant
terasky.backstage.io/project-name: "My Project"
terasky.backstage.io/cluster-profile-refs: '[{"name":"profile","uid":"version-uid"}]'
Profile Card#
The profile card automatically displays for entities with:
- kind: Resource
- spec.type: spectrocloud-cluster-profile
Required annotations:
metadata:
annotations:
terasky.backstage.io/profile-id: <profile-uid>
terasky.backstage.io/project-id: <project-uid> # Optional, for project-scoped profiles
terasky.backstage.io/instance: <instance-name> # Optional, for multi-instance setups
Additional annotations used by the card:
metadata:
annotations:
terasky.backstage.io/profile-type: infra|add-on|cluster
terasky.backstage.io/cloud-type: eks|aws|aks|azure|vsphere
terasky.backstage.io/scope: project|tenant
terasky.backstage.io/profile-status: published|draft
terasky.backstage.io/version: "1.0.0"
terasky.backstage.io/latest-version: "1.1.0"
terasky.backstage.io/profile-versions: '[{"uid":"v1","version":"1.0.0"}]'
Kubernetes Resources Tab#
The Kubernetes Resources tab displays for entities with:
- kind: Resource
- spec.type: spectrocloud-cluster
- backstage.io/kubernetes-cluster annotation or cluster:<cluster-name> tag
Required configuration:
metadata:
annotations:
backstage.io/kubernetes-cluster: <cluster-name>
# OR use tags:
tags:
- cluster:<cluster-name>
The tab supports filtering and viewing Kubernetes resources, including: - Standard Kubernetes resources - Crossplane claims and composites - KRO (Kubernetes Resource Orchestrator) instances
Page Configuration#
Cluster Viewer Page#
The cluster viewer page is available at /spectrocloud/clusters and provides:
- List and card view of all accessible clusters
- Filtering by project, cloud type, status, and Kubernetes version
- "Updates Available" filter to identify clusters behind latest profile versions
- Kubeconfig download (permission-controlled)
- Direct links to cluster entity pages
Cluster Deployment Page#
The cluster deployment page is available at /spectrocloud/deploy and provides a wizard for creating new clusters:
Supported cloud types: - Amazon EKS: Managed Kubernetes on AWS - AWS (PXK): Palette eXtended Kubernetes on AWS - Azure AKS: Managed Kubernetes on Azure - Azure (PXK): Palette eXtended Kubernetes on Azure - vSphere: VMware vSphere clusters with PCG/overlord support
The page requires the spectrocloud.cluster.create permission when permissions are enabled.
Customization#
Custom Annotation Prefix#
If using a different annotation prefix:
Ensure the ingestor plugin uses the same prefix.
Kubernetes Resources Configuration#
The Kubernetes Resources tab can use either the spectrocloud.annotationPrefix or fall back to kubernetesIngestor.annotationPrefix:
spectrocloud:
annotationPrefix: mycompany.backstage.io
kubernetesIngestor:
annotationPrefix: mycompany.backstage.io # Fallback for K8s resources
The annotation resolution order is:
1. spectrocloud.annotationPrefix
2. kubernetesIngestor.annotationPrefix (fallback)
3. terasky.backstage.io (default)
Integration with Authentication#
The frontend integrates with @terasky/backstage-plugin-spectrocloud-auth for authentication:
- OIDC Tokens: Uses OAuth2/OIDC for user authentication
- Session Tokens: Supports HS256 session tokens for SpectroCloud API
- Headers: Sends
X-SpectroCloud-TokenandX-SpectroCloud-User-Email - Re-authentication: Handles
X-SpectroCloud-ReAuth-Requiredresponses
Best Practices#
Security#
- Enable permissions in production environments
- Use least-privilege permission policies
- Restrict cluster creation permission to authorized users
- Regularly audit kubeconfig download access
- Review who has access to pack values and manifests
Performance#
- The frontend fetches data on-demand from the backend
- Use the refresh button to get latest data
- Pack content is loaded lazily when expanded
- Cluster viewer applies client-side filtering for responsiveness
- Profile metadata is cached during deployment wizard
User Experience#
- Provide clear permission feedback to users
- Document which roles have which permissions
- Use meaningful profile and cluster names
- Add descriptive titles to entities for better searchability
- Configure appropriate refresh intervals for catalog data
Troubleshooting#
Common Issues#
- Card Shows "Loading" Forever
- Check backend plugin is running
- Verify API endpoint is accessible
- Check browser network tab for errors
-
Confirm entity has required annotations
-
Permission Denied Messages
- Verify
enablePermissionsis set correctly - Check user's permission policies
- Review backend logs
-
Confirm RBAC configuration is correct
-
Missing Data
- Verify entity has required annotations
- Check annotation prefix matches config
- Ensure backend can reach SpectroCloud API
-
Check instance name matches in annotations and config
-
Cluster Deployment Page Not Accessible
- Verify user has
spectrocloud.cluster.createpermission - Check authentication is working correctly
- Review backend API connectivity
-
Ensure projects and cloud accounts are configured
-
Kubernetes Resources Tab Not Showing
- Verify entity has
backstage.io/kubernetes-clusterannotation orcluster:tag - Check Kubernetes ingestor is running
- Confirm resources are being ingested into catalog
-
Review annotation prefix configuration
-
Authentication Issues
- Check
X-SpectroCloud-ReAuth-Requiredheader in network tab - Verify OIDC tokens are valid
- Confirm auth backend is configured correctly
- Check cookie settings for
spectrocloud-api-token