@gorizond/catalog-backend-module-fleet
Version:
Backstage catalog backend module for Rancher Fleet GitOps entities
83 lines (82 loc) • 2.25 kB
TypeScript
/**
* Backstage Backend Module for Fleet Entity Provider
*
* This module registers the FleetEntityProvider with the Backstage catalog.
* It fetches Fleet GitOps resources (GitRepo, Bundle, BundleDeployment) from
* Kubernetes clusters and creates corresponding Backstage catalog entities.
*
* @packageDocumentation
*/
/**
* Catalog backend module that provides Fleet entities.
*
* @example
* ```ts
* // In packages/backend/src/index.ts
* import { createBackend } from '@backstage/backend-defaults';
*
* const backend = createBackend();
* backend.add(import('@backstage/plugin-catalog-backend'));
* backend.add(import('@gorizond/catalog-backend-module-fleet'));
* backend.start();
* ```
*
* @example
* Configuration in app-config.yaml:
* ```yaml
* catalog:
* providers:
* fleet:
* # Single cluster configuration
* name: rancher-prod
* url: https://rancher.example.com/k8s/clusters/local
* token: ${FLEET_CLUSTER_TOKEN}
* namespaces:
* - fleet-default
* includeBundles: true
* includeBundleDeployments: false
* generateApis: false
* fetchFleetYaml: false
* schedule:
* frequency:
* minutes: 10
* timeout:
* minutes: 5
*
* # Optional: filter GitRepos by labels
* gitRepoSelector:
* matchLabels:
* backstage.io/discover: "true"
* ```
*
* @example
* Multi-cluster configuration:
* ```yaml
* catalog:
* providers:
* fleet:
* production:
* clusters:
* - name: local
* url: https://rancher.example.com/k8s/clusters/local
* token: ${FLEET_LOCAL_TOKEN}
* namespaces:
* - fleet-default
* - name: staging
* url: https://rancher-staging.example.com/k8s/clusters/local
* token: ${FLEET_STAGING_TOKEN}
* namespaces:
* - fleet-default
* schedule:
* frequency:
* minutes: 5
* ```
*
* @public
*/
export declare const catalogModuleFleet: import("@backstage/backend-plugin-api").BackendFeature;
/**
* Default export for convenience
* @public
*/
export default catalogModuleFleet;