diff --git a/.changeset/migrate-1713466155177.md b/.changeset/migrate-1713466155177.md new file mode 100644 index 0000000000..ae85338d4b --- /dev/null +++ b/.changeset/migrate-1713466155177.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-opencost': patch +--- + +These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository. diff --git a/plugins/opencost/README.md b/plugins/opencost/README.md index 1dec15dcc1..d25046aad3 100644 --- a/plugins/opencost/README.md +++ b/plugins/opencost/README.md @@ -1,79 +1,3 @@ -# OpenCost +# Deprecated -Welcome to the [OpenCost](https://opencost.io) plugin! - -Currently this is a port of the [OpenCost UI](https://github.com/opencost/opencost/tree/develop/ui), but we will continue to expand it to expose any relevant data or pre-configured views that may be preferred. - -All of the code was originally ported from https://github.com/opencost/opencost/blob/develop/ui/ which is under by the Apache v2 License and also managed by the CNCF. - -## Installation - -1. Add the OpenCost dependency to the `packages/app/package.json`: - ```sh - # From your Backstage root directory - yarn --cwd packages/app add @backstage/plugin-opencost - ``` -2. Add the `OpenCostPage` to your `packages/app/src/App.tsx`: - - ```tsx - import { OpenCostPage } from '@backstage/plugin-opencost'; - ``` - -and - - ```tsx - - … - } /> - - ``` - -3. Import the `MoneyIcon` and add link to OpenCost to your sidebar - - ```typescript - // packages/app/src/components/Root/Root.tsx - import MoneyIcon from '@material-ui/icons/MonetizationOn'; - - ... - - export const Root = ({ children }: PropsWithChildren<{}>) => ( - - - ... - - ... - - - ); - - ``` - -## Plugin Configuration - -Since OpenCost doesn't have any authentication at this point, you just need to give API access to the plugin to access your data. - -If you haven't set up an ingress rule, you can port-forward the API with - -``` -kubectl -n opencost port-forward deployment/opencost 9003 -``` - -Add the following to your `app-config.yaml`: - -```yaml -opencost: - baseUrl: http://localhost:9003 -``` - -## Ideas/Next Steps - -- More testing -- Use the OpenCost mascot for the sidebar logo -- Use the Backstage proxy to communicate with the OpenCost API if necessary for authentication -- Convert AllocationReport.js to use the [Backstage Table](https://backstage.io/storybook/?path=/story/data-display-table--default-table) -- Allow for user-provided default reports and/or disabling controls -- Support multiple hard-coded reports -- clean up deprecation warnings and upgrade to all the latest React components -- Fork(?) to support `Kubecost`, which could provide Alerts and Recommendations, similar to the Cost Explorer plugin - -![Screenshot](screenshot.png) +This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-opencost` instead. diff --git a/plugins/opencost/package.json b/plugins/opencost/package.json index b66dd827e8..6afa76ac04 100644 --- a/plugins/opencost/package.json +++ b/plugins/opencost/package.json @@ -2,7 +2,8 @@ "name": "@backstage/plugin-opencost", "version": "0.2.9", "backstage": { - "role": "frontend-plugin" + "role": "frontend-plugin", + "moved": "@backstage-community/plugin-opencost" }, "publishConfig": { "access": "public", @@ -54,5 +55,6 @@ "react": "^16.13.1 || ^17.0.0 || ^18.0.0", "react-router-dom": "*" }, - "configSchema": "config.d.ts" + "configSchema": "config.d.ts", + "deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-opencost instead." }