plugin-barman-cloud/web/src/components/Installation/index.tsx
Armando Ruocco 0c13be5908 refactor: review
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
2025-05-15 12:54:18 +02:00

17 lines
596 B
TypeScript

import {ReactElement} from 'react';
import CodeBlock from '@theme/CodeBlock';
import {useCurrentVersion} from '@site/src/hooks/versions';
// InstallationSnippet is the kubectl incantation to install the lastest
// available version of the Barman Cloud Plugin.
export function InstallationSnippet(): ReactElement<null> {
const latest = useCurrentVersion('latestReleased');
return (
<CodeBlock language="sh">
{`kubectl apply -f \\
https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v${latest}/manifest.yaml`}
</CodeBlock>
);
}