helm

package
v0.0.0-...-4786a4a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexDockerIO = "index.docker.io"
	DockerIO      = "docker.io"
)

Variables

View Source
var NetClient httpClient = &http.Client{}

Functions

func CreateRelease

func CreateRelease(actionConfig *action.Configuration, name, namespace, valueString string, ch *chart.Chart, registrySecrets map[string]string) (*release.Release, error)

CreateRelease creates a release.

func DeleteRelease

func DeleteRelease(actionConfig *action.Configuration, name string, keepHistory bool) (*release.UninstallReleaseResponse, error)

DeleteRelease deletes a release.

func FetchRepoIndex

func FetchRepoIndex(url, authHeader string) ([]byte, error)

func GetRelease

func GetRelease(actionConfig *action.Configuration, name string) (*release.Release, error)

GetRelease returns the info of a release.

func ListReleases

func ListReleases(actionConfig *action.Configuration, namespace string, listLimit int, status string) ([]proxy.AppOverview, error)

ListReleases lists releases in the specified namespace, or all namespaces if the empty string is given.

func NewActionConfig

func NewActionConfig(storageForDriver StorageForDriver, config *rest.Config, clientset *kubernetes.Clientset, namespace string) (*action.Configuration, error)

NewActionConfig creates an action.Configuration, which can then be used to create Helm 3 actions. Among other things, the action.Configuration controls which namespace the command is run against.

func NewActionConfigWithSecret

func NewActionConfigWithSecret(config *rest.Config, clientset *kubernetes.Clientset, namespace string) (*action.Configuration, error)

func NewConfigFlagsFromCluster

func NewConfigFlagsFromCluster(namespace string, clusterConfig *rest.Config) genericclioptions.RESTClientGetter

NewConfigFlagsFromCluster returns ConfigFlags with default values set from within cluster.

func ParseRepoIndex

func ParseRepoIndex(body []byte) (*helmrepo.IndexFile, error)

func RollbackRelease

func RollbackRelease(actionConfig *action.Configuration, releaseName string, revision int) (*release.Release, error)

RollbackRelease rolls back a release to the specified revision.

func StorageForConfigMaps

func StorageForConfigMaps(namespace string, clientset *kubernetes.Clientset) *storage.Storage

StorageForConfigMaps returns a storage using the ConfigMap driver.

func StorageForMemory

func StorageForMemory(_ string, _ *kubernetes.Clientset) *storage.Storage

StorageForMemory returns a storage using the Memory driver.

func StorageForSecrets

func StorageForSecrets(namespace string, clientset *kubernetes.Clientset) *storage.Storage

StorageForSecrets returns a storage using the Secret driver.

func UpgradeRelease

func UpgradeRelease(actionConfig *action.Configuration, name, valuesYaml string, ch *chart.Chart, registrySecrets map[string]string) (*release.Release, error)

UpgradeRelease upgrades a release.

Types

type Chart

type Chart struct {
	ID              string             `json:"ID" bson:"chart_id"`
	Name            string             `json:"name"`
	Repo            *Repo              `json:"repo"`
	Description     string             `json:"description"`
	Home            string             `json:"home"`
	Keywords        []string           `json:"keywords"`
	Maintainers     []chart.Maintainer `json:"maintainers"`
	Sources         []string           `json:"sources"`
	Icon            string             `json:"icon"`
	RawIcon         []byte             `json:"raw_icon" bson:"raw_icon"`
	IconContentType string             `json:"icon_content_type" bson:"icon_content_type,omitempty"`
	Category        string             `json:"category"`
	ChartVersions   []ChartVersion     `json:"chartVersions"`
}

Chart is a higher-level representation of a chart package

func ChartsFromIndex

func ChartsFromIndex(index *helmrepo.IndexFile, r *Repo) []Chart

type ChartFiles

type ChartFiles struct {
	ID     string `bson:"file_id"`
	Readme string
	Values string
	Schema string
	Repo   *Repo
	Digest string
}

ChartFiles holds the README and values for a given chart version

func (ChartFiles) Value

func (a ChartFiles) Value() (driver.Value, error)

Allow to convert ChartFiles to a sql JSON

type ChartIconString

type ChartIconString struct {
	Chart
	RawIcon string `json:"raw_icon" bson:"raw_icon"`
}

ChartIconString is a higher-level representation of a chart package TODO(andresmgot) Replace this type when the icon is stored as a binary

type ChartVersion

type ChartVersion struct {
	Version    string    `json:"version"`
	AppVersion string    `json:"app_version"`
	Created    time.Time `json:"created"`
	Digest     string    `json:"digest"`
	URLs       []string  `json:"urls"`
	// The following three fields get set with the URL paths to the respective
	// chart files (as opposed to the similar fields on ChartFiles which
	// contain the actual content).
	Readme string `json:"readme" bson:"-"`
	Values string `json:"values" bson:"-"`
	Schema string `json:"schema" bson:"-"`
}

ChartVersion is a representation of a specific version of a chart

type DockerSecretsPostRenderer

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

DockerSecretsPostRenderer is a helm post-renderer (see https://helm.sh/docs/topics/advanced/#post-rendering) which appends image pull secrets to container images which match specified registry domains.

func NewDockerSecretsPostRenderer

func NewDockerSecretsPostRenderer(secrets map[string]string) (*DockerSecretsPostRenderer, error)

NewDockerSecretsPostRenderer returns a post renderer configured with the specified secrets.

func (*DockerSecretsPostRenderer) Run

func (r *DockerSecretsPostRenderer) Run(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error)

Run returns the rendered yaml including any additions of the post-renderer. An error is only returned if the manifests cannot be parsed or re-rendered.

type NewActionConfigWithSecretFunc

type NewActionConfigWithSecretFunc func(namespace string) *action.Configuration

type Repo

type Repo struct {
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
	URL       string `json:"url"`
}

Repo holds the App repository basic details

type RepoCheck

type RepoCheck struct {
	ID         string    `bson:"_id"`
	LastUpdate time.Time `bson:"last_update"`
	Checksum   string    `bson:"checksum"`
}

type RepoInternal

type RepoInternal struct {
	Namespace           string `json:"namespace"`
	Name                string `json:"name"`
	URL                 string `json:"url"`
	AuthorizationHeader string `bson:"-"`
	Checksum            string
}

RepoInternal holds the App repository details including auth and checksum

func GetRepo

func GetRepo(namespace, name, repoURL, authorizationHeader string) (*RepoInternal, []byte, error)

type StorageForDriver

type StorageForDriver func(namespace string, clientset *kubernetes.Clientset) *storage.Storage

StorageForDriver is a function type which returns a specific storage.

func ParseDriverType

func ParseDriverType(raw string) (StorageForDriver, error)

ParseDriverType maps strings to well-typed driver representations.

type Values

type Values map[string]interface{}

Values is a type alias for values.yaml.

Jump to

Keyboard shortcuts

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