UNPKG

@kosko/helm

Version:

Load Helm charts in kosko.

178 lines (175 loc) 4.42 kB
import { LoadOptions, Manifest } from '@kosko/yaml'; /** * @public */ interface CacheOptions { /** * When cache is enabled, the chart is pulled and stored in the cache * directory. Although Helm has its own cache, implementing our own cache * is faster. Local charts are never cached. * * @defaultValue `true` */ enabled?: boolean; /** * The path of the cache directory. You can also use `KOSKO_HELM_CACHE_DIR` * environment variable to set the cache directory. This option always takes * precedence over the environment variable. * * @defaultValue * - Linux: `$XDG_CACHE_HOME/kosko-helm` or `~/.cache/kosko-helm` * - macOS: `~/Library/Caches/kosko-helm` * - Windows: `$LOCALAPPDATA/kosko-helm` or `~/AppData/Local/kosko-helm` */ dir?: string; } /** * @public */ interface PullOptions { /** * The path of a local chart or the name of a remote chart. */ chart: string; /** * Verify certificates of HTTPS-enabled servers using this CA bundle. */ caFile?: string; /** * Identify HTTPS client using this SSL certificate file. */ certFile?: string; /** * Use development versions, too. Equivalent to version '\>0.0.0-0'. If * `version` is set, this is ignored. */ devel?: boolean; /** * Skip tls certificate checks for the chart download. */ insecureSkipTlsVerify?: boolean; /** * Identify HTTPS client using this SSL key file. */ keyFile?: string; /** * Location of public keys used for verification. * * @defaultValue `~/.gnupg/pubring.gpg` */ keyring?: string; /** * Pass credentials to all domains. */ passCredentials?: boolean; /** * Chart repository password where to locate the requested chart. */ password?: string; /** * Chart repository url where to locate the requested chart. */ repo?: string; /** * Chart repository username where to locate the requested chart. */ username?: string; /** * Verify the package before using it. */ verify?: boolean; /** * Specify the exact chart version to use. If this is not specified, the * latest version is used. */ version?: string; /** * Cache options. */ cache?: CacheOptions; } /** * @public */ interface TemplateOptions { /** * Name of the release. */ name?: string; /** * Kubernetes API versions used for `Capabilities.APIVersions`. */ apiVersions?: string[]; /** * Run helm dependency update before installing the chart. */ dependencyUpdate?: boolean; /** * Add a custom description. */ description?: string; /** * Generate the name (and omit the `name` parameter). */ generateName?: boolean; /** * Include CRDs in the templated output. */ includeCrds?: boolean; /** * Set `.Release.IsUpgrade` instead of `.Release.IsInstall`. */ isUpgrade?: boolean; /** * Kubernetes version used for `Capabilities.KubeVersion`. */ kubeVersion?: string; /** * Specify template used to name the release. */ nameTemplate?: string; /** * Namespace scope for this request. */ namespace?: string; /** * Prevent hooks from running during install. */ noHooks?: boolean; /** * The path to an executable to be used for post rendering. If it exists in * `$PATH`, the binary will be used, otherwise it will try to look for the * executable at the given path. */ postRenderer?: string; /** * Arguments to the post-renderer. * * @defaultValue `[]` */ postRendererArgs?: string[]; /** * Skip tests from templated output. */ skipTests?: boolean; /** * Time to wait for any individual Kubernetes operation (like Jobs for hooks) * * @defaultValue `5m0s` */ timeout?: string; /** * Specify values. */ values?: unknown; } /** * @public */ interface ChartOptions extends LoadOptions, PullOptions, TemplateOptions { } /** * @public */ declare function loadChart(options: ChartOptions): () => Promise<Manifest[]>; export { type CacheOptions, type ChartOptions, type PullOptions, type TemplateOptions, loadChart };