Compare commits

..

No commits in common. "master" and "med" have entirely different histories.
master ... med

23 changed files with 3536 additions and 4837 deletions

View File

@ -54,9 +54,6 @@ proxy:
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
argocd:
baseUrl: https://argocd-server-sreez.apps.oc-med.wk.nt.local
techdocs:
builder: "local" # Alternatives - 'external'
generator:
@ -139,23 +136,3 @@ notifications:
externalCallerSecret: notifications-secret
iframe:
allowList: [ "sreez.nationtech.io", "www.hyperdx.io", "http://localhost:8080" ]
kubernetes:
serviceLocatorMethod:
type: 'multiTenant'
clusterLocatorMethods:
- type: 'config'
clusters:
- url: 'https://api.oc-med.wk.nt.local:6443'
name: 'WK OKD Cluster'
authProvider: 'serviceAccount'
serviceAccountToken: 'eyJhbGciOiJSUzI1NiIsImtpZCI6IllKQnpxZ19WTWVOcHdvRTZXc2JpN1NJQWlGMEJpa2c1QTZpLUV6UDJGRVEifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJkZWZhdWx0Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZWNyZXQubmFtZSI6ImJhY2tzdGFnZS1zYS10b2tlbi1zZWNyZXQiLCJrdWJlcm5ldGVzLmlvL3NlcnZpY2VhY2NvdW50L3NlcnZpY2UtYWNjb3VudC5uYW1lIjoiYmFja3N0YWdlLXNhIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiNzUzYTgzYmItNjgxNy00NzYwLWFlOTYtYzhkMDc3NWQ1NTRhIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50OmRlZmF1bHQ6YmFja3N0YWdlLXNhIn0.1iRyZq99AlwM6bdJNXPSbi1z6CKLAU3OvsmGinF1IyogbSKsfgPCNL81wQYhfiJmvgOQOmhHLfk10NxGcA2YR7ijUB4I5_LOBqi3eketpgxYMgvvv31vRX1cVcKZE9F787k2rQcR1OgKnRcKwYAkCHnbSkObTf4wmL9g2lmfLN-vmZTGiQQ_RfzR5aoklqwWZjmMvVa3-9XBEnbg2Cc77rcireMH55xPsaYUDVDF0NYEpGfr94Ys2Ois7wrcXtnG7NOPdmVAbbUzJ1nmm8AHxuQW2IItcea3UGaQCQtVTOVY4jektF81UU-eXHnTC1JHH1kTCr-jeWc8K6-wmuoTgOx5fRUgtC8tVZrwNwIIA-8-gutFDS5ica5IQ26NXeLt5CF7OJ9Dw9wwTyNLmbvchwt1yTwXccOdwBqqE2_tQSLhpkZOFvdZfELxblvvIJ2fBjs425dJ6hfP1vFm82mSBo3YeTm5CM_uj0UHlj8339N55TpKDnY_l1Tr_TTOdvuEpM07Gl_PrJzl9QjzvnW0Db6Php9qjnc6ID24emYI-fF9ITzR1Lgv2dMZA38NOOH4gm75B4ULBw5i_Ek0WOBI2D8-QsZm2T3uZZPkclGGdMFEfsXlOxAvqRT1WJC5g8jGvdixuLqdhZTxp-E4xD4cuKRVYzS1VemNbNo5e8an1nE'
skipTLSVerify: true
skipMetricsLookup: false
customResources:
- group: 'route.openshift.io'
apiVersion: 'v1'
plural: 'routes'
- group: 'org.eclipse.che'
apiVersion: 'v2'
plural: 'checlusters'

View File

@ -1,57 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: backstage-clusterrole
rules:
- apiGroups:
- '*'
resources:
- pods
- pods/log
- configmaps
- services
- deployments
- replicasets
- horizontalpodautoscalers
- ingresses
- statefulsets
- limitranges
- resourcequotas
- daemonsets
verbs:
- get
- list
- watch
- apiGroups:
- batch
resources:
- jobs
- cronjobs
verbs:
- get
- list
- watch
- apiGroups:
- metrics.k8s.io
resources:
- pods
verbs:
- get
- list
- apiGroups:
- route.openshift.io
resources:
- routes
verbs:
- get
- list
- apiGroups:
- org.eclipse.che
resources:
- checlusters
verbs:
- get
- list

