helm

package
v0.9.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Overview

Copyright The Helm Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	K3SChart = "vcluster"
	K0SChart = "vcluster-k0s"
	K8SChart = "vcluster-k8s"
	EKSChart = "vcluster-eks"
)

Variables

View Source
var CommandPath = "helm"

Functions

func WriteKubeConfig

func WriteKubeConfig(configRaw *clientcmdapi.Config) (string, error)

WriteKubeConfig writes the kubeconfig to a file and returns the filename

Types

type Chart added in v0.5.0

type Chart struct {
	Metadata *Metadata `json:"metadata,omitempty"`
}

Chart holds the chart metadata

type ChartOptions added in v0.6.0

type ChartOptions struct {
	ChartName          string
	ChartRepo          string
	ChartVersion       string
	CIDR               string
	CreateClusterRole  bool
	DisableIngressSync bool
	Expose             bool
	K3SImage           string
	Isolate            bool
	KubernetesVersion  *version.Info
}

ChartOptions holds the chart options

type Client

type Client interface {
	Install(name, namespace string, options UpgradeOptions) error
	Upgrade(name, namespace string, options UpgradeOptions) error
	Delete(name, namespace string) error
	Exists(name, namespace string) (bool, error)
}

Client defines the interface how to interact with helm

func NewClient

func NewClient(config *clientcmdapi.Config, log log.Logger) Client

NewClient creates a new helm client from the given config

type Info added in v0.5.0

type Info struct {
	// FirstDeployed is when the release was first deployed.
	// +optional
	FirstDeployed Time `json:"first_deployed,omitempty"`
	// LastDeployed is when the release was last deployed.
	// +optional
	LastDeployed Time `json:"last_deployed,omitempty"`
	// Deleted tracks when this object was deleted.
	// +optional
	Deleted Time `json:"deleted,omitempty"`
	// Description is human-friendly "log entry" about this release.
	// +optional
	Description string `json:"description,omitempty"`
	// Status is the current state of the release
	// +optional
	Status string `json:"status,omitempty"`
	// Contains the rendered templates/NOTES.txt if available
	// +optional
	Notes string `json:"notes,omitempty"`
}

Info describes release information.

type Maintainer added in v0.5.0

type Maintainer struct {
	// Name is a user name or organization name
	// +optional
	Name string `json:"name,omitempty"`
	// Email is an optional email address to contact the named maintainer
	// +optional
	Email string `json:"email,omitempty"`
	// URL is an optional URL to an address for the named maintainer
	// +optional
	URL string `json:"url,omitempty"`
}

Maintainer describes a Chart maintainer.

type Metadata added in v0.5.0

type Metadata struct {
	// The name of the chart
	// +optional
	Name string `json:"name,omitempty"`
	// The URL to a relevant project page, git repo, or contact person
	// +optional
	Home string `json:"home,omitempty"`
	// Source is the URL to the source code of this chart
	// +optional
	Sources []string `json:"sources,omitempty"`
	// A SemVer 2 conformant version string of the chart
	// +optional
	Version string `json:"version,omitempty"`
	// A one-sentence description of the chart
	// +optional
	Description string `json:"description,omitempty"`
	// A list of string keywords
	// +optional
	Keywords []string `json:"keywords,omitempty"`
	// A list of name and URL/email address combinations for the maintainer(s)
	// +optional
	Maintainers []*Maintainer `json:"maintainers,omitempty"`
	// The URL to an icon file.
	// +optional
	Icon string `json:"icon,omitempty"`
	// The API Version of this chart.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// The condition to check to enable chart
	// +optional
	Condition string `json:"condition,omitempty"`
	// The tags to check to enable chart
	// +optional
	Tags string `json:"tags,omitempty"`
	// The version of the application enclosed inside of this chart.
	// +optional
	AppVersion string `json:"appVersion,omitempty"`
	// Whether or not this chart is deprecated
	// +optional
	Deprecated bool `json:"deprecated,omitempty"`
	// Annotations are additional mappings uninterpreted by Helm,
	// made available for inspection by other applications.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
	// KubeVersion is a SemVer constraint specifying the version of Kubernetes required.
	// +optional
	KubeVersion string `json:"kubeVersion,omitempty"`
	// Specifies the chart type: application or library
	// +optional
	Type string `json:"type,omitempty"`
	// Urls where to find the chart contents
	// +optional
	Urls []string `json:"urls,omitempty"`
}

