Documentation ¶
Index ¶
- Variables
- func NewDockerSecretsPostRenderer(cluster *models.Cluster, repo repository.Repository, agent *kubernetes.Agent, ...) (postrender.PostRenderer, error)
- type Agent
- func GetAgentFromK8sAgent(stg string, ns string, l *logger.Logger, k8sAgent *kubernetes.Agent) (*Agent, error)
- func GetAgentInClusterConfig(form *Form, l *logger.Logger) (*Agent, error)
- func GetAgentOutOfClusterConfig(form *Form, l *logger.Logger) (*Agent, error)
- func GetAgentTesting(form *Form, storage *storage.Storage, l *logger.Logger, ...) *Agent
- func (a *Agent) GetRelease(name string, version int) (*release.Release, error)
- func (a *Agent) GetReleaseHistory(name string) ([]*release.Release, error)
- func (a *Agent) InstallChart(conf *InstallChartConfig, doAuth *oauth2.Config) (*release.Release, error)
- func (a *Agent) InstallChartFromValuesBytes(conf *InstallChartConfig, values []byte, doAuth *oauth2.Config) (*release.Release, error)
- func (a *Agent) ListReleases(namespace string, filter *ListFilter) ([]*release.Release, error)
- func (a *Agent) RollbackRelease(name string, version int) error
- func (a *Agent) UninstallChart(name string) (*release.UninstallReleaseResponse, error)
- func (a *Agent) UpgradeRelease(conf *UpgradeReleaseConfig, values string, doAuth *oauth2.Config) (*release.Release, error)
- func (a *Agent) UpgradeReleaseByValues(conf *UpgradeReleaseConfig, doAuth *oauth2.Config) (*release.Release, error)
- type DockerSecretsPostRenderer
- type Form
- type InstallChartConfig
- type ListFilter
- type NewStorageDriver
- type UpgradeReleaseConfig
Constants ¶
This section is empty.
Variables ¶
var StorageMap map[string]NewStorageDriver = map[string]NewStorageDriver{
"secret": newSecretStorageDriver,
"configmap": newConfigMapsStorageDriver,
"memory": newMemoryStorageDriver,
}
StorageMap is a map from storage configuration env variables to a function that initializes that Helm storage driver.
Functions ¶
func NewDockerSecretsPostRenderer ¶
func NewDockerSecretsPostRenderer( cluster *models.Cluster, repo repository.Repository, agent *kubernetes.Agent, namespace string, regs []*models.Registry, doAuth *oauth2.Config, ) (postrender.PostRenderer, error)
Types ¶
type Agent ¶
type Agent struct { ActionConfig *action.Configuration K8sAgent *kubernetes.Agent }
Agent is a Helm agent for performing helm operations
func GetAgentFromK8sAgent ¶
func GetAgentFromK8sAgent(stg string, ns string, l *logger.Logger, k8sAgent *kubernetes.Agent) (*Agent, error)
GetAgentFromK8sAgent creates a new Agent
func GetAgentInClusterConfig ¶
GetAgentInClusterConfig creates a new Agent from inside the cluster using the underlying kubernetes.GetAgentInClusterConfig method
func GetAgentOutOfClusterConfig ¶
GetAgentOutOfClusterConfig creates a new Agent from outside the cluster using the underlying kubernetes.GetAgentOutOfClusterConfig method
func GetAgentTesting ¶
func GetAgentTesting(form *Form, storage *storage.Storage, l *logger.Logger, k8sAgent *kubernetes.Agent) *Agent
GetAgentTesting creates a new Agent using an optional existing storage class
func (*Agent) GetRelease ¶
GetRelease returns the info of a release.
func (*Agent) GetReleaseHistory ¶
GetReleaseHistory returns a list of charts for a specific release
func (*Agent) InstallChart ¶
func (a *Agent) InstallChart( conf *InstallChartConfig, doAuth *oauth2.Config, ) (*release.Release, error)
InstallChart installs a new chart
func (*Agent) InstallChartFromValuesBytes ¶
func (a *Agent) InstallChartFromValuesBytes( conf *InstallChartConfig, values []byte, doAuth *oauth2.Config, ) (*release.Release, error)
InstallChartFromValuesBytes reads the raw values and calls Agent.InstallChart
func (*Agent) ListReleases ¶
ListReleases lists releases based on a ListFilter
func (*Agent) RollbackRelease ¶
RollbackRelease rolls a release back to a specified revision/version
func (*Agent) UninstallChart ¶
func (a *Agent) UninstallChart( name string, ) (*release.UninstallReleaseResponse, error)
UninstallChart uninstalls a chart
func (*Agent) UpgradeRelease ¶
func (a *Agent) UpgradeRelease( conf *UpgradeReleaseConfig, values string, doAuth *oauth2.Config, ) (*release.Release, error)
UpgradeRelease upgrades a specific release with new values.yaml
func (*Agent) UpgradeReleaseByValues ¶
func (a *Agent) UpgradeReleaseByValues( conf *UpgradeReleaseConfig, doAuth *oauth2.Config, ) (*release.Release, error)
UpgradeReleaseByValues upgrades a release by unmarshaled yaml values
type DockerSecretsPostRenderer ¶
type DockerSecretsPostRenderer struct { Cluster *models.Cluster Repo repository.Repository Agent *kubernetes.Agent Namespace string DOAuth *oauth2.Config // contains filtered or unexported fields }
DockerSecretsPostRenderer is a Helm post-renderer that adds image pull secrets to pod specs that would otherwise be unable to pull an image.
The post-renderer currently looks for two types of registries: GCR and ECR (TODO: DOCR and Dockerhub). It also detects if the image pull secret is necessary: if GCR image pulls occur in a GKE cluster in the same project, or if ECR image pulls exist in an EKS cluster in the same organization + region, an image pull is not necessary.
type Form ¶
type Form struct { Cluster *models.Cluster `form:"required"` Repo *repository.Repository DigitalOceanOAuth *oauth2.Config Storage string `json:"storage" form:"oneof=secret configmap memory" default:"secret"` Namespace string `json:"namespace"` }
Form represents the options for connecting to a cluster and creating a Helm agent
type InstallChartConfig ¶
type InstallChartConfig struct { Chart *chart.Chart Name string Namespace string Values map[string]interface{} Cluster *models.Cluster Repo repository.Repository Registries []*models.Registry }
InstallChartConfig is the config required to install a chart
type ListFilter ¶
type ListFilter struct { Namespace string `json:"namespace"` Limit int `json:"limit"` Skip int `json:"skip"` ByDate bool `json:"byDate"` StatusFilter []string `json:"statusFilter"` }
ListFilter is a struct that represents the various filter options used for retrieving the releases
type NewStorageDriver ¶
type NewStorageDriver func( l *logger.Logger, v1Interface corev1.CoreV1Interface, namespace string, ) *storage.Storage
NewStorageDriver is a function type for returning a new storage driver
type UpgradeReleaseConfig ¶
type UpgradeReleaseConfig struct { Name string Values map[string]interface{} Cluster *models.Cluster Repo repository.Repository Registries []*models.Registry // Optional, if chart should be overriden Chart *chart.Chart }