diff --git a/.changeset/five-lies-smile.md b/.changeset/five-lies-smile.md
new file mode 100644
index 0000000000..a35a2ca528
--- /dev/null
+++ b/.changeset/five-lies-smile.md
@@ -0,0 +1,8 @@
+---
+'@backstage/plugin-circleci': patch
+'@backstage/plugin-jenkins': patch
+---
+
+Refactor to support ADR004 module exporting.
+
+For more information, see https://backstage.io/docs/architecture-decisions/adrs-adr004.
diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt
index c31e19e35c..7f889392ac 100644
--- a/.github/styles/vocab.txt
+++ b/.github/styles/vocab.txt
@@ -131,6 +131,7 @@ npm
nvm
oauth
Oauth
+oidc
Okta
Oldsberg
onboarding
@@ -229,3 +230,4 @@ yaml
Zalando
Zhou
Zolotusky
+zoomable
diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml
index a557b4921b..4bd03b4d96 100644
--- a/.github/workflows/changeset.yml
+++ b/.github/workflows/changeset.yml
@@ -19,4 +19,4 @@ jobs:
# Calls out to `changeset version`, but also runs prettier
version: yarn release
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
diff --git a/.yarnrc b/.yarnrc
index 6b56b971d7..4cdaac2408 100644
--- a/.yarnrc
+++ b/.yarnrc
@@ -6,4 +6,4 @@ registry "https://registry.npmjs.org/"
disable-self-update-check true
lastUpdateCheck 1580389148099
yarn-path ".yarn/releases/yarn-1.22.1.js"
-network-timeout 600000
+network-timeout 300000
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
index 65841d1c6a..0ab8d8390d 100644
--- a/GOVERNANCE.md
+++ b/GOVERNANCE.md
@@ -1,6 +1,6 @@
# Process for becoming a maintainer
-## Your organization is not yet a maintainer
+## a) Your organization is not yet a maintainer
- Express interest to the sponsors that your organization is interested in becoming a maintainer. Becoming a maintainer generally means that you are going to be spending substantial time on Backstage for the foreseeable future. You should have domain expertise and be extremely proficient in TypeScript.
- We will expect you to start contributing increasingly complicated PRs, under the guidance of the existing maintainers.
@@ -8,7 +8,7 @@
- As you gain experience with the code base and our standards, we will ask you to do code reviews for incoming PRs.
- After a period of approximately 2-3 months of working together and making sure we see eye to eye, the existing sponsors and maintainers will confer and decide whether to grant maintainer status or not. We make no guarantees on the length of time this will take, but 2-3 months is the approximate goal.
-## Your organization is currently a maintainer
+## b) Your organization is currently a maintainer
To become a maintainer you need to demonstrate the following:
diff --git a/app-config.yaml b/app-config.yaml
index e80b5df021..aa9a2829ca 100644
--- a/app-config.yaml
+++ b/app-config.yaml
@@ -38,7 +38,7 @@ proxy:
headers:
Authorization:
$env: TRAVISCI_AUTH_TOKEN
- travis-api-version: 3
+ travis-api-version: '3'
'/newrelic/apm/api':
target: https://api.newrelic.com/v2
@@ -72,8 +72,8 @@ sentry:
rollbar:
organization: my-company
- accountToken:
- $env: ROLLBAR_ACCOUNT_TOKEN
+ # NOTE: The rollbar-backend & accountToken key may be deprecated in the future (replaced by a proxy config)
+ accountToken: my-rollbar-account-token
lighthouse:
baseUrl: http://localhost:3003
@@ -296,6 +296,9 @@ costInsights:
bigQuery:
name: BigQuery
icon: search
+ events:
+ name: Events
+ icon: data
metrics:
DAU:
name: Daily Active Users
diff --git a/docs/auth/auth-backend-classes.md b/docs/auth/auth-backend-classes.md
index 442553d4b8..8dbae0daa7 100644
--- a/docs/auth/auth-backend-classes.md
+++ b/docs/auth/auth-backend-classes.md
@@ -6,57 +6,71 @@ description: Documentation on Auth backend classes
## How Does Authentication Work?
-The Backstage application can use various authentication providers for
-authentication. A provider has to implement an `AuthProviderRouteHandlers`
-interface for handling authentication. This interface consists of four methods.
-Each of these methods is hosted at an endpoint `/auth/[provider]/method`, where
-`method` performs a certain operation as follows:
+The Backstage application can use various external authentication providers for
+authentication. An external provider is wrapped using an
+`AuthProviderRouteHandlers` interface for handling authentication. This
+interface consists of four methods. Each of these methods is hosted at an
+endpoint (by default) `/api/auth/[provider]/method`, where `method` performs a
+certain operation as follows:
```
- /auth/[provider]/start -> start
- /auth/[provider]/handler/frame -> frameHandler
- /auth/[provider]/refresh -> refresh
- /auth/[provider]/logout -> logout
+ /auth/[provider]/start -> Initiate a login from the web page
+ /auth/[provider]/handler/frame -> Handle a finished authentication operation
+ /auth/[provider]/refresh -> Refresh the validity of a login
+ /auth/[provider]/logout -> Log out a logged-in user
```
-For more information on how these methods are used and for which purpose, refer
-to the [OAuth documentation](oauth.md).
+The flow is as follows:
-For details on the parameters, input and output conditions for each method,
-refer to the type documentation under
-`plugins/auth-backend/src/providers/types.ts`.
+1. A user attempts to sign in.
+2. A popup window is opened, pointing to the `auth` endpoint. That endpoint does
+ initial preparations and then re-directs the user to an external
+ authenticator, still inside the popup.
+3. The authenticator validates the user and returns the result of the validation
+ (success OR failure), to the wrapper's endpoint (`handler/frame`).
+4. The `handler/frame` rendered b´webpage will issue the appropriate response to
+ the webpage that opened the popup window, and the popup is closed.
+5. The user signs out by clicking on a UI interface and the webpage makes a
+ request to logout the user.
There are currently two different classes for two authentication mechanisms that
implement this interface: an `OAuthAdapter` for [OAuth](https://oauth.net/2/)
based mechanisms and a `SAMLAuthProvider` for
-[SAML](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html)
-based mechanisms.
+[SAML](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).
-### OAuth mechanisms
+If you do not have an `OAuth2` or `SAML` based authentication provider, look in
+the section [below](#implementing-your-own-auth-wrapper).
+
+### OAuth Mechanisms
+
+For more information on how these methods are used and for which purpose, refer
+to the [OAuth documentation](oauth.md).
Currently OAuth is assumed to be the de facto authentication mechanism for
Backstage based applications.
Backstage comes with a "batteries-included" set of supported commonly used OAuth
-providers: Okta, GitHub, Google, GitLab, and a generic OAuth2 provider.
+providers: Okta, GitHub, Google, GitLab, and a generic OAuth2 provider. For a
+list of available providers, look at the available wrappers in
+`backstage/plugins/auth-backend/src/providers/`.
-All of these use the authorization flow of OAuth2 to implement authentication.
+All of these use the **authorization flow** of OAuth2 to implement
+authentication.
-If your authentication provider is any of the above mentioned (except generic
-OAuth2) providers, you can configure them by setting the right variables in
-`app-config.yaml` under the `auth` section.
+If your authentication provider is any of the above mentioned providers, you can
+configure them by setting the right variables in `app-config.yaml` under the
+`auth` section.
### Configuration
Each authentication provider (except SAML) needs five parameters: an OAuth
-client ID, a client secret, an authorization endpoint and a token endpoint, and
-an app origin. The app origin is the URL at which the frontend of the
-application is hosted, and it is read from the `app.baseUrl` config. This is
-required because the application opens a popup window to perform the
-authentication, and once the flow is completed, the popup window sends a
-`postMessage` to the frontend application to indicate the result of the
-operation. Also this URL is used to verify that authentication requests are
-coming from only this endpoint.
+client ID, a client secret, an authorization endpoint, a token endpoint, and an
+app origin. The app origin is the URL at which the frontend of the application
+is hosted, and it is read from the `app.baseUrl` config. This is required
+because the application opens a popup window to perform the authentication, and
+once the flow is completed, the popup window sends a `postMessage` to the
+frontend application to indicate the result of the operation. Also this URL is
+used to verify that authentication requests are coming from only this endpoint.
These values are configured via the `app-config.yaml` present in the root of
your app folder.
@@ -85,20 +99,60 @@ auth:
...
```
-## Technical Notes
+## Implementing Your Own Auth Wrapper
-### OAuthEnvironmentHandler
+The core interface of any auth wrapper is the `AuthProviderRouteHandlers`
+interface. This interface has four methods corresponding to the API described in
+the initial section. Any auth wrapper will have to implement this interface.
-The concept of an "env" is core to the way the auth backend works. It uses an
+When initiating a login, a pop-up window is created by the frontend, to allow
+the user to initiate a login. This login request is done to the `/start`
+endpoint which is handled by the `start` method.
+
+The `start` method re-directs to the external auth provider who authenticates
+the request and re-directs the request to the `/frame/handler` endpoint, which
+is handled by the `frameHandler` method.
+
+The `frameHandler` returns an HTML response, containing a script that does a
+`postMessage` to the frontend's window, containing the result of the request.
+The `WebMessageResponse` type is the message sent by the `postMessage` to the
+frontend.
+
+A `postMessageResponse` utility function wraps the logic of generating a
+`postMessage` response that ensures that CORS is successfully handled. This
+function takes an `express.Response`, a `WebMessageResponse` and the URL of the
+frontend (`appOrigin`) as parameters and return an HTML page with the script and
+the message.
+
+### OAuth Wrapping Interfaces.
+
+Each OAuth external provider is supported by a corresponding
+[Passport](https://github.com/jaredhanson/passport) strategy. For a generic
+OAuth2 provider, passport has a `passport-oauth2` strategy. The strategy class
+handles the implementation details of working with each provider.
+
+Each strategy is wrapped by an `OAuthHandlers` interface.
+
+This interface cannot be directly used as an Express HTTP request handler. To do
+so, `OAuthHandlers` are wrapped in an `OAuthAdapter`, which implements the
+`AuthProviderRouterHandlers` interface.
+
+#### Env
+
+The concept of an `env` is core to the way the auth backend works. It uses an
`env` query parameter to identify the environment in which the application is
-running (`development`, `staging`, `production`, etc). Each runtime can support
-multiple environments at the same time and the right handler for each request is
-identified and dispatched to based on the `env` parameter. All
-`AuthProviderRouteHandlers` are wrapped within an `OAuthEnvironmentHandler`.
+running (`development`, `staging`, `production`, etc). Each runtime can
+simultaneously support multiple environments at the same time and the right
+handler for each request is identified and dispatched to, based on the `env`
+parameter.
-To instantiate multiple OAuth providers for different environments, use
+`OAuthEnvironmentHandler` is a utility wrapper for an `OAuthHandlers` that
+implements the `AuthProviderRouteHandlers` interface while supporting multiple
+`env`s.
+
+To instantiate OAuth providers (the same but for different environments), use
`OAuthEnvironmentHandler.mapConfig`. It's a helper to iterate over a
-configuration object that is a map of environment to configurations. See one of
+configuration object that is a map of environments to configurations. See one of
the existing OAuth providers for an example of how it is used.
Given the following configuration:
@@ -113,13 +167,18 @@ production:
```
The `OAuthEnvironmentHandler.mapConfig(config, envConfig => ...)` call will
-split the `config` by the top level `development` and `production` keys, and
-pass on each block as `envConfig`.
+split the config by the top level `development` and `production` keys, and pass
+on each block as `envConfig`.
-For a list of currently available providers, look in the `factories` module
-located in `plugins/auth-backend/src/providers/factories.ts`
+For convenience, the `AuthProviderFactory` is a factory function that has to be
+implemented which can then generate a `AuthProviderRouteHandlers` for a given
+provider.
-### OAuth2 provider
+All of the supported providers provide an `AuthProviderFactory` that returns an
+`OAuthEnvironmentHandler`, capable of handling authentication for multiple
+environments.
+
+### OAuth2 Provider
The `oauth2` provider abstracts a generic **OAuth2 + OIDC** based authentication
provider. What this means is that after the application has been given
diff --git a/docs/auth/index.md b/docs/auth/index.md
index 3f95efaf61..cf468c7bb7 100644
--- a/docs/auth/index.md
+++ b/docs/auth/index.md
@@ -93,6 +93,6 @@ sign-in methods.
More details are provided in dedicated sections of the documentation.
- [OAuth](./oauth.md): Description of the generic OAuth flow implemented by the
- [auth-backend](../../plugins/auth-backend).
+ [auth-backend](https://github.com/backstage/backstage/tree/master/plugins/auth-backend).
- [Glossary](./glossary.md): Glossary of some common terms related to the auth
flows.
diff --git a/docs/features/software-catalog/descriptor-format.md b/docs/features/software-catalog/descriptor-format.md
index f1d426f407..19c5c74f68 100644
--- a/docs/features/software-catalog/descriptor-format.md
+++ b/docs/features/software-catalog/descriptor-format.md
@@ -31,6 +31,7 @@ we recommend that you name them `catalog-info.yaml`.
- [Kind: Resource](#kind-resource)
- [Kind: System](#kind-system)
- [Kind: Domain](#kind-domain)
+- [Kind: Location](#kind-location)
## Overall Shape Of An Entity
@@ -381,7 +382,7 @@ spec:
type: website
lifecycle: production
owner: artist-relations@example.com
- implementsApis:
+ providesApis:
- artist-api
```
@@ -445,12 +446,35 @@ group of people in an organizational structure.
### `spec.implementsApis` [optional]
+**NOTE**: This field was marked for deprecation on Nov 25nd, 2020. It will be
+removed entirely from the model on Dec 14th, 2020 in the repository and will not
+be present in released packages following the next release after that. Please
+update your code to not consume this field before the removal date.
+
Links APIs that are implemented by the component, e.g. `artist-api`. This field
is optional.
The software catalog expects a list of one or more strings that references the
names of other entities of the `kind` `API`.
+This field has the same behavior as `spec.providesApis`.
+
+### `spec.providesApis` [optional]
+
+Links APIs that are provided by the component, e.g. `artist-api`. This field is
+optional.
+
+The software catalog expects a list of one or more strings that references the
+names of other entities of the `kind` `API`.
+
+### `spec.consumesApis` [optional]
+
+Links APIs that are consumed by the component, e.g. `artist-api`. This field is
+optional.
+
+The software catalog expects a list of one or more strings that references the
+names of other entities of the `kind` `API`.
+
## Kind: Template
Describes the following entity kind:
@@ -861,3 +885,58 @@ This kind is not yet defined, but is reserved [for future use](system-model.md).
## Kind: Domain
This kind is not yet defined, but is reserved [for future use](system-model.md).
+
+## Kind: Location
+
+Describes the following entity kind:
+
+| Field | Value |
+| ------------ | ----------------------- |
+| `apiVersion` | `backstage.io/v1alpha1` |
+| `kind` | `Location` |
+
+A location is a marker that references other places to look for catalog data.
+
+Descriptor files for this kind may look as follows.
+
+```yaml
+apiVersion: backstage.io/v1alpha1
+kind: Location
+metadata:
+ name: org-data
+spec:
+ type: url
+ targets:
+ - http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml
+ - http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml
+```
+
+In addition to the [common envelope metadata](#common-to-all-kinds-the-metadata)
+shape, this kind has the following structure.
+
+### `apiVersion` and `kind` [required]
+
+Exactly equal to `backstage.io/v1alpha1` and `Location`, respectively.
+
+### `spec.type` [optional]
+
+The single location type, that's common to the targets specified in the spec. If
+it is left out, it is inherited from the location type that originally read the
+entity data. For example, if you have a `url` type location, that when read
+results in a `Location` kind entity with no `spec.type`, then the referenced
+targets in the entity will implicitly also be of `url` type. This is useful
+because you can define a hierarchy of things in a directory structure using
+relative target paths (see below), and it will work out no matter if it's
+consumed locally on disk from a `file` location, or as uploaded on a VCS.
+
+### `spec.target` [optional]
+
+A single target as a string. Can be either an absolute path/URL (depending on
+the type), or a relative path such as `./details/catalog-info.yaml` which is
+resolved relative to the location of this Location entity itself.
+
+### `spec.targets` [optional]
+
+A list of targets as strings. They can all be either absolute paths/URLs
+(depending on the type), or relative paths such as `./details/catalog-info.yaml`
+which are resolved relative to the location of this Location entity itself.
diff --git a/docs/features/software-catalog/references.md b/docs/features/software-catalog/references.md
index e438ddc977..d347035950 100644
--- a/docs/features/software-catalog/references.md
+++ b/docs/features/software-catalog/references.md
@@ -51,7 +51,7 @@ spec:
type: service
lifecycle: experimental
owner: group:pet-managers
- implementsApis:
+ providesApis:
- petstore
- internal/streetlights
- hello-world
@@ -66,7 +66,7 @@ catalog that is of kind `Group`, namespace `default` (which, actually, also can
be left out in its own yaml file because that's the default value there too),
and name `pet-managers`.
-The entries in `implementsApis` are also references. In this case, none of them
+The entries in `providesApis` are also references. In this case, none of them
needs to specify a kind since we know from the context that that's the only kind
that's supported here. The second entry specifies a namespace but the other ones
don't, and in this context, the default is to refer to the same namespace as the
diff --git a/docs/features/software-catalog/well-known-relations.md b/docs/features/software-catalog/well-known-relations.md
index 07a4fc0a5c..54f7833d1b 100644
--- a/docs/features/software-catalog/well-known-relations.md
+++ b/docs/features/software-catalog/well-known-relations.md
@@ -45,17 +45,28 @@ entity, but there will always be one ultimate owner.
This relation is commonly generated based on `spec.owner` of the owned entity,
where present.
-### `consumesApi` and `providesApi`
+### `providesApi` and `apiProvidedBy`
A relation with an [API](descriptor-format.md#kind-api) entity, typically from a
[Component](descriptor-format.md#kind-component) or
[System](descriptor-format.md#kind-system).
-These relations express that a component or system either exposes an API -
-meaning that it hosts callable endpoints from which you can consume that API -
-or that they are dependent on being able to consume that API.
+These relations express that a component or system exposes an API - meaning that
+it hosts callable endpoints from which you can consume that API.
-This relation is commonly generated based on `spec.implementsApis` of the
+This relation is commonly generated based on `spec.providesApis` of the
+component or system in question.
+
+### `consumesApi` and `apiConsumedBy`
+
+A relation with an [API](descriptor-format.md#kind-api) entity, typically from a
+[Component](descriptor-format.md#kind-component) or
+[System](descriptor-format.md#kind-system).
+
+These relations express that a component or system consumes an API - meaning
+that it depends on endpoints of the API.
+
+This relation is commonly generated based on `spec.consumesApis` of the
component or system in question.
### `dependsOn` and `dependencyOf`
diff --git a/docs/features/techdocs/architecture.md b/docs/features/techdocs/architecture.md
index 01497b31bc..f502b3836e 100644
--- a/docs/features/techdocs/architecture.md
+++ b/docs/features/techdocs/architecture.md
@@ -9,7 +9,7 @@ description: Documentation on TechDocs Architecture
When you deploy Backstage (with TechDocs enabled by default), you get a basic
out-of-the box experience.
-
+
> Note: See below for our recommended deployment architecture which takes care
> of stability, scalability and speed.
@@ -43,7 +43,7 @@ channel to talk about it.
This is how we recommend deploying TechDocs in production environment.
-
+
The key difference in the recommended deployment approach is where the docs are
built.
diff --git a/docs/getting-started/configure-app-with-plugins.md b/docs/getting-started/configure-app-with-plugins.md
index 1d02f147c1..042d8964ca 100644
--- a/docs/getting-started/configure-app-with-plugins.md
+++ b/docs/getting-started/configure-app-with-plugins.md
@@ -6,7 +6,53 @@ description: Documentation on How Configuring App with plugins
## Adding existing plugins to your app
-Coming soon!
+The following steps assume that you have created a new Backstage app and want to
+add an existing plugin to it. We are using the
+[CircleCI](https://github.com/backstage/backstage/blob/master/plugins/circleci/README.md)
+plugin in this example.
+
+1. Add the plugin's NPM package to the repo:
+
+```bash
+yarn add @backstage/plugin-circleci
+```
+
+2. Add the plugin itself:
+
+```js
+// packages/app/src/plugins.ts
+export { plugin as Circleci } from '@backstage/plugin-circleci';
+```
+
+3. Register the plugin router:
+
+```jsx
+// packages/app/src/components/catalog/EntityPage.tsx
+
+import { Router as CircleCIRouter } from '@backstage/plugin-circleci';
+
+// Then somewhere inside
+}
+/>;
+```
+
+Note that stand-alone plugins that are not "attached" to the Software Catalog
+would be added outside the `EntityPage`.
+
+4. [Optional] Add proxy config:
+
+```yaml
+// app-config.yaml
+proxy:
+ '/circleci/api':
+ target: https://circleci.com/api/v1.1
+ headers:
+ Circle-Token:
+ $env: CIRCLECI_AUTH_TOKEN
+```
### Adding a plugin page to the Sidebar
diff --git a/docs/overview/stability-index.md b/docs/overview/stability-index.md
index 416cdcdd4a..567e9dcbff 100644
--- a/docs/overview/stability-index.md
+++ b/docs/overview/stability-index.md
@@ -79,11 +79,11 @@ want to ensure some stability.
### [`cli`](https://github.com/backstage/backstage/tree/master/packages/cli/)
-The main toolchain used for Backstage development. The interface that is
-considered for stability are the various commands and options passed to those
-commands, as well as the environment variables read by the CLI. The build output
-may change over time and is not considered a breaking change unless it is likely
-to affect external tooling.
+The main toolchain used for Backstage development. The various CLI commands and
+options passed to those commands, as well as the environment variables read by
+the CLI, are considered to be the interface that the stability index refers to.
+The build output may change over time and is not considered a breaking change
+unless it is likely to affect external tooling.
Stability: `2`
diff --git a/docs/plugins/proxying.md b/docs/plugins/proxying.md
index f55b4d9229..f2d7d3c12a 100644
--- a/docs/plugins/proxying.md
+++ b/docs/plugins/proxying.md
@@ -52,19 +52,7 @@ configuration will lead to the proxy acting on backend requests to
The value inside each route is either a simple URL string, or an object on the
format accepted by
-[http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware). It
-is also possible to limit the forwarded HTTP methods with the configuration
-`allowedMethods`, for example `allowedMethods: ['GET']` to enforce read-only
-access.
-
-By default, the proxy will only forward safe HTTP request headers to the target.
-Those are based on the headers that are considered safe for CORS and includes
-headers like `content-type` or `last-modified`, as well as all headers that are
-set by the proxy. If the proxy should forward other headers like
-`authorization`, this must be enabled by the `allowedHeaders` config, for
-example `allowedHeaders: ['Authorization']`. This should help to not
-accidentally forward confidential headers (`cookie`, `X-Auth-Request-User`) to
-third-parties.
+[http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware).
If the value is a string, it is assumed to correspond to:
@@ -85,3 +73,22 @@ except with the following caveats for convenience:
`'^/api/proxy/larger-example/v1/': '/'` is added. That means that a request to
`/api/proxy/larger-example/v1/some/path` will be translated to a request to
`http://larger.example.com:8080/svc.v1/some/path`.
+
+There are also additional settings:
+
+- `allowedMethods`: Limit the forwarded HTTP methods. For example
+ `allowedMethods: ['GET']` enforces read-only access.
+- `allowedHeaders`: A list of headers that should be forwarded to and received
+ from the target.
+
+By default, the proxy will only forward safe HTTP request headers to the target.
+Those are based on the headers that are considered safe for CORS and includes
+headers like `content-type` or `last-modified`, as well as all headers that are
+set by the proxy. If the proxy should forward other headers like
+`authorization`, this must be enabled by the `allowedHeaders` config, for
+example `allowedHeaders: ['Authorization']`. This should help to not
+accidentally forward confidential headers (`cookie`, `X-Auth-Request-User`) to
+third-parties.
+
+The same logic applies to headers that are sent from the target back to the
+frontend.
diff --git a/docs/reference/createPlugin.md b/docs/reference/createPlugin.md
index 45e3303124..4a58a5ecdc 100644
--- a/docs/reference/createPlugin.md
+++ b/docs/reference/createPlugin.md
@@ -4,7 +4,7 @@ title: createPlugin
description: Documentation on createPlugin
---
-Taking a plugin config as argument and returns a new plugin.
+Takes a plugin config as an argument and returns a new plugin.
## Plugin Config
@@ -28,18 +28,22 @@ type PluginHooks = {
### Creating a basic plugin
-Showcasing adding multiple routes, a feature flag and a redirect.
+Showcasing adding a route and a feature flag.
```jsx
-import { createPlugin } from '@backstage/core';
+import { createPlugin, createRouteRef } from '@backstage/core';
import ExampleComponent from './components/ExampleComponent';
+export const rootRouteRef = createRouteRef({
+ path: '/new-plugin',
+ title: 'New Plugin',
+});
+
export default createPlugin({
id: 'new-plugin',
register({ router, featureFlags }) {
+ router.addRoute(rootRouteRef, ExampleComponent);
featureFlags.register('enable-example-component');
-
- router.registerRoute('/new-plugin', ExampleComponent);
},
});
```
diff --git a/microsite/README.md b/microsite/README.md
index d244caa22a..9589def3e3 100644
--- a/microsite/README.md
+++ b/microsite/README.md
@@ -204,3 +204,8 @@ For more information about custom pages, click [here](https://docusaurus.io/docs
# Full Documentation
Full documentation can be found on the [website](https://docusaurus.io/).
+
+## Additional notes
+
+- If you want to make images zoomable on click, add the `data-zoomable` attribute to your `img` element.
+ - In a docs or blog `.md` file, convert `` syntax to `
`
diff --git a/microsite/data/plugins/kubernetes.yaml b/microsite/data/plugins/kubernetes.yaml
new file mode 100644
index 0000000000..3134edf858
--- /dev/null
+++ b/microsite/data/plugins/kubernetes.yaml
@@ -0,0 +1,12 @@
+---
+title: Kubernetes
+author: Spotify
+authorUrl: https://github.com/spotify
+category: Kubernetes
+description: Surfaces components in a Kubernetes container orchestration environment into the Backstage catalog.
+documentation: https://github.com/backstage/backstage/tree/master/plugins/kubernetes
+iconUrl: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.png
+npmPackageName: '@backstage/plugin-kubernetes'
+tags:
+ - kubernetes
+ - k8s
diff --git a/microsite/package.json b/microsite/package.json
index 3b5ab2eeb4..6be0579475 100644
--- a/microsite/package.json
+++ b/microsite/package.json
@@ -17,7 +17,7 @@
"@spotify/prettier-config": "^9.0.0",
"docusaurus": "^2.0.0-alpha.66",
"js-yaml": "^3.14.0",
- "prettier": "^2.2.0"
+ "prettier": "^2.2.1"
},
"prettier": "@spotify/prettier-config"
}
diff --git a/microsite/siteConfig.js b/microsite/siteConfig.js
index 6e8f8edddf..517cac2496 100644
--- a/microsite/siteConfig.js
+++ b/microsite/siteConfig.js
@@ -86,7 +86,11 @@ const siteConfig = {
},
// Add custom scripts here that would be placed in