helm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersion = "toolkit.ardikabs.com/v1alpha1"
	Kind       = "HelmRelease"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOption

type ClientOption func(client *action.Install)

func WithChartVersion

func WithChartVersion(version string) ClientOption

func WithIncludeCRDs

func WithIncludeCRDs(include bool) ClientOption

func WithInsecureSkipVerifyTLS

func WithInsecureSkipVerifyTLS(skip bool) ClientOption

func WithReleaseName

func WithReleaseName(name string) ClientOption

func WithReleaseNamespace

func WithReleaseNamespace(name string) ClientOption

type DefaultHelmRenderer

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

func NewHelmRenderer

func NewHelmRenderer(writer io.Writer, helmRepo HelmRepo) (*DefaultHelmRenderer, error)

func (DefaultHelmRenderer) Render

type HelmRepo

type HelmRepo struct {
	// Name represents the repo entry name to refer for
	Name *string `json:"name,omitempty"`

	// URL represents the remote target to fetch the helm chart.
	// It only supports https://. http://, and oci:// protocol.
	URL *string `json:"url,omitempty"`

	// Path represents as local path of the helm chart.
	Path *string `json:"path,omitempty"`
}

func (HelmRepo) Init

func (r HelmRepo) Init(ctx context.Context, client *action.Install) error

func (HelmRepo) NameAndChart

func (r HelmRepo) NameAndChart(chartName string) (string, error)

NameAndChart returns the name and chart that should be used. The precedence during the NameAndChart generation are as follows: 1. Path will be used when available 2. Repo with OCI protocol will refer to the its URL 3. Repo with HTTP protocol will refer to the combined of repo Name and Chart Name, e.g., repoName/chartName.

type Release

type Release struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ReleaseSpec `json:"spec,omitempty"`
}

func (*Release) Render

func (r *Release) Render(w io.Writer) error

func (*Release) Validate

func (r *Release) Validate() error

type ReleaseSpec

type ReleaseSpec struct {
	Chart   string   `json:"chart,omitempty"`
	Repo    HelmRepo `json:"repo,omitempty"`
	Version string   `json:"version,omitempty"`

	// Values represent list of files specified for the Helm release, it is similar with -f/--values Helm template flag
	Values []string `json:"values,omitempty"`
	// ValuesInline represent an inline values, it will take precedence over Values files
	ValuesInline map[string]interface{} `json:"valuesInline,omitempty"`

	IncludeCRDs           bool `json:"includeCRDs,omitempty"`
	InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty"`
	IgnoreDeprecatedChart bool `json:"ignoreDeprecatedChart,omitempty"`
	CreateNamespace       bool `json:"createNamespace,omitempty"`
}

type RenderParameter

type RenderParameter struct {
	ReleaseName           string
	ReleaseNamespace      string
	ChartName             string
	Version               string
	Values                []string
	ValuesInline          map[string]interface{}
	IncludeCRDs           bool
	CreateNamespace       bool
	InsecureSkipVerifyTLS bool
	IgnoreDeprecatedChart bool
}

Jump to

Keyboard shortcuts

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