mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
chore: review
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
parent
2fc15432ce
commit
10b9592fb8
@ -4,22 +4,6 @@ sidebar_position: 20
|
||||
|
||||
# Installation
|
||||
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
|
||||
import { react } from 'react';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import { useCurrentVersion } from '@site/src/hooks/versions';
|
||||
|
||||
export function InstallationSnippet() {
|
||||
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>
|
||||
);
|
||||
}
|
||||
|
||||
:::important
|
||||
1. The plugin **must** be installed in the same namespace as the CloudNativePG
|
||||
operator (typically `cnpg-system`).
|
||||
@ -70,6 +54,8 @@ Both checks are required before proceeding with the installation.
|
||||
|
||||
## Installing the Barman Cloud Plugin
|
||||
|
||||
import { InstallationSnippet } from '@site/src/components/Installation';
|
||||
|
||||
Install the plugin using `kubectl` by applying the manifest for the latest
|
||||
release:
|
||||
|
||||
|
||||
16
web/src/components/Installation/index.tsx
Normal file
16
web/src/components/Installation/index.tsx
Normal file
@ -0,0 +1,16 @@
|
||||
import { react } 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() {
|
||||
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>
|
||||
);
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ export function useLatestReleasedVersion() {
|
||||
const versioned = versions.filter(v => v.name !== 'current');
|
||||
|
||||
// Assuming the latest is the first in the list after sorting by semantic version
|
||||
// in descending order
|
||||
const latestVersion = versioned.length > 0
|
||||
? versioned.sort((a, b) => (b.name.localeCompare(a.name, undefined, {numeric: true, sensitivity: 'base'})))[0]
|
||||
: null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user