Skip to content

[backstage] Reflect Flux resources into BS entities #3297

Open
@foot

Description

As outlined here: https://github.com/weaveworks/weave-technical-scratchpad/blob/main/kevin/backstage/backstage_gitrepository_resources_as_entities.md

User story:

  • As a User I use backstage a lot and use its dependency declaration system to do things like declaring that team-salsa owns a particular git-repo, so I can contact them if I have questions, need to change something etc.

Question:

  • Would this go in EE or OSS BS plugin? Probably OSS

Behaviour:

Tasks

  • run the command to generate new backstage backend plugin https://backstage.io/docs/plugins/backend-plugin, yarn new --select backend-plugin maybe called catalog-backend-module-flux
  • Wanna install it very similarly to other entityprovider plugins
import { FluxEntityProvider } from '@backstage/plugin-catalog-backend-module-flux';

...

builder.addEntityProvider(
  FluxEntityProvider.fromConfig({
    logger: env.logger,
    scheduler: env.scheduler,
    config: env.config
  })
);

And add some more config stuff:

catalog:
  providers:
    flux:
      gitrepositories:
        labelSelector:
          example.com/git: true
        schedule:
          frequency: { minutes: 30 }
          timeout: { minutes: 3 }

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions