Merge remote-tracking branch 'origin/master' into reconfigure
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 1.9 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
@@ -153,7 +153,6 @@ export const createOktaProvider: AuthProviderFactory = ({
|
||||
|
||||
// Wrap the OAuthProviderHandlers with OAuthProvider, which implements AuthProviderRouteHandlers
|
||||
return OAuthProvider.fromConfig(globalConfig, provider, {
|
||||
disableRefresh: false,
|
||||
providerId,
|
||||
tokenIssuer,
|
||||
});
|
||||
|
||||
@@ -85,13 +85,14 @@ array. Users will see this value in the Software Catalog Kubernetes plugin.
|
||||
This determines how the Kubernetes client authenticates with the Kubernetes
|
||||
cluster. Valid values are:
|
||||
|
||||
| Value | Description |
|
||||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
|
||||
| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
|
||||
| `aws` | This will use AWS credentials to access resources in EKS clusters |
|
||||
| `googleServiceAccount` | This will use the Google Cloud service account credentials to access resources in clusters |
|
||||
| `azure` | This will use [Azure Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to access resources in clusters |
|
||||
| Value | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `serviceAccount` | This will use a Kubernetes [service account](https://kubernetes.io/docs/reference/access-authn-authz/service-accounts-admin/) to access the Kubernetes API. When this is used the `serviceAccountToken` field should also be set. |
|
||||
| `google` | This will use a user's Google auth token from the [Google auth plugin](https://backstage.io/docs/auth/) to access the Kubernetes API. |
|
||||
| `aws` | This will use AWS credentials to access resources in EKS clusters |
|
||||
| `googleServiceAccount` | This will use the Google Cloud service account credentials to access resources in clusters |
|
||||
| `azure` | This will use [Azure Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to access resources in clusters |
|
||||
| `oidc` | This will use [Oidc Tokens](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#openid-connect-tokens) to authenticate to the Kubernetes API. When this is used the `oidcTokenProvider` field should also be set. |
|
||||
|
||||
##### `clusters.\*.skipTLSVerify`
|
||||
|
||||
@@ -115,6 +116,33 @@ kubectl -n <NAMESPACE> get secret $(kubectl -n <NAMESPACE> get sa <SERVICE_ACCOU
|
||||
| base64 --decode
|
||||
```
|
||||
|
||||
##### `clusters.\*.oidcTokenProvider` (optional)
|
||||
|
||||
This field is to be used when using the `oidc` auth provider. It will use the id tokens
|
||||
from a configured [backstage auth provider](https://backstage.io/docs/auth/) to
|
||||
authenticate to the cluster. The selected `oidcTokenProvider` needs to be properly
|
||||
configured under `auth` for this to work.
|
||||
|
||||
```yaml
|
||||
kubernetes:
|
||||
clusterLocatorMethods:
|
||||
- type: 'config'
|
||||
clusters:
|
||||
- name: test-cluster
|
||||
url: http://localhost:8080
|
||||
authProvider: oidc
|
||||
oidcTokenProvider: okta # This value needs to match a config under auth.providers
|
||||
auth:
|
||||
providers:
|
||||
okta:
|
||||
development:
|
||||
clientId: ${AUTH_OKTA_CLIENT_ID}
|
||||
clientSecret: ${AUTH_OKTA_CLIENT_SECRET}
|
||||
audience: ${AUTH_OKTA_AUDIENCE}
|
||||
```
|
||||
|
||||
The following values are supported out-of-the-box by the frontend: `google`, `microsoft`, `okta`, `onelogin`.
|
||||
|
||||
##### `clusters.\*.dashboardUrl` (optional)
|
||||
|
||||
Specifies the link to the Kubernetes dashboard managing this cluster.
|
||||
|
||||
@@ -71,6 +71,7 @@ export const searchPage = (
|
||||
<CatalogResultListItem
|
||||
key={result.document.location}
|
||||
result={result.document}
|
||||
highlight={result.highlight}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
@@ -78,6 +79,7 @@ export const searchPage = (
|
||||
<DefaultResultListItem
|
||||
key={result.document.location}
|
||||
result={result.document}
|
||||
highlight={result.highlight}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -266,6 +268,7 @@ an example:
|
||||
<CatalogResultListItem
|
||||
key={result.document.location}
|
||||
result={result.document}
|
||||
highlight={result.highlight}
|
||||
/>
|
||||
);
|
||||
// ...
|
||||
|
||||
@@ -411,6 +411,29 @@ export class YourSearchEngine implements SearchEngine {
|
||||
}
|
||||
```
|
||||
|
||||
## How to customize search results highlighting styling
|
||||
|
||||
The default highlighting styling for matched terms in search results is your
|
||||
browsers default styles for the `<mark>` HTML tag. If you want to customize
|
||||
how highlighted terms look you can follow Backstage's guide on how to
|
||||
[Customize the look-and-feel of your App](https://backstage.io/docs/getting-started/app-custom-theme)
|
||||
to create an override with your preferred styling.
|
||||
|
||||
For example, the following will result in highlighted terms to be bold & underlined:
|
||||
|
||||
```jsx
|
||||
const highlightOverride = {
|
||||
BackstageHighlightedSearchResultText: {
|
||||
highlight: {
|
||||
color: 'inherit',
|
||||
backgroundColor: 'inherit',
|
||||
fontWeight: 'bold',
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
[obj-mode]: https://nodejs.org/docs/latest-v14.x/api/stream.html#stream_object_mode
|
||||
[read-stream]: https://nodejs.org/docs/latest-v14.x/api/stream.html#stream_readable_streams
|
||||
[async-gen]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#iterating_over_async_generators
|
||||
|
||||
@@ -82,13 +82,17 @@ With the Backstage 1.2 release, we plan to introduce the [TechDocs Addon Framewo
|
||||
|
||||
In addition to the framework itself, we'll be open sourcing a `<ReportIssue />` addon, helping you to create a feedback loop that drives up documentation quality and fosters a documentation culture at your organization.
|
||||
|
||||
### **Future work 🔮**
|
||||
### **Next**
|
||||
|
||||
Some of the following items are coming soon and some are potential ideas.
|
||||
- What can we do in TechDocs to drive up documentation quality?
|
||||
|
||||
### **Someday/Maybe**
|
||||
|
||||
- Contribute to and deploy from a marketplace of TechDocs Addons
|
||||
- Addon: MDX (allows you to use JSX in your Markdown content)
|
||||
- Can we go static site generator agnostic?
|
||||
- Better integration with
|
||||
[Scaffolder V2](https://github.com/backstage/backstage/issues/2771) (e.g. easy to choose and plug documentation template with Software Templates)
|
||||
- Static site generator agnostic, including possible support for MDX (allowing you to use JSX in your Markdown content)
|
||||
[Scaffolder V2](https://github.com/backstage/backstage/issues/2771) (e.g. easy to choose and apply documentation template with Software Templates)
|
||||
- Possible to configure several aspects about TechDocs (e.g. URL, homepage,
|
||||
theme)
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ representative of physical spaces in the TechDocs UI:
|
||||
line as the title.
|
||||
- `Subheader`: For Addons that sit below the header but above all content.
|
||||
This is a great location for tooling/configuration of TechDocs display.
|
||||
- `Settings`: These addons are items added to the settings menu list and are designed to make
|
||||
the reader experience customizable, for example accessibility options.
|
||||
- `PrimarySidebar`: Left of the content, above of the navigation.
|
||||
- `SecondarySidebar`: Right of the content, above the table of contents.
|
||||
- `Content`: A special location intended for Addons which augment the
|
||||
@@ -109,9 +111,11 @@ page header, TechDocs Addons whose location is `Header` will not be rendered.
|
||||
Addons can, in principle, be provided by any plugin! To make it easier to
|
||||
discover available Addons, we've compiled a list of them here:
|
||||
|
||||
| Addon | Package/Plugin | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`<ReportIssue />`](https://backstage.io/docs/reference/plugin-techdocs-module-addons-contrib.reportissue) | `@backstage/plugin-techdocs-module-addons-contrib` | Allows TechDocs users to select a portion of text on a TechDocs page and open an issue against the repository that contains the documentation, populating the issue description with the selected text according to a configurable template. |
|
||||
| Addon | Package/Plugin | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [`<ExpandableNavigation />`](https://backstage.io/docs/reference/plugin-techdocs-module-addons-contrib.expandablenavigation) | `@backstage/plugin-techdocs-module-addons-contrib` | Allows TechDocs users to expand or collapse the entire TechDocs main navigation, and keeps the user's preferred state between documentation sites. |
|
||||
| [`<ReportIssue />`](https://backstage.io/docs/reference/plugin-techdocs-module-addons-contrib.reportissue) | `@backstage/plugin-techdocs-module-addons-contrib` | Allows TechDocs users to select a portion of text on a TechDocs page and open an issue against the repository that contains the documentation, populating the issue description with the selected text according to a configurable template. |
|
||||
| [`<TextSize />`](https://backstage.io/docs/reference/plugin-techdocs-module-addons-contrib.textsize) | `@backstage/plugin-techdocs-module-addons-contrib` | This TechDocs addon allows users to customize text size on documentation pages, they can select how much they want to increase or decrease the font size via slider or buttons. The default value for font size is 100% and this setting is kept in the browser's local storage whenever it is changed. |
|
||||
|
||||
Got an Addon to contribute? Feel free to add a row above!
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ Generate TechDocs documentation site using MkDocs.
|
||||
Options:
|
||||
--source-dir <PATH> Source directory containing mkdocs.yml and docs/ directory. (default: ".")
|
||||
--output-dir <PATH> Output directory containing generated TechDocs site. (default: "./site/")
|
||||
--docker-image <DOCKER_IMAGE> The mkdocs docker container to use (default: "spotify/techdocs:v1.0.2")
|
||||
--docker-image <DOCKER_IMAGE> The mkdocs docker container to use (default: "spotify/techdocs:v1.0.3")
|
||||
--no-pull Do not pull the latest docker image
|
||||
--no-docker Do not use Docker, use MkDocs executable and plugins in current user environment.
|
||||
--techdocs-ref <HOST_TYPE:URL> The repository hosting documentation source files e.g.
|
||||
|
||||
@@ -54,8 +54,48 @@ const AppRoutes = () => {
|
||||
};
|
||||
```
|
||||
|
||||
That's it! But now, we need the TechDocs Backend plugin for the frontend to
|
||||
work.
|
||||
It would be nice to decorate your pages with something else... Having a link that redirects you to a new issue page when you highlight text in your documentation would be really cool, right? Let's learn how to do this using the TechDocs Addon Framework!
|
||||
|
||||
With the [TechDocs Addon framework](https://backstage.io/docs/features/techdocs/addons#installing-and-using-addons), you can render React components in documentation pages and these Addons can be provided by any Backstage plugin. The framework is exported by the [@backstage/plugin-techdocs-react](https://www.npmjs.com/package/@backstage/plugin-techdocs-react) package and there is a `<ReportIssue />` Addon in the [@backstage/plugin-techdocs-module-addons-contrib](https://www.npmjs.com/package/@backstage/plugin-techdocs-module-addons-contrib) package for you to use once you have these two dependencies installed:
|
||||
|
||||
```diff
|
||||
import {
|
||||
DefaultTechDocsHome,
|
||||
TechDocsIndexPage,
|
||||
TechDocsReaderPage,
|
||||
} from '@backstage/plugin-techdocs';
|
||||
+ import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
|
||||
+ import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
|
||||
|
||||
// ...
|
||||
|
||||
const AppRoutes = () => {
|
||||
<FlatRoutes>
|
||||
// ... other plugin routes
|
||||
<Route path="/docs" element={<TechDocsIndexPage />}>
|
||||
<DefaultTechDocsHome />
|
||||
</Route>
|
||||
<Route
|
||||
path="/docs/:namespace/:kind/:name/*"
|
||||
element={<TechDocsReaderPage />}
|
||||
>
|
||||
+ <TechDocsAddons>
|
||||
+ <ReportIssue />
|
||||
+ </TechDocsAddons>
|
||||
</Route>
|
||||
</FlatRoutes>;
|
||||
};
|
||||
```
|
||||
|
||||
I know, you're curious to see how it looks, aren't you? See the image below:
|
||||
|
||||
<img data-zoomable src="../../assets/techdocs/report-issue-addon.png" alt="TechDocs Report Issue Add-on" />
|
||||
|
||||
By clicking the open new issue button, you will be redirected to the new issue page according to the source code provider you are using:
|
||||
|
||||
<img data-zoomable src="../../assets/techdocs/report-issue-template.png" alt="TechDocs Report Issue Template" />
|
||||
|
||||
That's it! Now, we need the TechDocs Backend plugin for the frontend to work.
|
||||
|
||||
## Adding TechDocs Backend plugin
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Plugins should export a rule factory that provides type-safety that ensures comp
|
||||
|
||||
```typescript
|
||||
import type { Entity } from '@backstage/plugin-catalog-model';
|
||||
import { createCatalogPermissionRule } from '@backstage/plugin-catalog-backend';
|
||||
import { createCatalogPermissionRule } from '@backstage/plugin-catalog-backend/alpha';
|
||||
import { createConditionFactory } from '@backstage/plugin-permission-node';
|
||||
|
||||
export const isInSystemRule = createCatalogPermissionRule({
|
||||
|
||||
@@ -50,7 +50,7 @@ Let's change the policy to the following:
|
||||
+ import {
|
||||
+ catalogConditions,
|
||||
+ createCatalogConditionalDecision,
|
||||
+ } from '@backstage/plugin-catalog-backend';
|
||||
+ } from '@backstage/plugin-catalog-backend/alpha';
|
||||
+ import {
|
||||
+ catalogEntityDeletePermission,
|
||||
+ } from '@backstage/plugin-catalog-common';
|
||||
@@ -103,7 +103,7 @@ import {
|
||||
import {
|
||||
catalogConditions,
|
||||
createCatalogConditionalDecision,
|
||||
} from '@backstage/plugin-catalog-backend';
|
||||
} from '@backstage/plugin-catalog-backend/alpha';
|
||||
- import {
|
||||
- catalogEntityDeletePermission,
|
||||
- } from '@backstage/plugin-catalog-common';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
# Release v1.2.0-next.3
|
||||
|
||||
## @backstage/core-components@0.9.4-next.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 52c02ac02b: Don't set the background color on an Avatar component that has a picture.
|
||||
- 3603014e0e: Add ARIA landmark( <main>), & label and a heading to OAuthRequestDialog. Removed nested interactive control (button).
|
||||
- 2025d7c123: Properly highlight `SidebarSubmenuItem` dropdown items on hover, use ellipsis styling on long labels in `SidebarSubmenu`, allow `icon` and `to` properties to be optional on `SidebarSubmenuItem`, and fix `SidebarPage` padding to be responsive to pinned state
|
||||
|
||||
## @backstage/plugin-home@0.4.21-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 69093c5f91: Display entity titles in `StarredEntities` home page card (if defined) and don't show entities which no longer exist
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.4-next.2
|
||||
|
||||
## @backstage/plugin-kubernetes@0.6.5-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 447e060872: Add support for 'oidc' as authProvider for kubernetes authentication
|
||||
and adds optional 'oidcTokenProvider' config value. This will allow
|
||||
users to authenticate to kubernetes cluster using id tokens obtained
|
||||
from the configured auth provider in their backstage instance.
|
||||
- Updated dependencies
|
||||
- @backstage/plugin-kubernetes-common@0.2.10-next.1
|
||||
- @backstage/core-components@0.9.4-next.2
|
||||
|
||||
## @backstage/plugin-kubernetes-backend@0.5.1-next.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 447e060872: Add support for 'oidc' as authProvider for kubernetes authentication
|
||||
and adds optional 'oidcTokenProvider' config value. This will allow
|
||||
users to authenticate to kubernetes cluster using id tokens obtained
|
||||
from the configured auth provider in their backstage instance.
|
||||
- Updated dependencies
|
||||
- @backstage/plugin-kubernetes-common@0.2.10-next.1
|
||||
|
||||
## @backstage/plugin-kubernetes-common@0.2.10-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 447e060872: Add support for 'oidc' as authProvider for kubernetes authentication
|
||||
and adds optional 'oidcTokenProvider' config value. This will allow
|
||||
users to authenticate to kubernetes cluster using id tokens obtained
|
||||
from the configured auth provider in their backstage instance.
|
||||
|
||||
## @backstage/plugin-org@0.5.5-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 2025d7c123: Include namespace in `MyGroupSidebarItem` if not default and remove root item routing if there are multiple groups
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.4-next.2
|
||||
|
||||
## @backstage/plugin-scaffolder@1.2.0-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cc8ddd0979: revert dependency `event-source-polyfill` to `1.0.25`
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.4-next.2
|
||||
|
||||
## @backstage/plugin-techdocs@1.1.1-next.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cc8ddd0979: revert dependency `event-source-polyfill` to `1.0.25`
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.4-next.2
|
||||
Reference in New Issue
Block a user