helm

package
v0.0.0-...-6626f61 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlatformFileName = "platform.yml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart []byte

func (Chart) Get

func (c Chart) Get() (ChartData, error)

func (Chart) Raw

func (c Chart) Raw() []byte

func (Chart) SHA256SUM

func (c Chart) SHA256SUM() string

type ChartData

type ChartData interface {
	Chart() *chart.Chart

	Platform() (*Platform, error)
}

type ChartManager

type ChartManager interface {
	Reload(ctx context.Context) error

	Repositories() []string

	Get(name string) (ChartManagerRepo, bool)
}

func NewChartManager

func NewChartManager(ctx context.Context, client *http.Client, format string, args ...interface{}) (ChartManager, error)

type ChartManagerRepo

type ChartManagerRepo interface {
	Versions() []string

	Get(version string) (ChartManagerRepoVersion, bool)
	Latest() (ChartManagerRepoVersion, bool)
}

type ChartManagerRepoVersion

type ChartManagerRepoVersion interface {
	Get(ctx context.Context) (Chart, error)

	Version() string

	Chart() *repo.ChartVersion
}

type Client

type Client interface {
	Namespace() string

	Alive(ctx context.Context) error

	Invalidate()
	DiscoverKubernetesApiVersions(gv schema.GroupVersion) (ApiVersions, error)
	DiscoverKubernetesApiVersionKind(gvk schema.GroupVersionKind) (*meta.APIResource, error)
	NativeGet(ctx context.Context, reqs ...Resource) ([]ResourceObject, error)

	StatusObjects(ctx context.Context, name string, mods ...util.Mod[action.Status]) (*Release, []ResourceObject, error)

	Status(ctx context.Context, name string, mods ...util.Mod[action.Status]) (*Release, error)
	List(ctx context.Context, mods ...util.Mod[action.List]) ([]Release, error)
	Install(ctx context.Context, chart Chart, values Values, mods ...util.Mod[action.Install]) (*Release, error)
	Upgrade(ctx context.Context, name string, chart Chart, values Values, mods ...util.Mod[action.Upgrade]) (*UpgradeResponse, error)
	Uninstall(ctx context.Context, name string, mods ...util.Mod[action.Uninstall]) (*UninstallRelease, error)
	Test(ctx context.Context, name string, mods ...util.Mod[action.ReleaseTesting]) (*Release, error)
}

func NewClient

func NewClient(cfg Configuration) (Client, error)

type Configuration

type Configuration struct {
	Namespace string

	Config *rest.Config

	Driver *ConfigurationDriver
}

func (*Configuration) Validate

func (c *Configuration) Validate() error

type ConfigurationDriver

type ConfigurationDriver string
const (
	ConfigurationDriverDefault                       = ConfigurationDriverSecret
	ConfigurationDriverConfigMap ConfigurationDriver = "configmap"
	ConfigurationDriverSecret    ConfigurationDriver = "secret"
)

func (*ConfigurationDriver) Get

func (*ConfigurationDriver) Validate

func (c *ConfigurationDriver) Validate() error

type Platform

type Platform struct {
	Requirements PlatformRequirements `json:"requirements,omitempty"`
}

type PlatformRequirements

type PlatformRequirements map[string]PlatformVersionDefinition

type PlatformVersionDefinition

type PlatformVersionDefinition string

type Release

type Release struct {
	Name string

	Info  ReleaseInfo
	Chart *ReleaseChart

	Values Values

	Version   int
	Namespace string
	Labels    map[string]string
}

func (*Release) GetChart

func (r *Release) GetChart() *ReleaseChart

type ReleaseChart

type ReleaseChart struct {
	Metadata *ReleaseChartMetadata
}

func (*ReleaseChart) GetMetadata

func (r *ReleaseChart) GetMetadata() *ReleaseChartMetadata

type ReleaseChartMetadata

type ReleaseChartMetadata struct {
	Version string
}

func (*ReleaseChartMetadata) GetVersion

func (r *ReleaseChartMetadata) GetVersion() string

type ReleaseInfo

type ReleaseInfo struct {
	FirstDeployed time.Time
	LastDeployed  time.Time
	Deleted       time.Time
	Description   string
	Status        release.Status
	Notes         string
	Resources     Resources
}

type Resource

type Resource struct {
	schema.GroupVersionKind
	Name, Namespace string
}

type ResourceObject

type ResourceObject struct {
	Resource

	Object *ResourceObjectData
}

type ResourceObjectData

type ResourceObjectData struct {
	Data []byte
}

func (*ResourceObjectData) Unmarshal

func (r *ResourceObjectData) Unmarshal(obj any) error

type Resources

type Resources []Resource

type UninstallRelease

type UninstallRelease struct {
	Release Release
	Info    string
}

type UpgradeResponse

type UpgradeResponse struct {
	Before, After *Release
}

type Values

type Values []byte

func NewMergeValues

func NewMergeValues(opts ValuesMergeMethod, vs ...any) (Values, error)

func NewValues

func NewValues(in any) (Values, error)

func (Values) Equals

func (v Values) Equals(other Values) bool

func (Values) Marshal

func (v Values) Marshal() (map[string]interface{}, error)

func (Values) MarshalJSON

func (v Values) MarshalJSON() ([]byte, error)

func (Values) String

func (v Values) String() string

type ValuesMergeMethod

type ValuesMergeMethod int
const (
	MergeMaps ValuesMergeMethod = 1 << iota
)

func (ValuesMergeMethod) Has

func (ValuesMergeMethod) Merge

func (v ValuesMergeMethod) Merge(a, b Values) (Values, error)

Jump to

Keyboard shortcuts

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