Documentation
¶
Index ¶
- func ArchiveCRDs(ctx context.Context, fs billy.Filesystem, ...) error
- func ArchiveCharts(ctx context.Context, repoRoot string, specificChart string) error
- func CheckVersionStandards(ctx context.Context, new *helmRepo.IndexFile) error
- func ConvertToHelmChart(ctx context.Context, fs billy.Filesystem, dirPath string) error
- func CopyCRDsFromChart(ctx context.Context, fs billy.Filesystem, ...) error
- func CreateOrUpdateHelmIndex(ctx context.Context, rootFs billy.Filesystem) error
- func DeleteCRDsFromChart(ctx context.Context, fs billy.Filesystem, helmChartPath string) error
- func DumpAssets(ctx context.Context, repoRoot string, specificAsset string) error
- func ExportHelmChart(ctx context.Context, rootFs, fs billy.Filesystem, helmChartPath string, ...) error
- func GenerateArchive(ctx context.Context, rootFs, fs billy.Filesystem, ...) (string, error)
- func GetHelmMetadataVersion(ctx context.Context, fs billy.Filesystem, mainHelmChartPath string) (string, error)
- func LoadChartYaml(rootFs billy.Filesystem, chart string, chartVersion string) (*chart.Metadata, error)
- func OpenIndexYaml(ctx context.Context, rootFs billy.Filesystem) (*helmRepo.IndexFile, error)
- func RestructureChartsAndAssets(ctx context.Context, repoFs billy.Filesystem) error
- func SortVersions(index *helmRepo.IndexFile)
- func StandardizeChartYaml(ctx context.Context, fs billy.Filesystem, dirPath string) error
- func UpdateHelmMetadataWithName(ctx context.Context, fs billy.Filesystem, mainHelmChartPath string, ...) error
- func UpdateIndex(ctx context.Context, original, new *helmRepo.IndexFile) (*helmRepo.IndexFile, bool)
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
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
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
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 ¶
DeleteCRDsFromChart deletes all the CRDs loaded by a chart
func DumpAssets ¶ added in v1.9.9
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
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
SortVersions sorts chart versions with custom RC handling
func StandardizeChartYaml ¶ added in v0.3.0
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
Types ¶
This section is empty.