diff --git a/web/packages/teleport/src/Discover/Shared/Overview/Overview.tsx b/web/packages/teleport/src/Discover/Shared/Overview/Overview.tsx
index 001b2dd516fc1..bf6ed3ba1a69b 100644
--- a/web/packages/teleport/src/Discover/Shared/Overview/Overview.tsx
+++ b/web/packages/teleport/src/Discover/Shared/Overview/Overview.tsx
@@ -16,47 +16,30 @@
* along with this program. If not, see .
*/
-import {
- ActionButtons,
- Header,
- HeaderSubtitle,
-} from 'teleport/Discover/Shared';
+import { Subtitle1 } from 'design';
+
+import { ActionButtons, Header } from 'teleport/Discover/Shared';
+import { Overview as IOverview } from 'teleport/Discover/Shared/Overview/types';
import { useDiscover } from 'teleport/Discover/useDiscover';
+import { content } from './content';
+
export function Overview() {
- const { prevStep, nextStep, isUpdateFlow } = useDiscover();
+ const { prevStep, nextStep, resourceSpec, isUpdateFlow } = useDiscover();
+
+ if (!(resourceSpec.id in content)) {
+ //todo handle error
+ }
- const pageItems = {
- kubernetes: {
- overview: [
- `This guide uses Helm to install the Teleport agent into a cluster,
- and by default turns on auto-discovery of all apps in the cluster.`,
- ],
- prerequisites: [
- 'Egress from your Kubernetes cluster to Teleport.',
- 'Helm installed on your local machine.',
- 'Kubernetes API access to install the Helm chart.',
- ],
- },
- };
+ let overview: IOverview = content[resourceSpec.id];
return (
<>
-
- {pageItems.kubernetes.overview.map((item, index) => (
- - {item}
- ))}
-
+ {overview.OverviewContent()}
-
- Make sure you have these ready before continuing.
-
-
- {pageItems.kubernetes.prerequisites.map((item, index) => (
- - {item}
- ))}
-
+ Make sure you have these ready before continuing.
+ {overview.PrerequisiteContent()}
(
+
+ -
+ This guide uses Helm to install the Teleport agent into a cluster, and
+ by default turns on auto-discovery of all apps in the cluster.
+
+
+ ),
+ PrerequisiteContent: () => (
+
+ - Egress from your Kubernetes cluster to Teleport.
+ - Helm installed on your local machine.
+ - Kubernetes API access to install the Helm chart.
+
+ ),
+ },
+};
diff --git a/web/packages/teleport/src/Discover/Shared/Overview/types.ts b/web/packages/teleport/src/Discover/Shared/Overview/types.ts
new file mode 100644
index 0000000000000..320ef43072edc
--- /dev/null
+++ b/web/packages/teleport/src/Discover/Shared/Overview/types.ts
@@ -0,0 +1,11 @@
+import { ReactElement } from 'react';
+
+export interface Prerequisite {
+ content: string;
+ details?: string[];
+}
+
+export interface Overview {
+ OverviewContent: () => ReactElement;
+ PrerequisiteContent: () => ReactElement;
+}