Documentation ¶
Index ¶
- Constants
- Variables
- type Chart
- func (c Chart) Changelog() string
- func (c *Chart) Condition(source string) (bool, error)
- func (c *Chart) ConditionFromSCM(source string, scm scm.ScmHandler) (bool, error)
- func (c *Chart) DependencyUpdate(out *bytes.Buffer, chartPath string) error
- func (c *Chart) GetRepoIndexFromFile(rootDir string) (repo.IndexFile, error)
- func (c *Chart) GetRepoIndexFromURL() (repo.IndexFile, error)
- func (c *Chart) MetadataUpdate(chartPath string, dryRun bool) error
- func (c *Chart) OCICondition(source string) (bool, error)
- func (c *Chart) OCISource(workingDir string) (string, error)
- func (c *Chart) RequirementsUpdate(chartPath string) error
- func (c *Chart) Source(workingDir string) (string, error)
- func (c *Chart) Target(source string, dryRun bool) (changed bool, err error)
- func (c *Chart) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) (changed bool, files []string, message string, err error)
- func (c *Chart) ValidateTarget() error
- type Spec
Constants ¶
const ( // MINORVERSION defines minor version identifier MINORVERSION string = "minor" // MAJORVERSION defines major version identifier MAJORVERSION string = "major" // PATCHVERSION defines patch version identifier PATCHVERSION string = "patch" // NOINCREMENT disables chart version auto increment NOINCREMENT string = "none" )
const ( // CHANGELOGTEMPLATE contains helm chart changelog information CHANGELOGTEMPLATE string = `` /* 618-byte string literal not displayed */ )
Variables ¶
var ( // ErrWrongConfig is the error message for a wrong helm configuration ErrWrongConfig = errors.New("wrong helm configuration") )
Functions ¶
This section is empty.
Types ¶
type Chart ¶
type Chart struct {
// contains filtered or unexported fields
}
Chart defines a resource of kind helmchart
func New ¶
New returns a reference to a newly initialized Chart object from a Spec or an error if the provided YamlSpec triggers a validation error.
func (*Chart) ConditionFromSCM ¶
ConditionFromSCM returns an error because it's not supported
func (*Chart) DependencyUpdate ¶ added in v0.25.0
DependencyUpdate updates the "Chart.lock" file if needed
func (*Chart) GetRepoIndexFromFile ¶ added in v0.40.0
GetRepoIndexFromFile loads an index file from a local file and does minimal validity checking. It fails if API Version isn't set (ErrNoAPIVersion) or if the "unmarshal" operation fails.
func (*Chart) GetRepoIndexFromURL ¶ added in v0.40.0
GetRepoIndexFromUrl loads an index file and does minimal validity checking. It fails if API Version isn't set (ErrNoAPIVersion) or if the "unmarshal" operation fails.
func (*Chart) MetadataUpdate ¶ added in v0.25.0
MetadataUpdate updates a metadata if necessary and it bump the ChartVersion
func (*Chart) OCICondition ¶ added in v0.41.0
Condition checks if a Helm chart version exists on a OCI registry It assumes that not being able to retrieve the OCI digest, means, the helm chart doesn't exist.
func (*Chart) OCISource ¶ added in v0.41.0
OCISource return a Helm Chart version hosted on a OCI registry
func (*Chart) RequirementsUpdate ¶ added in v0.25.0
RequirementsUpdate test if Updatecli updated the "requirements.yaml" file if it's the case then Updatecli also delete and recreate the "requirements.lock" file
func (*Chart) Target ¶
Target updates helm chart, it receives the default source value and a "dry-run" flag then return if it changed something or failed
func (*Chart) TargetFromSCM ¶
func (c *Chart) TargetFromSCM(source string, scm scm.ScmHandler, dryRun bool) ( changed bool, files []string, message string, err error)
TargetFromSCM updates helm chart then push changed to a scm repository, it receives the default source value and "dry run" flag then return if it changed something or failed
func (*Chart) ValidateTarget ¶
ValidateTarget validates target struct fields.
type Spec ¶
type Spec struct { // [target] Defines the Helm Chart file to update. File string `yaml:",omitempty"` // [target] Defines the key to update within the file. Key string `yaml:",omitempty"` // [target] Defines the Chart name path like 'stable/chart'. Name string `yaml:",omitempty"` // [source,condition] Defines the chart location URL. URL string `yaml:",omitempty"` // [target] Defines the value to set for a key Value string `yaml:",omitempty"` // [source,condition] Defines the Chart version, default value set based on a source input value Version string `yaml:",omitempty"` // [target] Defines if a Chart changes, triggers, or not, a Chart version update, accepted values is a comma separated list of "none,major,minor,patch" VersionIncrement string `yaml:",omitempty"` // [target] Enable AppVersion update based in source input. AppVersion bool `yaml:",omitempty"` // VersionFilter provides parameters to specify version pattern and its type like 'regex', 'semver', or just 'latest'. VersionFilter version.Filter `yaml:",omitempty"` // Credentials used to authenticate with OCI registries docker.InlineKeyChain `yaml:",inline" mapstructure:",squash"` }
Spec defines a specification for an "helmchart" resource parsed from an updatecli manifest file