Documentation
¶
Index ¶
- type AppConfig
- type ChartFromGitRepo
- type ChartFromLocalPath
- type ChartSource
- type ChartSpec
- func (c ChartSpec) Dir(chartsDir, localChartsDir string, subChartName string) string
- func (c ChartSpec) Ensure(ctx context.Context, forcePull bool, chartsDir, localChartsDir string, ...) error
- func (c ChartSpec) SubChartNames(chartsDir, localChartsDir string) ([]string, error)
- func (c ChartSpec) Validate(repos map[string]*RepoSpec) error
- type Config
- type DeploymentSpec
- type DeploymentState
- type Environment
- func (e Environment) Apply(ctx context.Context, dryRunArg, envDir string, charts map[string]*ChartSpec) error
- func (e Environment) CustomManifestsDir(envDir string, dep *DeploymentSpec) string
- func (e Environment) Ensure(ctx context.Context, chartsDir, localChartsDir, envDir string, ...) error
- func (e Environment) Gen(ctx context.Context, chartsDir, localChartsDir, envDir string, ...) error
- func (e Environment) ManifestsDir(envDir string) string
- func (e Environment) Validate(charts map[string]*ChartSpec) error
- func (e Environment) ValuesDir(envDir string) string
- type RepoSpec
- type ResolvedConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
Log log.ConfigSet `json:"log" yaml:"log"`
DebugHelm bool `json:"debugHelm" yaml:"debugHelm"`
// ChartsDir for chart cache
ChartsDir string `json:"chartsDir" yaml:"chartsDir"`
// EnvironmentsDir for environment values
EnvironmentsDir string `json:"environmentsDir" yaml:"environmentsDir"`
// LocalChartsDir for charts stored locally
LocalChartsDir string `json:"localChartsDir" yaml:"localChartsDir"`
}
type ChartFromGitRepo ¶
type ChartFromGitRepo struct {
// URL for repo (git/http)
URL string `json:"url" yaml:"url"`
// Path in the repo
Path string `json:"path" yaml:"path"`
}
func (*ChartFromGitRepo) Validate ¶
func (g *ChartFromGitRepo) Validate() error
type ChartFromLocalPath ¶
type ChartFromLocalPath struct {
}
func (*ChartFromLocalPath) Validate ¶
func (l *ChartFromLocalPath) Validate() error
type ChartSource ¶
type ChartSource struct {
Git *ChartFromGitRepo `json:"git" yaml:"git"`
Local *ChartFromLocalPath `json:"local" yaml:"local"`
}
type ChartSpec ¶
type ChartSpec struct {
Name string `json:"name" yaml:"name"`
// Source of the chart, if nil, the Name MUST be in <repo-name>/<chart-name> format
*ChartSource `json:",inline" yaml:",inline"`
// NamespaceInTemplate means there is already proper namespace information defined in its templates
// and apply with `kubectl --namespace` will fail (mostly for rbac resources)
NamespaceInTemplate bool `json:"namespaceInTemplate" yaml:"namespaceInTemplate"`
}
func (ChartSpec) Ensure ¶
func (c ChartSpec) Ensure( ctx context.Context, forcePull bool, chartsDir, localChartsDir string, repos map[string]*RepoSpec, ) error
nolint:gocyclo
func (ChartSpec) SubChartNames ¶
type Config ¶
type Config struct {
App AppConfig `json:"app" yaml:"app"`
Repos []RepoSpec `json:"repos" yaml:"repos"`
Charts []ChartSpec `json:"charts" yaml:"charts"`
Environments []Environment `json:"environments" yaml:"environments"`
}
type DeploymentSpec ¶
type DeploymentSpec struct {
// Name value for <namespace>/<fullnameOverride>
Name string `json:"name" yaml:"name"`
// Chart name listed in the configuration
Chart string `json:"chart" yaml:"chart"`
State string `json:"state" yaml:"state"`
// BaseValues the values file name
BaseValues string `json:"baseValues" yaml:"baseValues"`
// ExcludeChartCRDs to apply crds dir in chart
ExcludeChartCRDs bool `json:"excludeChartCRDs" yaml:"excludeChartCRDs"`
}
func (DeploymentSpec) Filename ¶
func (c DeploymentSpec) Filename(subChart string) string
func (DeploymentSpec) GetState ¶
func (c DeploymentSpec) GetState() DeploymentState
func (DeploymentSpec) NamespaceAndName ¶
func (c DeploymentSpec) NamespaceAndName() (namespace, name string)
type DeploymentState ¶
type DeploymentState struct {
Present bool
CRDPresent bool
// set --validate=false to kubectl
DisableValidation bool
UnknownStates string
}
func (DeploymentState) Validate ¶
func (s DeploymentState) Validate() error
type Environment ¶
type Environment struct {
Name string `json:"name" yaml:"name"`
KubeContext string `json:"kubeContext" yaml:"kubeContext"`
Deployments []DeploymentSpec `json:"deployments" yaml:"deployments"`
}
func (Environment) CustomManifestsDir ¶
func (e Environment) CustomManifestsDir(envDir string, dep *DeploymentSpec) string
func (Environment) Gen ¶
func (e Environment) Gen( ctx context.Context, chartsDir, localChartsDir, envDir string, charts map[string]*ChartSpec, ) error
nolint:gocyclo
func (Environment) ManifestsDir ¶
func (e Environment) ManifestsDir(envDir string) string
func (Environment) ValuesDir ¶
func (e Environment) ValuesDir(envDir string) string
type RepoSpec ¶
type RepoSpec struct {
Name string `json:"name" yaml:"name"`
URL string `json:"url" yaml:"url"`
Auth struct {
HTTPBasic struct {
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password"`
} `json:"httpBasic" yaml:"httpBasic"`
} `json:"auth" yaml:"auth"`
TLS tlshelper.TLSConfig `json:"tls" yaml:"tls"`
}
type ResolvedConfig ¶
type ResolvedConfig struct {
App *AppConfig
Repos map[string]*RepoSpec
Charts map[string]*ChartSpec
Environments map[string]*Environment
}
func NewEmptyResolvedConfig ¶
func NewEmptyResolvedConfig() *ResolvedConfig
Click to show internal directories.
Click to hide internal directories.