helm

package
v1.9.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveCRDs added in v0.2.3

func ArchiveCRDs(ctx context.Context, fs billy.Filesystem, srcHelmChartPath, srcCRDsDir, dstHelmChartPath, destCRDsDir string) error

ArchiveCRDs bundles, compresses and saves the CRD files from the source to the destination

func ArchiveCharts added in v1.9.9

func ArchiveCharts(ctx context.Context, repoRoot string, specificChart string) error

ArchiveCharts zips charts from charts/ into assets/. If the asset was re-ordered, it will also update charts/. If specificChart is provided, it will filter the set of charts that will be targeted for zipping. It will also not update an asset if its internal contents have not changed.

func CheckVersionStandards added in v1.9.2

func CheckVersionStandards(ctx context.Context, new *helmRepo.IndexFile) error

CheckVersionStandards validates that all chart versions follow the allowed prerelease standards Only -alpha., -beta., and -rc. prerelease identifiers are allowed Returns an error if any version contains an invalid prerelease identifier

func ConvertToHelmChart added in v0.3.0

func ConvertToHelmChart(ctx context.Context, fs billy.Filesystem, dirPath string) error

ConvertToHelmChart converts a given path to a Helm chart. It does so by moving all YAML files to templates and creating a dummy Chart.yaml and values.yaml

func CopyCRDsFromChart

func CopyCRDsFromChart(ctx context.Context, fs billy.Filesystem, srcHelmChartPath, srcCRDsDir, dstHelmChartPath, destCRDsDir string) error

CopyCRDsFromChart copies the CRDs from a chart to another chart

func CreateOrUpdateHelmIndex

func CreateOrUpdateHelmIndex(ctx context.Context, rootFs billy.Filesystem) error

CreateOrUpdateHelmIndex either creates or updates the index.yaml for the repository this package is within

func DeleteCRDsFromChart

func DeleteCRDsFromChart(ctx context.Context, fs billy.Filesystem, helmChartPath string) error

DeleteCRDsFromChart deletes all the CRDs loaded by a chart

func DumpAssets added in v1.9.9

func DumpAssets(ctx context.Context, repoRoot string, specificAsset string) error

DumpAssets unzips assets from assets/ into charts/. If specificAsset is provided, it will filter the set of assets that will be targeted for unzipping.

func ExportHelmChart

func ExportHelmChart(ctx context.Context, rootFs, fs billy.Filesystem, helmChartPath string, packageVersion *int, version *semver.Version, autoGenBumpVersion *semver.Version, upstreamChartVersion string, omitBuildMetadata bool) error

ExportHelmChart creates a Helm chart archive and an unarchived Helm chart at RepositoryAssetDirpath and RepositoryChartDirPath helmChartPath is a relative path (rooted at the package level) that contains the chart.

func GenerateArchive added in v0.3.0

func GenerateArchive(ctx context.Context, rootFs, fs billy.Filesystem, helmChartPath, chartAssetsDirpath string, chartVersion *string) (string, error)

GenerateArchive produces a Helm chart archive. If an archive exists at that path already, it does a deep check of the internal contents of the archive and only updates the archive if something within it has been changed.

func GetHelmMetadataVersion added in v0.2.0

func GetHelmMetadataVersion(ctx context.Context, fs billy.Filesystem, mainHelmChartPath string) (string, error)

GetHelmMetadataVersion gets the version of a Helm chart as defined in its Chart.yaml

func LoadChartYaml added in v1.9.9

func LoadChartYaml(rootFs billy.Filesystem, chart string, chartVersion string) (*chart.Metadata, error)

LoadChartYaml will load a given chart.yaml file for the target chart and version

func OpenIndexYaml added in v1.0.0

func OpenIndexYaml(ctx context.Context, rootFs billy.Filesystem) (*helmRepo.IndexFile, error)

OpenIndexYaml will check and open the index.yaml file in the local repository at the default file path

func RestructureChartsAndAssets added in v1.9.9

func RestructureChartsAndAssets(ctx context.Context, repoFs billy.Filesystem) error

RestructureChartsAndAssets takes in a Helm repository and restructures the contents of assets/ based on the contents of charts/ It then dumps the created assets/ back into charts/ and regenerates the Helm index. As a result, the final outputted Helm repository can now be used by the charts-build-scripts as it has been standardized.

func SortVersions added in v1.8.2

func SortVersions(index *helmRepo.IndexFile)

SortVersions sorts chart versions with custom RC handling

func StandardizeChartYaml added in v0.3.0

func StandardizeChartYaml(ctx context.Context, fs billy.Filesystem, dirPath string) error

StandardizeChartYaml marshalls and unmarshalls the Chart.yaml to ensure that it is ordered as expected

func UpdateHelmMetadataWithName

func UpdateHelmMetadataWithName(ctx context.Context, fs billy.Filesystem, mainHelmChartPath string, name string) error

UpdateHelmMetadataWithName updates the name of the chart in the metadata

func UpdateIndex added in v0.3.0

func UpdateIndex(ctx context.Context, original, new *helmRepo.IndexFile) (*helmRepo.IndexFile, bool)

UpdateIndex updates the original index with the new contents

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL