-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,382 @@ | ||
diff --git a/app-config.production.yaml b/app-config.production.yaml | ||
index 05b02ac..5d426f5 100644 | ||
--- a/app-config.production.yaml | ||
+++ b/app-config.production.yaml | ||
@@ -15,3 +15,3 @@ backend: | ||
|
||
- # config options: https://node-postgres.com/api/client | ||
+ # config options: https://node-postgres.com/apis/client | ||
database: | ||
@@ -32,3 +32,3 @@ auth: | ||
providers: | ||
- guest: null | ||
+ guest: {} | ||
|
||
@@ -38,2 +38,18 @@ catalog: | ||
# on how to get entities into the catalog. | ||
- locations: [] | ||
+ locations: | ||
+ # Local example data, replace this with your production config, these are intended for demo use only. | ||
+ # File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root | ||
+ - type: file | ||
+ target: ./examples/entities.yaml | ||
+ | ||
+ # Local example template | ||
+ - type: file | ||
+ target: ./examples/template/template.yaml | ||
+ rules: | ||
+ - allow: [Template] | ||
+ | ||
+ # Local example organizational data | ||
+ - type: file | ||
+ target: ./examples/org.yaml | ||
+ rules: | ||
+ - allow: [User, Group] | ||
diff --git a/app-config.yaml b/app-config.yaml | ||
index 248cff1..ca52ec5 100644 | ||
--- a/app-config.yaml | ||
+++ b/app-config.yaml | ||
@@ -105 +105,9 @@ catalog: | ||
# - allow: [User, Group] | ||
+ | ||
+kubernetes: | ||
+ # see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options | ||
+ | ||
+# see https://backstage.io/docs/permissions/getting-started for more on the permission framework | ||
+permission: | ||
+ # setting this to `false` will disable permissions | ||
+ enabled: true | ||
diff --git a/backstage.json b/backstage.json | ||
index 39708a0..230d39d 100644 | ||
--- a/backstage.json | ||
+++ b/backstage.json | ||
@@ -1,3 +1,3 @@ | ||
{ | ||
- "version": "1.24.0" | ||
+ "version": "1.30.0" | ||
} | ||
diff --git a/package.json b/package.json | ||
index 5460719..80a963e 100644 | ||
--- a/package.json | ||
+++ b/package.json | ||
@@ -33,3 +33,3 @@ | ||
"devDependencies": { | ||
- "@backstage/cli": "^0.26.0", | ||
+ "@backstage/cli": "^0.27.0", | ||
"@backstage/e2e-test-utils": "^0.1.1", | ||
@@ -39,5 +39,5 @@ | ||
"lerna": "^7.3.0", | ||
- "node-gyp": "^9.0.0", | ||
+ "node-gyp": "^10.0.0", | ||
"prettier": "^2.3.2", | ||
- "typescript": "~5.3.0" | ||
+ "typescript": "~5.4.0" | ||
}, | ||
diff --git a/packages/app/package.json b/packages/app/package.json | ||
index 400f6cc..346ffc1 100644 | ||
--- a/packages/app/package.json | ||
+++ b/packages/app/package.json | ||
@@ -16,27 +16,26 @@ | ||
"dependencies": { | ||
- "@backstage/app-defaults": "^1.5.1", | ||
- "@backstage/catalog-model": "^1.4.5", | ||
- "@backstage/cli": "^0.26.0", | ||
- "@backstage/core-app-api": "^1.12.1", | ||
- "@backstage/core-components": "^0.14.1", | ||
- "@backstage/core-plugin-api": "^1.9.1", | ||
- "@backstage/integration-react": "^1.1.25", | ||
- "@backstage/plugin-api-docs": "^0.11.1", | ||
- "@backstage/plugin-catalog": "^1.18.0", | ||
- "@backstage/plugin-catalog-common": "^1.0.22", | ||
- "@backstage/plugin-catalog-graph": "^0.4.1", | ||
- "@backstage/plugin-catalog-import": "^0.10.7", | ||
- "@backstage/plugin-catalog-react": "^1.11.0", | ||
- "@backstage/plugin-github-actions": "^0.6.12", | ||
- "@backstage/plugin-org": "^0.6.21", | ||
- "@backstage/plugin-permission-react": "^0.4.21", | ||
- "@backstage/plugin-scaffolder": "^1.19.0", | ||
- "@backstage/plugin-search": "^1.4.7", | ||
- "@backstage/plugin-search-react": "^1.7.7", | ||
- "@backstage/plugin-tech-radar": "^0.7.0", | ||
- "@backstage/plugin-techdocs": "^1.10.1", | ||
- "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.6", | ||
- "@backstage/plugin-techdocs-react": "^1.2.0", | ||
- "@backstage/plugin-user-settings": "^0.8.2", | ||
- "@backstage/theme": "^0.5.2", | ||
+ "@backstage/app-defaults": "^1.5.10", | ||
+ "@backstage/catalog-model": "^1.6.0", | ||
+ "@backstage/cli": "^0.27.0", | ||
+ "@backstage/core-app-api": "^1.14.2", | ||
+ "@backstage/core-components": "^0.14.10", | ||
+ "@backstage/core-plugin-api": "^1.9.3", | ||
+ "@backstage/integration-react": "^1.1.30", | ||
+ "@backstage/plugin-api-docs": "^0.11.8", | ||
+ "@backstage/plugin-catalog": "^1.22.0", | ||
+ "@backstage/plugin-catalog-common": "^1.0.26", | ||
+ "@backstage/plugin-catalog-graph": "^0.4.8", | ||
+ "@backstage/plugin-catalog-import": "^0.12.2", | ||
+ "@backstage/plugin-catalog-react": "^1.12.3", | ||
+ "@backstage/plugin-kubernetes": "^0.11.13", | ||
+ "@backstage/plugin-org": "^0.6.28", | ||
+ "@backstage/plugin-permission-react": "^0.4.25", | ||
+ "@backstage/plugin-scaffolder": "^1.24.0", | ||
+ "@backstage/plugin-search": "^1.4.15", | ||
+ "@backstage/plugin-search-react": "^1.7.14", | ||
+ "@backstage/plugin-techdocs": "^1.10.8", | ||
+ "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.13", | ||
+ "@backstage/plugin-techdocs-react": "^1.2.7", | ||
+ "@backstage/plugin-user-settings": "^0.8.11", | ||
+ "@backstage/theme": "^0.5.6", | ||
"@material-ui/core": "^4.12.2", | ||
@@ -51,3 +50,3 @@ | ||
"devDependencies": { | ||
- "@backstage/test-utils": "^1.5.1", | ||
+ "@backstage/test-utils": "^1.5.10", | ||
"@playwright/test": "^1.32.3", | ||
diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx | ||
index f751cf6..e24c468 100644 | ||
--- a/packages/app/src/App.tsx | ||
+++ b/packages/app/src/App.tsx | ||
@@ -15,3 +15,2 @@ import { orgPlugin } from '@backstage/plugin-org'; | ||
import { SearchPage } from '@backstage/plugin-search'; | ||
-import { TechRadarPage } from '@backstage/plugin-tech-radar'; | ||
import { | ||
@@ -85,6 +84,2 @@ const routes = ( | ||
<Route path="/api-docs" element={<ApiExplorerPage />} /> | ||
- <Route | ||
- path="/tech-radar" | ||
- element={<TechRadarPage width={1500} height={800} />} | ||
- /> | ||
<Route | ||
diff --git a/packages/app/src/components/Root/Root.tsx b/packages/app/src/components/Root/Root.tsx | ||
index 6768b48..853d175 100644 | ||
--- a/packages/app/src/components/Root/Root.tsx | ||
+++ b/packages/app/src/components/Root/Root.tsx | ||
@@ -4,3 +4,2 @@ import HomeIcon from '@material-ui/icons/Home'; | ||
import ExtensionIcon from '@material-ui/icons/Extension'; | ||
-import MapIcon from '@material-ui/icons/MyLocation'; | ||
import LibraryBooks from '@material-ui/icons/LibraryBooks'; | ||
@@ -28,2 +27,4 @@ import MenuIcon from '@material-ui/icons/Menu'; | ||
import SearchIcon from '@material-ui/icons/Search'; | ||
+import { MyGroupsSidebarItem } from '@backstage/plugin-org'; | ||
+import GroupIcon from '@material-ui/icons/People'; | ||
|
||
@@ -68,2 +69,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => ( | ||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" /> | ||
+ <MyGroupsSidebarItem | ||
+ singularTitle="My Group" | ||
+ pluralTitle="My Groups" | ||
+ icon={GroupIcon} | ||
+ /> | ||
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" /> | ||
@@ -74,3 +80,3 @@ export const Root = ({ children }: PropsWithChildren<{}>) => ( | ||
<SidebarScrollWrapper> | ||
- <SidebarItem icon={MapIcon} to="tech-radar" text="Tech Radar" /> | ||
+ {/* Items in this group will be scrollable if they run out of space */} | ||
</SidebarScrollWrapper> | ||
diff --git a/packages/app/src/components/catalog/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage.tsx | ||
index 7c6a71e..6164c76 100644 | ||
--- a/packages/app/src/components/catalog/EntityPage.tsx | ||
+++ b/packages/app/src/components/catalog/EntityPage.tsx | ||
@@ -30,6 +30,2 @@ import { | ||
} from '@backstage/plugin-catalog'; | ||
-import { | ||
- isGithubActionsAvailable, | ||
- EntityGithubActionsContent, | ||
-} from '@backstage/plugin-github-actions'; | ||
import { | ||
@@ -60,2 +56,7 @@ import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib'; | ||
|
||
+import { | ||
+ EntityKubernetesContent, | ||
+ isKubernetesAvailable, | ||
+} from '@backstage/plugin-kubernetes'; | ||
+ | ||
const techdocsContent = ( | ||
@@ -72,5 +73,9 @@ const cicdContent = ( | ||
<EntitySwitch> | ||
- <EntitySwitch.Case if={isGithubActionsAvailable}> | ||
- <EntityGithubActionsContent /> | ||
- </EntitySwitch.Case> | ||
+ {/* | ||
+ Here you can add support for different CI/CD services, for example | ||
+ using @backstage-community/plugin-github-actions as follows: | ||
+ <EntitySwitch.Case if={isGithubActionsAvailable}> | ||
+ <EntityGithubActionsContent /> | ||
+ </EntitySwitch.Case> | ||
+ */} | ||
|
||
@@ -152,2 +157,10 @@ const serviceEntityPage = ( | ||
|
||
+ <EntityLayout.Route | ||
+ path="/kubernetes" | ||
+ title="Kubernetes" | ||
+ if={isKubernetesAvailable} | ||
+ > | ||
+ <EntityKubernetesContent /> | ||
+ </EntityLayout.Route> | ||
+ | ||
<EntityLayout.Route path="/api" title="API"> | ||
@@ -190,2 +203,10 @@ const websiteEntityPage = ( | ||
|
||
+ <EntityLayout.Route | ||
+ path="/kubernetes" | ||
+ title="Kubernetes" | ||
+ if={isKubernetesAvailable} | ||
+ > | ||
+ <EntityKubernetesContent /> | ||
+ </EntityLayout.Route> | ||
+ | ||
<EntityLayout.Route path="/dependencies" title="Dependencies"> | ||
diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile | ||
index 18548e9..bef67b5 100644 | ||
--- a/packages/backend/Dockerfile | ||
+++ b/packages/backend/Dockerfile | ||
@@ -47,2 +47,5 @@ RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid | ||
|
||
+# This will include the examples, if you don't need these simply remove this line | ||
+COPY --chown=node:node examples ./examples | ||
+ | ||
# Then copy the rest of the backend bundle, along with any other files we might want. | ||
diff --git a/packages/backend/package.json b/packages/backend/package.json | ||
index 454444e..6a14abc 100644 | ||
--- a/packages/backend/package.json | ||
+++ b/packages/backend/package.json | ||
@@ -18,28 +18,30 @@ | ||
"dependencies": { | ||
- "@backstage/backend-common": "^0.21.4", | ||
- "@backstage/backend-defaults": "^0.2.14", | ||
- "@backstage/backend-tasks": "^0.5.19", | ||
+ "@backstage/backend-common": "^0.24.0", | ||
+ "@backstage/backend-defaults": "^0.4.2", | ||
+ "@backstage/backend-tasks": "^0.6.0", | ||
"@backstage/config": "^1.2.0", | ||
- "@backstage/plugin-app-backend": "^0.3.62", | ||
- "@backstage/plugin-auth-backend": "^0.22.0", | ||
- "@backstage/plugin-auth-backend-module-github-provider": "^0.1.11", | ||
- "@backstage/plugin-auth-backend-module-guest-provider": "^0.1.0", | ||
- "@backstage/plugin-auth-node": "^0.4.9", | ||
- "@backstage/plugin-catalog-backend": "^1.18.0", | ||
- "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.11", | ||
- "@backstage/plugin-permission-backend": "^0.5.37", | ||
- "@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.11", | ||
- "@backstage/plugin-permission-common": "^0.7.13", | ||
- "@backstage/plugin-permission-node": "^0.7.25", | ||
- "@backstage/plugin-proxy-backend": "^0.4.12", | ||
- "@backstage/plugin-scaffolder-backend": "^1.22.0", | ||
- "@backstage/plugin-search-backend": "^1.5.4", | ||
- "@backstage/plugin-search-backend-module-catalog": "^0.1.18", | ||
- "@backstage/plugin-search-backend-module-techdocs": "^0.1.18", | ||
- "@backstage/plugin-search-backend-node": "^1.2.18", | ||
- "@backstage/plugin-techdocs-backend": "^1.10.0", | ||
+ "@backstage/plugin-app-backend": "^0.3.72", | ||
+ "@backstage/plugin-auth-backend": "^0.22.10", | ||
+ "@backstage/plugin-auth-backend-module-github-provider": "^0.1.20", | ||
+ "@backstage/plugin-auth-backend-module-guest-provider": "^0.1.9", | ||
+ "@backstage/plugin-auth-node": "^0.5.0", | ||
+ "@backstage/plugin-catalog-backend": "^1.25.0", | ||
+ "@backstage/plugin-catalog-backend-module-logs": "^0.0.2", | ||
+ "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.21", | ||
+ "@backstage/plugin-kubernetes-backend": "^0.18.4", | ||
+ "@backstage/plugin-permission-backend": "^0.5.47", | ||
+ "@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.20", | ||
+ "@backstage/plugin-permission-common": "^0.8.1", | ||
+ "@backstage/plugin-permission-node": "^0.8.1", | ||
+ "@backstage/plugin-proxy-backend": "^0.5.4", | ||
+ "@backstage/plugin-scaffolder-backend": "^1.24.0", | ||
+ "@backstage/plugin-search-backend": "^1.5.15", | ||
+ "@backstage/plugin-search-backend-module-catalog": "^0.2.0", | ||
+ "@backstage/plugin-search-backend-module-pg": "^0.5.33", | ||
+ "@backstage/plugin-search-backend-module-techdocs": "^0.2.0", | ||
+ "@backstage/plugin-search-backend-node": "^1.3.0", | ||
+ "@backstage/plugin-techdocs-backend": "^1.10.10", | ||
"app": "link:../app", | ||
"better-sqlite3": "^9.0.0", | ||
- "dockerode": "^3.3.1", | ||
- "node-gyp": "^9.0.0", | ||
+ "node-gyp": "^10.0.0", | ||
"pg": "^8.11.3", | ||
@@ -48,4 +50,3 @@ | ||
"devDependencies": { | ||
- "@backstage/cli": "^0.26.0", | ||
- "@types/dockerode": "^3.3.0", | ||
+ "@backstage/cli": "^0.27.0", | ||
"@types/express": "^4.17.6", | ||
diff --git a/packages/backend/src/index.test.ts b/packages/backend/src/index.test.ts | ||
deleted file mode 100644 | ||
index 7814b8c..0000000 | ||
--- a/packages/backend/src/index.test.ts | ||
+++ /dev/null | ||
@@ -1,8 +0,0 @@ | ||
-import { PluginEnvironment } from './types'; | ||
- | ||
-describe('test', () => { | ||
- it('unbreaks the test runner', () => { | ||
- const unbreaker = {} as PluginEnvironment; | ||
- expect(unbreaker).toBeTruthy(); | ||
- }); | ||
-}); | ||
diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts | ||
index 44fde69..f57d4c5 100644 | ||
--- a/packages/backend/src/index.ts | ||
+++ b/packages/backend/src/index.ts | ||
@@ -21,3 +21,3 @@ backend.add(import('@backstage/plugin-auth-backend')); | ||
backend.add(import('@backstage/plugin-auth-backend-module-guest-provider')); | ||
-// See https://github.com/backstage/backstage/blob/master/docs/auth/guest/provider.md | ||
+// See https://backstage.io/docs/auth/guest/provider | ||
|
||
@@ -29,4 +29,8 @@ backend.add( | ||
|
||
+// See https://backstage.io/docs/features/software-catalog/configuration#subscribing-to-catalog-errors | ||
+backend.add(import('@backstage/plugin-catalog-backend-module-logs')); | ||
+ | ||
// permission plugin | ||
backend.add(import('@backstage/plugin-permission-backend/alpha')); | ||
+// See https://backstage.io/docs/permissions/getting-started for how to create your own permission policy | ||
backend.add( | ||
@@ -37,2 +41,8 @@ backend.add( | ||
backend.add(import('@backstage/plugin-search-backend/alpha')); | ||
+ | ||
+// search engine | ||
+// See https://backstage.io/docs/features/search/search-engines | ||
+backend.add(import('@backstage/plugin-search-backend-module-pg/alpha')); | ||
+ | ||
+// search collators | ||
backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha')); | ||
@@ -40,2 +50,5 @@ backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha')); | ||
|
||
+// kubernetes | ||
+backend.add(import('@backstage/plugin-kubernetes-backend/alpha')); | ||
+ | ||
backend.start(); | ||
diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts | ||
deleted file mode 100644 | ||
index 9cd2c74..0000000 | ||
--- a/packages/backend/src/types.ts | ||
+++ /dev/null | ||
@@ -1,25 +0,0 @@ | ||
-import { Logger } from 'winston'; | ||
-import { Config } from '@backstage/config'; | ||
-import { | ||
- PluginCacheManager, | ||
- PluginDatabaseManager, | ||
- PluginEndpointDiscovery, | ||
- TokenManager, | ||
- UrlReader, | ||
-} from '@backstage/backend-common'; | ||
-import { PluginTaskScheduler } from '@backstage/backend-tasks'; | ||
-import { PermissionEvaluator } from '@backstage/plugin-permission-common'; | ||
-import { IdentityApi } from '@backstage/plugin-auth-node'; | ||
- | ||
-export type PluginEnvironment = { | ||
- logger: Logger; | ||
- database: PluginDatabaseManager; | ||
- cache: PluginCacheManager; | ||
- config: Config; | ||
- reader: UrlReader; | ||
- discovery: PluginEndpointDiscovery; | ||
- tokenManager: TokenManager; | ||
- scheduler: PluginTaskScheduler; | ||
- permissions: PermissionEvaluator; | ||
- identity: IdentityApi; | ||
-}; |