Documentation ¶
Index ¶
- Constants
- Variables
- func CreateRelease(actionConfig *action.Configuration, name, namespace, valueString string, ...) (*release.Release, error)
- func DeleteRelease(actionConfig *action.Configuration, name string, keepHistory bool) (*release.UninstallReleaseResponse, error)
- func FetchRepoIndex(url, authHeader string) ([]byte, error)
- func GetRelease(actionConfig *action.Configuration, name string) (*release.Release, error)
- func ListReleases(actionConfig *action.Configuration, namespace string, listLimit int, ...) ([]proxy.AppOverview, error)
- func NewActionConfig(storageForDriver StorageForDriver, config *rest.Config, ...) (*action.Configuration, error)
- func NewActionConfigWithSecret(config *rest.Config, clientset *kubernetes.Clientset, namespace string) (*action.Configuration, error)
- func NewConfigFlagsFromCluster(namespace string, clusterConfig *rest.Config) genericclioptions.RESTClientGetter
- func ParseRepoIndex(body []byte) (*helmrepo.IndexFile, error)
- func RollbackRelease(actionConfig *action.Configuration, releaseName string, revision int) (*release.Release, error)
- func StorageForConfigMaps(namespace string, clientset *kubernetes.Clientset) *storage.Storage
- func StorageForMemory(_ string, _ *kubernetes.Clientset) *storage.Storage
- func StorageForSecrets(namespace string, clientset *kubernetes.Clientset) *storage.Storage
- func UpgradeRelease(actionConfig *action.Configuration, name, valuesYaml string, ch *chart.Chart, ...) (*release.Release, error)
- type Chart
- type ChartFiles
- type ChartIconString
- type ChartVersion
- type DockerSecretsPostRenderer
- type NewActionConfigWithSecretFunc
- type Repo
- type RepoCheck
- type RepoInternal
- type StorageForDriver
- type Values
Constants ¶
const ( IndexDockerIO = "index.docker.io" DockerIO = "docker.io" )
Variables ¶
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 GetRelease ¶
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 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.
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
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
type ChartIconString ¶
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 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
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.