helm

package
v0.0.0-...-33a4775 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart

type Chart []byte

func (Chart) Get

func (c Chart) Get() (*chart.Chart, error)

type ChartManager

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

	Repositories() []string
	Versions(repo string) []string
	Latest(repo string) (string, bool)
	Chart(ctx context.Context, repo, version string) (Chart, error)
}

func NewChartManager

func NewChartManager(ctx context.Context, client *http.Client, url string) (ChartManager, error)

type Client

type Client interface {
	Namespace() string
	Client() kclient.Client

	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

	Client kclient.Client

	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 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 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)

Jump to

Keyboard shortcuts

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