mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-09-04 22:22:21 +02:00
Compare commits
1 Commits
8138e51ad5
...
62b35326e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62b35326e4 |
@ -59,12 +59,10 @@ 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" queryString>
|
<Tabs groupId="install-method">
|
||||||
<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 />
|
||||||
|
|
||||||
|
|||||||
@ -1,36 +1,22 @@
|
|||||||
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';
|
|
||||||
|
|
||||||
// HelmInstallationSnippet is the Helm command to install the plugin.
|
type HelmInstallationProps = {
|
||||||
//
|
chartVersion?: string;
|
||||||
// - Latest release: no override. The chart already defaults to
|
};
|
||||||
// itself.
|
|
||||||
// - Older release: pin image.tag and sidecarImage.tag to that
|
// HelmInstallationSnippet is the Helm incantation to install a specific
|
||||||
// version. We check this again on every build using
|
// or latest available version of the Barman Cloud Plugin.
|
||||||
// useLatestVersion, so an old page updates itself once a newer
|
export function HelmInstallationSnippet({
|
||||||
// version ships.
|
chartVersion,
|
||||||
// - Dev docs: also no override, but this does NOT install a dev
|
}: HelmInstallationProps): ReactElement<null> {
|
||||||
// build. Setting the tag alone would not be enough, since the
|
const versionArg = chartVersion ? `\n --version ${chartVersion} \\` : "";
|
||||||
// chart's own templates (CRDs, RBAC...) can be older than what
|
return (
|
||||||
// main needs. Use the kubectl method to test a dev build.
|
<CodeBlock language="sh">
|
||||||
export function HelmInstallationSnippet(): ReactElement<null> {
|
{`helm repo add cnpg https://cloudnative-pg.github.io/charts --force-update
|
||||||
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 (
|
|
||||||
<CodeBlock language="sh">
|
|
||||||
{`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${setArgs} \\
|
--namespace cnpg-system \\${versionArg}
|
||||||
cnpg/plugin-barman-cloud`}
|
cnpg/plugin-barman-cloud`}
|
||||||
</CodeBlock>
|
</CodeBlock>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
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.
|
||||||
@ -33,17 +31,14 @@ 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 shows how to test the main-branch manifest. On
|
// DevSnapshotSection offers the main-branch manifest as an alternative;
|
||||||
// the Dev docs, the kubectl install above already does that, so we
|
// on the Dev docs the main install already is that manifest, so hide it.
|
||||||
// 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 <Link to={`${pathname}?install-method=kubectl#installing-the-barman-cloud-plugin`}>kubectl
|
<p>The <a href="#installing-the-barman-cloud-plugin">install
|
||||||
install command above</Link> already applies the latest development
|
command above</a> already applies the latest development
|
||||||
snapshot from the <code>main</code> branch.</p>
|
snapshot from the <code>main</code> branch.</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 />
|
<HelmInstallationSnippet chartVersion="0.7.0" />
|
||||||
|
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
|
|||||||
@ -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 />
|
<HelmInstallationSnippet chartVersion="0.7.1" />
|
||||||
|
|
||||||
Example output:
|
Example output:
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user