View File

@ -1,12 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: read-all-clusterrole-binding
subjects:
- kind: ServiceAccount
name: backstage-sa
namespace: default # Update the namespace if needed
roleRef:
kind: ClusterRole
name: backstage-clusterrole
apiGroup: rbac.authorization.k8s.io

View File

@ -1,15 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
name: backstage-role
rules:
- apiGroups: [""]
resources: ["*"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps", "batch", "extensions", "networking.k8s.io", "rbac.authorization.k8s.io", "storage.k8s.io"]
resources: ["*"]
verbs: ["get", "list", "watch"]
- apiGroups: ["autoscaling"]
resources: ["horizontalpodautoscalers"]
verbs: ["get", "list", "watch"]

View File

@ -1,13 +0,0 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: backstage-rolebinding
namespace: default
subjects:
- kind: ServiceAccount
name: backstage-sa
namespace: default
roleRef:
kind: Role
name: backstage-role
apiGroup: rbac.authorization.k8s.io

View File

@ -1,7 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: backstage-sa-token-secret
annotations:
kubernetes.io/service-account.name: backstage-sa
type: kubernetes.io/service-account-token

View File

@ -1,15 +0,0 @@
kind: Secret
apiVersion: v1
metadata:
name: devspaces-github-oauth-config
namespace: sreez
labels:
app.kubernetes.io/part-of: che.eclipse.org
app.kubernetes.io/component: oauth-scm-configuration
annotations:
che.eclipse.org/oauth-scm-server: github
che.eclipse.org/scm-server-endpoint: https://github.com
type: Opaque
stringData:
id: Ov23li2sU4W3iLzocZWP
secret: 8e041432352bf0e5f2bbb4bff25c3dea9b391feb

View File

@ -1,109 +0,0 @@
# Creating ServiceAccount for Backstage
## Create the ServiceAccount itself
```
$ kubectl create serviceaccount backstage-sa -n default
```
!!! Role did NOT work (probably a namespace issue), created a clusterRole + binding instead, see below
## Create the role
backstage-role.yaml:
```
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
name: backstage-role
rules:
- apiGroups: [""]
resources: ["pods", "services"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch"]
```
```
$ kubectl apply -f backstage-role.yaml
```
## Bind role to service account
backstage-rolebinding.yaml:
```
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: backstage-rolebinding
namespace: default
subjects:
- kind: ServiceAccount
name: backstage-sa
namespace: default
roleRef:
kind: Role
name: backstage-role
apiGroup: rbac.authorization.k8s.io
```
```
$ kubectl apply -f backstage-rolebinding.yaml
```
## Create the ClusterRole
## Create the ClusterRoleBinding
## Create a secret token for the service account
backstage-sa-token-secret.yaml:
```
apiVersion: v1
kind: Secret
metadata:
name: backstage-sa-token-secret
annotations:
kubernetes.io/service-account.name: backstage-sa
type: kubernetes.io/service-account-token
```
```
$ kubectl apply -f backstage-sa-token-secret.yaml -n default
```
## Link the secret with the service account
```
$ oc secrets link backstage-sa backstage-sa-token-secret -n default
```
## Get the service account token
Get the name of the secret (backstage-sa-secret):
```
$ kubectl get serviceaccount backstage-sa -n default -o jsonpath='{.secrets[0].name}'
```
get the secret value (the token):
```
kubectl get secret backstage-sa-secret -n default -o jsonpath='{.data.token}' | base64 --decode
```
## Update app-config
```
kubernetes:
serviceLocatorMethod:
type: 'multiTenant'
clusterLocatorMethods:
- type: 'config'
clusters:
- url: 'https://api.oc-med.wk.nt.local:6443'
name: 'WK OKD Cluster'
authProvider: 'serviceAccount'
serviceAccountToken: '${KUBERNETES_SERVICE_ACCOUNT_TOKEN}'
skipTLSVerify: true
```

View File

@ -1,14 +0,0 @@
create github app
-> authorization callback must contain the IDP name as defined in the OAuth resource
create github secret (okd-github-secret.yaml)
create github OAuth resource (okd-oauth-github)
-> make sure secret name matches and idp name matches auth callback from github app
```
$ oc get user
$ oc adm policy add-role-to-user admin <github-username> -n <project-name>
```

View File

@ -1,8 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: okd-github-secret
namespace: openshift-config
type: Opaque
stringData:
clientSecret: 41dd1d62609725a5a0ecbdccb1fa9805ad55dc93

View File

@ -1,16 +0,0 @@
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
name: cluster
spec:
identityProviders:
- name: githubidp
mappingMethod: claim
type: GitHub
github:
clientID: Ov23liRSsXqOfUPVerIx
clientSecret:
name: okd-github-secret
organizations:
- Kheops-org

View File

@ -31,7 +31,7 @@
]
},
"devDependencies": {
"@backstage/cli": "^0.26.6",
"@backstage/cli": "^0.26.3",
"@backstage/e2e-test-utils": "^0.1.1",
"@playwright/test": "^1.32.3",
"@spotify/prettier-config": "^12.0.0",

View File

@ -15,7 +15,6 @@
},
"dependencies": {
"@backstage-community/plugin-github-actions": "^0.6.16",
"@backstage-community/plugin-tech-radar": "^0.7.4",
"@backstage/app-defaults": "^1.5.5",
"@backstage/catalog-model": "^1.5.0",
"@backstage/cli": "^0.26.6",
@ -29,24 +28,23 @@
"@backstage/plugin-catalog-graph": "^0.4.5",
"@backstage/plugin-catalog-import": "^0.11.0",
"@backstage/plugin-catalog-react": "^1.12.0",
"@backstage/plugin-devtools": "^0.1.14",
"@backstage/plugin-kubernetes": "^0.11.10",
"@backstage/plugin-devtools": "^0.1.13",
"@backstage/plugin-org": "^0.6.25",
"@backstage/plugin-permission-react": "^0.4.22",
"@backstage/plugin-scaffolder": "^1.20.1",
"@backstage/plugin-scaffolder": "^1.20.0",
"@backstage/plugin-search": "^1.4.11",
"@backstage/plugin-search-react": "^1.7.11",
"@backstage/plugin-tech-radar": "^0.7.3",
"@backstage/plugin-techdocs": "^1.10.5",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.10",
"@backstage/plugin-techdocs-react": "^1.2.4",
"@backstage/plugin-user-settings": "^0.8.6",
"@backstage/theme": "^0.5.5",
"@bestsellerit/backstage-plugin-harbor": "^0.3.1",
"@mui/material": "next",
"@internal/backstage-plugin-devspaces-plugin": "^0.1.0",
"@janus-idp/backstage-plugin-topology": "1.20.2",
"@janus-idp/plugin-notifications": "^1.3.1",
"@material-ui/icons": "^4.11.3",
"@mui/material": "next",
"@roadiehq/backstage-plugin-argo-cd": "^2.6.5",
"@roadiehq/backstage-plugin-github-insights": "^2.3.29",
"@roadiehq/backstage-plugin-github-pull-requests": "^2.5.26",
@ -63,7 +61,7 @@
"yarn": "^1.22.22"
},
"devDependencies": {
"@backstage/test-utils": "^1.5.5",
"@backstage/test-utils": "^1.5.4",
"@playwright/test": "^1.32.3",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",

View File

@ -6,7 +6,7 @@ import {CatalogImportPage, catalogImportPlugin,} from '@backstage/plugin-catalog
import {ScaffolderPage, scaffolderPlugin} from '@backstage/plugin-scaffolder';
import {orgPlugin} from '@backstage/plugin-org';
import {SearchPage} from '@backstage/plugin-search';
import {TechRadarPage} from '@backstage-community/plugin-tech-radar';
import {TechRadarPage} from '@backstage/plugin-tech-radar';
import {TechDocsIndexPage, techdocsPlugin, TechDocsReaderPage,} from '@backstage/plugin-techdocs';
import {TechDocsAddons} from '@backstage/plugin-techdocs-react';
import {ReportIssue} from '@backstage/plugin-techdocs-module-addons-contrib';

View File

@ -8,8 +8,6 @@ import {overviewContent} from "../tabs/OverviewContent";
import {buildsContent} from "../tabs/BuildsContent";
import {workflowsContent} from "../tabs/WorkflowsContent";
import {techdocsContent} from "../tabs/TechdocsContent";
import {kubernetesContent} from "../tabs/KubernetesContent";
import {topologyContent} from "../tabs/TopologyContent";
export const serviceEntityPage = (
<EntityLayout>
@ -69,14 +67,5 @@ export const serviceEntityPage = (
<EntityLayout.Route path="/docs" title="Docs">
{techdocsContent}
</EntityLayout.Route>
<EntityLayout.Route path="/kubernetes" title="Kubernetes">
{kubernetesContent}
</EntityLayout.Route>
<EntityLayout.Route path="/topology" title="Topology">
{topologyContent}
</EntityLayout.Route>
</EntityLayout>
);

View File

@ -1,16 +0,0 @@
import { EntityKubernetesContent } from '@backstage/plugin-kubernetes';
import { TopologyPage } from '@janus-idp/backstage-plugin-topology';
import {Grid} from "@material-ui/core";
import React from "react";
export const kubernetesContent = (
<Grid container spacing={1} alignItems={'stretch'} justifyContent={'flex-start'}>
<Grid item xs={4} style={{ height: 'calc(100vh - 220px' }}>
<TopologyPage />
</Grid>
<Grid item xs={8}>
<EntityKubernetesContent refreshIntervalMs={5000} />
</Grid>
</Grid>
);

View File

@ -5,10 +5,9 @@ import {entityWarningContent} from "./EntityWarningContent";
import {GithubWorkflowsCard} from "@veecode-platform/backstage-plugin-github-workflows";
import {LatestWorkflowRunCard} from "@backstage-community/plugin-github-actions";
import {EntityGithubInsightsReadmeCard} from "@roadiehq/backstage-plugin-github-insights";
import {EntityArgoCDOverviewCard, EntityArgoCDHistoryCard} from "@roadiehq/backstage-plugin-argo-cd";
import {EntityArgoCDOverviewCard} from "@roadiehq/backstage-plugin-argo-cd";
import {EntityGithubPullRequestsOverviewCard} from "@roadiehq/backstage-plugin-github-pull-requests";
import {EntityCatalogGraphCard} from "@backstage/plugin-catalog-graph";
import { DevspacesPluginPage } from "@internal/backstage-plugin-devspaces-plugin";
export const overviewContent = (
<Grid container spacing={1} alignItems={'stretch'} justifyContent={'flex-start'}>
@ -28,7 +27,6 @@ export const overviewContent = (
</Grid>
<Grid item xs={8}>
<EntityArgoCDOverviewCard/>
{/*<EntityArgoCDHistoryCard/>*/}
</Grid>
</Grid>
<GithubWorkflowsCard/>

View File

@ -1,7 +0,0 @@
import { TopologyPage } from '@janus-idp/backstage-plugin-topology';
// import { TopologyPage } from '@redhat/backstage-plugin-topology';
import React from "react";
export const topologyContent = (
<TopologyPage />
);

View File

@ -16,38 +16,37 @@
"build-image": "docker build ../.. -f Dockerfile --tag backstage"
},
"dependencies": {
"@backstage/backend-common": "^0.22.0",
"@backstage/backend-common": "^0.21.7",
"@backstage/backend-defaults": "^0.2.18",
"@backstage/backend-plugin-api": "^0.6.18",
"@backstage/backend-tasks": "^0.5.23",
"@backstage/backend-tasks": "^0.5.22",
"@backstage/config": "^1.2.0",
"@backstage/integration": "^1.11.0",
"@backstage/plugin-app-backend": "^0.3.67",
"@backstage/plugin-auth-backend": "^0.22.5",
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.15",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.4",
"@backstage/plugin-auth-node": "^0.4.13",
"@backstage/plugin-catalog-backend": "^1.22.0",
"@backstage/plugin-catalog-backend-module-github": "^0.6.1",
"@backstage/plugin-catalog-backend-module-github-org": "^0.1.13",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.16",
"@backstage/plugin-catalog-node": "^1.12.0",
"@backstage/plugin-devtools-backend": "^0.3.4",
"@backstage/plugin-events-backend-module-github": "^0.2.4",
"@backstage/plugin-kubernetes-backend": "^0.17.1",
"@backstage/plugin-permission-backend": "^0.5.42",
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.15",
"@backstage/integration": "^1.10.0",
"@backstage/plugin-app-backend": "^0.3.65",
"@backstage/plugin-auth-backend": "^0.22.4",
"@backstage/plugin-auth-backend-module-github-provider": "^0.1.14",
"@backstage/plugin-auth-backend-module-guest-provider": "^0.1.3",
"@backstage/plugin-auth-node": "^0.4.12",
"@backstage/plugin-catalog-backend": "^1.21.1",
"@backstage/plugin-catalog-backend-module-github": "^0.6.0",
"@backstage/plugin-catalog-backend-module-github-org": "^0.1.12",
"@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.1.15",
"@backstage/plugin-catalog-node": "^1.11.1",
"@backstage/plugin-devtools-backend": "^0.3.3",
"@backstage/plugin-events-backend-module-github": "^0.2.3",
"@backstage/plugin-permission-backend": "^0.5.41",
"@backstage/plugin-permission-backend-module-allow-all-policy": "^0.1.14",
"@backstage/plugin-permission-common": "^0.7.13",
"@backstage/plugin-permission-node": "^0.7.29",
"@backstage/plugin-proxy-backend": "^0.4.16",
"@backstage/plugin-scaffolder-backend": "^1.22.7",
"@backstage/plugin-scaffolder-backend-module-github": "^0.2.8",
"@backstage/plugin-scaffolder-node": "^0.4.4",
"@backstage/plugin-search-backend": "^1.5.9",
"@backstage/plugin-search-backend-module-catalog": "^0.1.24",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.23",
"@backstage/plugin-search-backend-node": "^1.2.23",
"@backstage/plugin-techdocs-backend": "^1.10.5",
"@backstage/plugin-permission-node": "^0.7.28",
"@backstage/plugin-proxy-backend": "^0.4.15",
"@backstage/plugin-scaffolder-backend": "^1.22.4",
"@backstage/plugin-scaffolder-backend-module-github": "^0.2.7",
"@backstage/plugin-scaffolder-node": "^0.4.3",
"@backstage/plugin-search-backend": "^1.5.7",
"@backstage/plugin-search-backend-module-catalog": "^0.1.22",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.22",
"@backstage/plugin-search-backend-node": "^1.2.21",
"@backstage/plugin-techdocs-backend": "^1.10.4",
"@janus-idp/plugin-notifications-backend": "^1.4.12",
"@muvaf/create-argocd-application": "^0.4.1",
"@muvaf/kubernetes-apply": "^0.1.0",
@ -62,7 +61,7 @@
"zod": "^3.23.6"
},
"devDependencies": {
"@backstage/cli": "^0.26.6",
"@backstage/cli": "^0.26.3",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",

View File

@ -56,9 +56,6 @@ backend.add(import('@backstage/plugin-search-backend/alpha'));
backend.add(import('@backstage/plugin-devtools-backend'));
// Kubernetes backend plugin
backend.add(import('@backstage/plugin-kubernetes-backend/alpha'));
const scaffolderModuleCustomExtensions = createBackendModule({
pluginId: 'scaffolder', // name of the plugin that the module is targeting
moduleId: 'custom-extensions',

View File

@ -24,9 +24,9 @@
"postpack": "backstage-cli package postpack"
},
"dependencies": {
"@backstage/core-components": "^0.14.7",
"@backstage/core-components": "^0.14.4",
"@backstage/core-plugin-api": "^1.9.2",
"@backstage/theme": "^0.5.5",
"@backstage/theme": "^0.5.3",
"@material-ui/core": "^4.9.13",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.60",
@ -36,10 +36,10 @@
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.6",
"@backstage/core-app-api": "^1.12.5",
"@backstage/dev-utils": "^1.0.32",
"@backstage/test-utils": "^1.5.5",
"@backstage/cli": "^0.26.3",
"@backstage/core-app-api": "^1.12.4",
"@backstage/dev-utils": "^1.0.31",
"@backstage/test-utils": "^1.5.4",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",

View File

@ -32,8 +32,8 @@
"react": "^16.13.1 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.26.6",
"@backstage/test-utils": "^1.5.5",
"@backstage/cli": "^0.26.3",
"@backstage/test-utils": "^1.5.4",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"typescript-language-server": "^4.3.3"

File diff suppressed because it is too large Load Diff