Documentation ¶
Index ¶
- Variables
- func EnsureChartFetched(client helm.Client, base string, source *helmfluxv1.RepoChartSource) (string, bool, error)
- type ChartNotReadyError
- type ChartUnavailableError
- type GitAuthError
- type GitChartSync
- func (c *GitChartSync) Delete(hr *v1.HelmRelease) bool
- func (c *GitChartSync) GetMirrorCopy(hr *v1.HelmRelease) (*git.Export, string, error)
- func (c *GitChartSync) Run(stopCh <-chan struct{}, errCh chan error, wg *sync.WaitGroup)
- func (c *GitChartSync) SyncMirror(hr *v1.HelmRelease) error
- func (c *GitChartSync) SyncMirrors()
- type GitConfig
- type ReleaseQueue
Constants ¶
This section is empty.
Variables ¶
var ( ErrReleasesForMirror = errors.New("failed to get HelmRelease resources for mirror") ErrNoMirror = errors.New("no existing git mirror found") ErrMirrorSync = errors.New("failed syncing git mirror") )
Various (final) errors.
Functions ¶
func EnsureChartFetched ¶
func EnsureChartFetched(client helm.Client, base string, source *helmfluxv1.RepoChartSource) (string, bool, error)
EnsureChartFetched returns the path to a downloaded chart, fetching it first if necessary. It returns the (expected) path to the chart, a boolean indicating a fetch, and either an error or nil.
Types ¶
type ChartNotReadyError ¶
type ChartNotReadyError struct {
Err error
}
ChartNotReadyError is returned when the requested chart is unavailable at the moment, but may become at available a later stage without any interference from a human.
func (ChartNotReadyError) Error ¶
func (err ChartNotReadyError) Error() string
func (ChartNotReadyError) Unwrap ¶
func (err ChartNotReadyError) Unwrap() error
type ChartUnavailableError ¶
type ChartUnavailableError struct {
}ChartUnavailableError is returned when the requested chart is unavailable, and the reason is known and finite.
func (ChartUnavailableError) Error ¶
func (err ChartUnavailableError) Error() string
func (ChartUnavailableError) Unwrap ¶
func (err ChartUnavailableError) Unwrap() error
type GitAuthError ¶
type GitAuthError struct {
Err error
}
GitAuthError presents a error that has occured when handling the git auth details
func (GitAuthError) Error ¶
func (err GitAuthError) Error() string
func (GitAuthError) Unwrap ¶
func (err GitAuthError) Unwrap() error
type GitChartSync ¶
type GitChartSync struct {
// contains filtered or unexported fields
}
GitChartSync syncs `sourceRef`s with their mirrors, and queues updates for `v1.HelmRelease`s the sync changes are relevant for.
func NewGitChartSync ¶
func NewGitChartSync(logger log.Logger, coreV1Client corev1client.CoreV1Interface, lister lister.HelmReleaseLister, cfg GitConfig, queue ReleaseQueue) *GitChartSync
func (*GitChartSync) Delete ¶
func (c *GitChartSync) Delete(hr *v1.HelmRelease) bool
Delete cleans up the source reference for the given `v1.HelmRelease`, this includes the mirror if there is no reference to it from sources. It returns a boolean indicating a successful removal (`true` if so, `false` otherwise).
func (*GitChartSync) GetMirrorCopy ¶
func (c *GitChartSync) GetMirrorCopy(hr *v1.HelmRelease) (*git.Export, string, error)
GetMirrorCopy returns a newly exported copy of the git mirror at the recorded HEAD and a string with the HEAD commit hash, or an error.
func (*GitChartSync) Run ¶
func (c *GitChartSync) Run(stopCh <-chan struct{}, errCh chan error, wg *sync.WaitGroup)
Run starts the mirroring of git repositories, and processes mirror changes on signal, scheduling a release for a `HelmRelease` resource when the update is relevant to the release.
func (*GitChartSync) SyncMirror ¶ added in v1.3.0
func (c *GitChartSync) SyncMirror(hr *v1.HelmRelease) error
SyncMirror instructs the helmrelease's git mirror to sync from its upstream
func (*GitChartSync) SyncMirrors ¶
func (c *GitChartSync) SyncMirrors()
SyncMirrors instructs all git mirrors to sync from their respective upstreams.
type GitConfig ¶
type GitConfig struct { GitTimeout time.Duration GitPollInterval time.Duration GitDefaultRef string }
GitConfig holds the configuration for git operations.
type ReleaseQueue ¶
type ReleaseQueue interface {
AddRateLimited(item interface{})
}
ReleaseQueue is an add-only `workqueue.RateLimitingInterface`