From ebcc86daa71b22b7ffc1fda62f3497dba9f1128b Mon Sep 17 00:00:00 2001 From: George Jenkins Date: Thu, 18 Jan 2024 20:55:48 -0800 Subject: [PATCH] tidy Signed-off-by: George Jenkins --- content/en/docs/sdk/examples.md | 33 ++++++++++++++++++++++----------- content/en/docs/sdk/gosdk.md | 28 +++++++++++++++++++--------- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/content/en/docs/sdk/examples.md b/content/en/docs/sdk/examples.md index f8312356f..94c05e905 100644 --- a/content/en/docs/sdk/examples.md +++ b/content/en/docs/sdk/examples.md @@ -1,38 +1,49 @@ --- title: "Examples" -description: "Explains various advanced features for Helm power users" -aliases: ["/docs/advanced_helm_techniques"] +description: "Examples various features if the Helm SDK" weight: 2 --- This document runs though a series of examples of using the Helm SDK -# Actions +## Actions -These examples are meant to be fully working. The code lives in the `sdkexamples` directory. The below driver runs through each example: +These examples are intended to document various SDK functionalities The code is intended to be fully working, and lives in the `sdkexamples` directory. -{{< highlightexamplego file="sdkexamples/main.go" >}} +The final example documents a driver which can run these actions, including the necessary helper functions. -## Install Action +### Install Action This example installs the given chart/release, for the given version and values. {{< highlightexamplego file="sdkexamples/install.go" >}} -## Upgrade Action +### Upgrade Action This example upgrades the given release, with the given chart, version and values. {{< highlightexamplego file="sdkexamples/upgrade.go" >}} -## Uninstall Action +### Uninstall Action + +This example uninstalls the given release {{< highlightexamplego file="sdkexamples/uninstall.go" >}} -## List Action +### List Action + +This example lists all released charts (in the currently configured namespace) {{< highlightexamplego file="sdkexamples/list.go" >}} -## Pull Action +### Pull Action -{{< highlightexamplego file="sdkexamples/list.go" >}} +This example pulls a chart from an OCI repository + +{{< highlightexamplego file="sdkexamples/pull.go" >}} + +### Driver + +The driver here shows the necessary auxillary functions needed for the Helm SDK actions to function. And shows the above examples in action, to pull, install, update, and uninstall the 'podinfo' chart from an OCI repository. + +{{< highlightexamplego file="sdkexamples/main.go" >}} diff --git a/content/en/docs/sdk/gosdk.md b/content/en/docs/sdk/gosdk.md index 7d092f955..280a162a4 100644 --- a/content/en/docs/sdk/gosdk.md +++ b/content/en/docs/sdk/gosdk.md @@ -4,19 +4,29 @@ description: "Introduces the Helm Go SDK" aliases: ["/docs/gosdk"] weight: 1 --- -Helm provides a Go SDK to enable building software and tools that leverage Helm -charts for managing Kubernetes software deployment (In fact, the Helm CLI is just one such tool). +Helm provides a Go SDK to enable building software and tools that leverage Helm charts and Helm functionality for managing Kubernetes software deployment. In fact, the Helm CLI is just one such tool(!). -Full API documentation can be found at [https://pkg.go.dev/helm.sh/helm/v3](https://pkg.go.dev/helm.sh/helm/v3), -but a brief overview of some of the main types of packages and a simple example follow -below. +Currently, the SDK has been functionally separated from the Helm CLI, and the SDK can (and is) used by standalone tooling. The Helm project has committed to API stability for the SDK. But... as a warning, the SDK has some rough edges remaining from the initial work to separate the CLI and the SDK. Which the Helm project aims to improve and over time provide a cleaner SDK API. -# Main packages +Full API documentation can be found at [https://pkg.go.dev/helm.sh/helm/v3](https://pkg.go.dev/helm.sh/helm/v3). -## Actions +A brief overview of some of the main types of packages follow below. + +## Main packages + +### Actions [pkg/action](https://pkg.go.dev/helm.sh/helm/v3/pkg/action) provides the main operations that Helm can action on charts. `install`, `upgrade`, `pull`, etc. These are often used one-to-one by the Helm CLI commands. -## Chartutil +### Chartutil + +[pkg/chartutil](https://pkg.go.dev/helm.sh/helm/v3/pkg/chartutil) provides high level functionality for working with Helm charts. + + +## Compatibility + +The Helm SDK explicitly follows the Helm backwards compatibility guarantees: + + -[pkg/chartutil](https://pkg.go.dev/helm.sh/helm/v3/pkg/chartutil) provides high level functionality for working with Helm charts. For example, unpacking. +That is, break changes will only be made over major versions.