Compare commits

..

3 Commits

Author SHA1 Message Date
Marco Nenciarini
8138e51ad5 fix: clarify what the dev docs install
On the dev docs, the Helm tab installs the latest release, but the
kubectl tab installs the main branch. Nothing on the page said
this, and Helm was the tab shown by default.

Add a note, and make both tabs link to each other, so a reader can
jump straight to the right one.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-09-03 17:09:44 +02:00
Marco Nenciarini
4961bec18d fix: pin the Helm chart's image tag to the plugin version
Before, each doc page hardcoded its own chart version. That is
fragile: the chart is published after the plugin, so we can't know
the right chart version yet when we write the docs.

Now we set the image tag straight to the plugin version instead.
The latest release skips this, since the chart already defaults to
itself there.

Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
2026-09-03 17:09:44 +02:00
Krypton
8aeec18e26 docs: add Helm chart installation
* Use built-in Docusaurus tabs for the Helm and kubectl install methods
* Rename the Helm release to plugin-barman-cloud, matching the chart's README and making the rollout verification command work
* Drop --create-namespace: the operator prerequisite guarantees the namespace exists
* Give each method its own verification step and example output

Co-authored-by: danishedb <danish.khan@enterprisedb.com>
Signed-off-by: Krypton <root@krypton.ninja>
Signed-off-by: danishedb <danish.khan@enterprisedb.com>
2026-09-03 17:09:38 +02:00
5 changed files with 47 additions and 26 deletions

View File

@ -59,10 +59,12 @@ import TabItem from '@theme/TabItem';
import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation'; import { InstallationSnippet, ManifestVersion } from '@site/src/components/Installation';
import { HelmInstallationSnippet } from '@site/src/components/HelmInstallation'; import { HelmInstallationSnippet } from '@site/src/components/HelmInstallation';
<Tabs groupId="install-method"> <Tabs groupId="install-method" queryString>
<TabItem value="helm" label="Helm Chart" default> <TabItem value="helm" label="Helm Chart" default>
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud): The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud).
This installs the latest published chart release; to test an unreleased
development snapshot instead, switch to the [**Manifest (kubectl)**](./?install-method=kubectl#installing-the-barman-cloud-plugin) tab.
<HelmInstallationSnippet /> <HelmInstallationSnippet />

View File

@ -1,21 +1,35 @@
import { ReactElement } from "react"; import {ReactElement} from 'react';
import CodeBlock from "@theme/CodeBlock"; import CodeBlock from '@theme/CodeBlock';
import {useActiveVersion, useLatestVersion} from '@docusaurus/plugin-content-docs/client';
type HelmInstallationProps = { // HelmInstallationSnippet is the Helm command to install the plugin.
chartVersion?: string; //
}; // - Latest release: no override. The chart already defaults to
// itself.
// HelmInstallationSnippet is the Helm incantation to install a specific // - Older release: pin image.tag and sidecarImage.tag to that
// or latest available version of the Barman Cloud Plugin. // version. We check this again on every build using
export function HelmInstallationSnippet({ // useLatestVersion, so an old page updates itself once a newer
chartVersion, // version ships.
}: HelmInstallationProps): ReactElement<null> { // - Dev docs: also no override, but this does NOT install a dev
const versionArg = chartVersion ? `\n --version ${chartVersion} \\` : ""; // build. Setting the tag alone would not be enough, since the
// chart's own templates (CRDs, RBAC...) can be older than what
// main needs. Use the kubectl method to test a dev build.
export function HelmInstallationSnippet(): ReactElement<null> {
const activeVersion = useActiveVersion('default');
const latestVersion = useLatestVersion('default');
const isOlderRelease = activeVersion
&& activeVersion.name !== 'current'
&& activeVersion.name !== latestVersion.name;
const setArgs = isOlderRelease
? ` \\
--set image.tag=v${activeVersion.name} \\
--set sidecarImage.tag=v${activeVersion.name}`
: '';
return ( return (
<CodeBlock language="sh"> <CodeBlock language="sh">
{`helm repo add cnpg https://cloudnative-pg.github.io/charts --force-update {`helm repo add cnpg https://cloudnative-pg.github.io/charts --force-update
helm upgrade --install plugin-barman-cloud \\ helm upgrade --install plugin-barman-cloud \\
--namespace cnpg-system \\${versionArg} --namespace cnpg-system${setArgs} \\
cnpg/plugin-barman-cloud`} cnpg/plugin-barman-cloud`}
</CodeBlock> </CodeBlock>
); );

View File

@ -1,5 +1,7 @@
import {ReactElement} from 'react'; import {ReactElement} from 'react';
import CodeBlock from '@theme/CodeBlock'; import CodeBlock from '@theme/CodeBlock';
import Link from '@docusaurus/Link';
import {useLocation} from '@docusaurus/router';
import {useActiveVersion} from '@docusaurus/plugin-content-docs/client'; import {useActiveVersion} from '@docusaurus/plugin-content-docs/client';
// DEV_MANIFEST_URL is the URL of the manifest.yaml on the main branch of the plugin repo. // DEV_MANIFEST_URL is the URL of the manifest.yaml on the main branch of the plugin repo.
@ -31,14 +33,17 @@ export function ManifestVersion(): ReactElement<null> {
: <>the latest development snapshot from the <code>main</code> branch</>; : <>the latest development snapshot from the <code>main</code> branch</>;
} }
// DevSnapshotSection offers the main-branch manifest as an alternative; // DevSnapshotSection shows how to test the main-branch manifest. On
// on the Dev docs the main install already is that manifest, so hide it. // the Dev docs, the kubectl install above already does that, so we
// hide this section there. (The Helm tab there installs the latest
// release, not a dev build.)
export function DevSnapshotSection(): ReactElement { export function DevSnapshotSection(): ReactElement {
const activeVersion = useActiveVersion('default'); const activeVersion = useActiveVersion('default');
const {pathname} = useLocation();
if (!activeVersion || activeVersion.name === 'current') { if (!activeVersion || activeVersion.name === 'current') {
return ( return (
<p>The <a href="#installing-the-barman-cloud-plugin">install <p>The <Link to={`${pathname}?install-method=kubectl#installing-the-barman-cloud-plugin`}>kubectl
command above</a> already applies the latest development install command above</Link> already applies the latest development
snapshot from the <code>main</code> branch.</p> snapshot from the <code>main</code> branch.</p>
); );
} }

View File

@ -64,7 +64,7 @@ import { HelmInstallationSnippet } from '@site/src/components/HelmInstallation';
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud): The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud):
<HelmInstallationSnippet chartVersion="0.7.0" /> <HelmInstallationSnippet />
Example output: Example output:

View File

@ -64,7 +64,7 @@ import { HelmInstallationSnippet } from '@site/src/components/HelmInstallation';
The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud): The plugin can be installed using the provided [Helm chart](https://github.com/cloudnative-pg/charts/tree/main/charts/plugin-barman-cloud):
<HelmInstallationSnippet chartVersion="0.7.1" /> <HelmInstallationSnippet />
Example output: Example output: