bundles

package
v3.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BundleTagToChartVersion

func BundleTagToChartVersion(ctx context.Context, tag string, now time.Time) (*semver.Version, error)

func BytesToChart

func BytesToChart(ctx context.Context, data []byte, opts nelmcommon.HelmOptions) (*chart.Chart, error)

func ChartToBytes

func ChartToBytes(ch *chart.Chart) ([]byte, error)

func Copy

func Copy(ctx context.Context, fromAddr, toAddr *ref.Addr, opts CopyOptions) error

func GetChartNameOverwrite

func GetChartNameOverwrite(targetRepo, renameChart string, helmCompatibleChart bool) *string

func Publish

func Publish(ctx context.Context, bundleDir, bundleRef string, bundlesRegistryClient *registry.Client, opts PublishOptions) error

func Pull

func Pull(ctx context.Context, bundleRef, destDir string, bundlesRegistryClient *registry.Client, opts nelmcommon.HelmOptions) error

func SaveChartValues

func SaveChartValues(ctx context.Context, ch *chart.Chart) error

Types

type BundleAccessor

type BundleAccessor interface {
	ReadChart(ctx context.Context, opts nelmcommon.HelmOptions) (*chart.Chart, error)
	WriteChart(ctx context.Context, ch *chart.Chart, opts nelmcommon.HelmOptions) error

	CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error
	CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error
	CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error
}

func NewBundleAccessor

func NewBundleAccessor(addr *ref.Addr, opts BundleAccessorOptions) BundleAccessor

type BundleAccessorOptions

type BundleAccessorOptions struct {
	BundlesRegistryClient BundlesRegistryClient
	RegistryClient        docker_registry.Interface
}

type BundleArchive

type BundleArchive struct {
	Reader BundleArchiveReader
	Writer BundleArchiveWriter
}

func NewBundleArchive

func NewBundleArchive(reader BundleArchiveReader, writer BundleArchiveWriter) *BundleArchive

func (*BundleArchive) CopyFromArchive

func (bundle *BundleArchive) CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error

func (*BundleArchive) CopyFromRemote

func (bundle *BundleArchive) CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error

func (*BundleArchive) CopyTo

func (bundle *BundleArchive) CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error

func (*BundleArchive) GetImageArchiveOpener

func (bundle *BundleArchive) GetImageArchiveOpener(imageTag string) *ImageArchiveOpener

func (*BundleArchive) ReadChart

func (bundle *BundleArchive) ReadChart(ctx context.Context, opts nelmcommon.HelmOptions) (*chart.Chart, error)

func (*BundleArchive) WriteChart

func (bundle *BundleArchive) WriteChart(ctx context.Context, ch *chart.Chart, opts nelmcommon.HelmOptions) error

type BundleArchiveFileReader

type BundleArchiveFileReader struct {
	Path string
}

func NewBundleArchiveFileReader

func NewBundleArchiveFileReader(path string) *BundleArchiveFileReader

func (*BundleArchiveFileReader) ReadChartArchive

func (reader *BundleArchiveFileReader) ReadChartArchive() ([]byte, error)

func (*BundleArchiveFileReader) ReadImageArchive

func (reader *BundleArchiveFileReader) ReadImageArchive(imageTag string) (*ImageArchiveReadCloser, error)

func (*BundleArchiveFileReader) String

func (reader *BundleArchiveFileReader) String() string

type BundleArchiveFileWriter

type BundleArchiveFileWriter struct {
	Path string
	// contains filtered or unexported fields
}

func NewBundleArchiveFileWriter

func NewBundleArchiveFileWriter(path string) *BundleArchiveFileWriter

func (*BundleArchiveFileWriter) Open

func (writer *BundleArchiveFileWriter) Open() error

func (*BundleArchiveFileWriter) Save

func (writer *BundleArchiveFileWriter) Save() error

func (*BundleArchiveFileWriter) WriteChartArchive

func (writer *BundleArchiveFileWriter) WriteChartArchive(data []byte, opts nelmcommon.HelmOptions) error

func (*BundleArchiveFileWriter) WriteImageArchive

func (writer *BundleArchiveFileWriter) WriteImageArchive(imageTag string, data []byte) error

type BundleArchiveReader

type BundleArchiveReader interface {
	String() string
	ReadChartArchive() ([]byte, error)
	ReadImageArchive(imageTag string) (*ImageArchiveReadCloser, error)
}

type BundleArchiveWriter

type BundleArchiveWriter interface {
	Open() error
	WriteChartArchive(data []byte, opts nelmcommon.HelmOptions) error
	WriteImageArchive(imageTag string, data []byte) error
	Save() error
}

type BundlesRegistryClient

type BundlesRegistryClient interface {
	PullChartToCache(ctx context.Context, ref *bundles_registry.Reference, opts nelmcommon.HelmOptions) error
	LoadChart(ctx context.Context, ref *bundles_registry.Reference, opts nelmcommon.HelmOptions) (*chart.Chart, error)
	SaveChart(ctx context.Context, ch *chart.Chart, ref *bundles_registry.Reference, opts nelmcommon.HelmOptions) error
	PushChart(ctx context.Context, ref *bundles_registry.Reference, opts nelmcommon.HelmOptions) error
}

type CopyOptions

type CopyOptions struct {
	BundlesRegistryClient                BundlesRegistryClient
	FromRegistryClient, ToRegistryClient docker_registry.Interface
	HelmCompatibleChart                  bool
	RenameChart                          string
	HelmOptions                          nelmcommon.HelmOptions
}

type ImageArchiveOpener

type ImageArchiveOpener struct {
	Archive  *BundleArchive
	ImageTag string
}

func NewImageArchiveOpener

func NewImageArchiveOpener(archive *BundleArchive, imageTag string) *ImageArchiveOpener

func (*ImageArchiveOpener) Open

func (opener *ImageArchiveOpener) Open() (io.ReadCloser, error)

type ImageArchiveReadCloser

type ImageArchiveReadCloser struct {
	// contains filtered or unexported fields
}

func NewImageArchiveReadCloser

func NewImageArchiveReadCloser(reader io.Reader, closer func() error) *ImageArchiveReadCloser

func (*ImageArchiveReadCloser) Close

func (opener *ImageArchiveReadCloser) Close() error

func (*ImageArchiveReadCloser) Read

func (opener *ImageArchiveReadCloser) Read(p []byte) (int, error)

type PublishOptions

type PublishOptions struct {
	HelmCompatibleChart bool
	RenameChart         string
	HelmOptions         nelmcommon.HelmOptions
}

type RemoteBundle

type RemoteBundle struct {
	RegistryAddress       *bundles_registry.RegistryAddress
	BundlesRegistryClient BundlesRegistryClient
	RegistryClient        docker_registry.Interface
}

func NewRemoteBundle

func NewRemoteBundle(registryAddress *bundles_registry.RegistryAddress, bundlesRegistryClient BundlesRegistryClient, registryClient docker_registry.Interface) *RemoteBundle

func (*RemoteBundle) CopyFromArchive

func (bundle *RemoteBundle) CopyFromArchive(ctx context.Context, fromArchive *BundleArchive, opts copyToOptions) error

func (*RemoteBundle) CopyFromRemote

func (bundle *RemoteBundle) CopyFromRemote(ctx context.Context, fromRemote *RemoteBundle, opts copyToOptions) error

func (*RemoteBundle) CopyTo

func (bundle *RemoteBundle) CopyTo(ctx context.Context, to BundleAccessor, opts copyToOptions) error

func (*RemoteBundle) ReadChart

func (bundle *RemoteBundle) ReadChart(ctx context.Context, opts nelmcommon.HelmOptions) (*chart.Chart, error)

func (*RemoteBundle) WriteChart

func (bundle *RemoteBundle) WriteChart(ctx context.Context, ch *chart.Chart, opts nelmcommon.HelmOptions) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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