Metadata for a Chart file. This models the structure of a Chart.yaml file.

type Release added in v0.5.0

type Release struct {
	// Name is the name of the release
	Name string `json:"name,omitempty"`
	// Info provides information about a release
	Info *Info `json:"info,omitempty"`
	// Chart is the chart that was released.
	Chart *Chart `json:"chart,omitempty"`
	// Config is the set of extra Values added to the chart.
	// These values override the default values inside of the chart.
	Config map[string]interface{} `json:"config,omitempty"`
	// Version is an int which represents the version of the release.
	Version int `json:"version,omitempty"`
	// Namespace is the kubernetes namespace of the release.
	Namespace string `json:"namespace,omitempty"`

	Secret *v1.Secret `json:"-"`
}

Release describes a deployment of a chart, together with the chart and the variables used to deploy that chart.

type Secrets added in v0.5.0

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

Secrets is a wrapper around an implementation of a kubernetes SecretsInterface.

func NewSecrets added in v0.5.0

func NewSecrets(clientSet kubernetes.Interface) *Secrets

NewSecrets initializes a new Secrets wrapping an implementation of the kubernetes SecretsInterface.

func (*Secrets) Get added in v0.5.0

func (secrets *Secrets) Get(ctx context.Context, name string, namespace string) (*Release, error)

Query fetches all releases that match the provided map of labels. An error is returned if the secret fails to retrieve the releases.

func (*Secrets) List added in v0.5.0

func (secrets *Secrets) List(ctx context.Context, labels kblabels.Selector, namespace string) ([]*Release, error)

List fetches all releases and returns the list releases such that filter(release) == true. An error is returned if the secret fails to retrieve the releases.

func (*Secrets) Update added in v0.5.0

func (secrets *Secrets) Update(ctx context.Context, secret *v1.Secret) (*v1.Secret, error)

type Time added in v0.5.0

type Time struct {
	time.Time
}

Time is a convenience wrapper around stdlib time, but with different marshalling and unmarshaling for zero values

func Date added in v0.5.0

func Date(year int, month time.Month, day, hour, min, sec, nsec int, loc *time.Location) Time

func Now added in v0.5.0

func Now() Time

Now returns the current time. It is a convenience wrapper around time.Now()

func Parse added in v0.5.0

func Parse(layout, value string) (Time, error)

func ParseInLocation added in v0.5.0

func ParseInLocation(layout, value string, loc *time.Location) (Time, error)

func Unix added in v0.5.0

func Unix(sec int64, nsec int64) Time

func (Time) Add added in v0.5.0

func (t Time) Add(d time.Duration) Time

func (Time) AddDate added in v0.5.0

func (t Time) AddDate(years int, months int, days int) Time

func (Time) After added in v0.5.0

func (t Time) After(u Time) bool

func (Time) Before added in v0.5.0

func (t Time) Before(u Time) bool

func (Time) Equal added in v0.5.0

func (t Time) Equal(u Time) bool

func (Time) In added in v0.5.0

func (t Time) In(loc *time.Location) Time

func (Time) Local added in v0.5.0

func (t Time) Local() Time

func (Time) MarshalJSON added in v0.5.0

func (t Time) MarshalJSON() ([]byte, error)

func (Time) Round added in v0.5.0

func (t Time) Round(d time.Duration) Time

func (Time) Sub added in v0.5.0

func (t Time) Sub(u Time) time.Duration

func (Time) Truncate added in v0.5.0

func (t Time) Truncate(d time.Duration) Time

func (Time) UTC added in v0.5.0

func (t Time) UTC() Time

func (*Time) UnmarshalJSON added in v0.5.0

func (t *Time) UnmarshalJSON(b []byte) error

type UpgradeOptions

type UpgradeOptions struct {
	Chart string
	Path  string

	Repo            string
	Version         string
	Values          string
	ValuesFiles     []string
	SetValues       map[string]string
	SetStringValues map[string]string

	Username string
	Password string

	Atomic bool
	Force  bool
}

UpgradeOptions holds all the options for upgrading / installing a chart

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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