Documentation ¶
Index ¶
- func IsInvalidConfig(err error) bool
- func IsNotFound(err error) bool
- func IsReleaseAlreadyExists(err error) bool
- func IsReleaseNotFound(err error) bool
- func IsReleaseStatusNotMatching(err error) bool
- func IsReleaseVersionNotMatching(err error) bool
- func IsTarballNotFound(err error) bool
- func IsTillerNotFound(err error) bool
- func IsWait(err error) bool
- type ChartInfo
- type ConditionFunc
- type ConditionSet
- type Config
- type Release
- func (r *Release) Condition() ConditionSet
- func (r *Release) Delete(ctx context.Context, name string) error
- func (r *Release) EnsureDeleted(ctx context.Context, name string, conditions ...ConditionFunc) error
- func (r *Release) EnsureInstalled(ctx context.Context, name string, chartInfo ChartInfo, values string, ...) error
- func (r *Release) Install(ctx context.Context, name string, chartInfo ChartInfo, values string, ...) error
- func (r *Release) InstallOperator(ctx context.Context, name string, chartInfo ChartInfo, values string, ...) error
- func (r *Release) Update(ctx context.Context, name string, chartInfo ChartInfo, values string, ...) error
- func (r *Release) WaitForChartInfo(ctx context.Context, release string, version string) error
- func (r *Release) WaitForStatus(ctx context.Context, release string, status string) error
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsReleaseAlreadyExists ¶
IsReleaseAlreadyExists asserts releaseAlreadyExistsError.
func IsReleaseNotFound ¶
IsReleaseNotFound asserts releaseNotFoundError.
func IsReleaseStatusNotMatching ¶
IsReleaseStatusNotMatching asserts releaseStatusNotMatchingError
func IsReleaseVersionNotMatching ¶
IsReleaseVersionNotMatching asserts releaseVersionNotMatchingError
func IsTarballNotFound ¶
IsTarballNotFound asserts tarballNotFoundError.
func IsTillerNotFound ¶
IsTillerNotFound asserts tillerNotFoundError.
Types ¶
type ChartInfo ¶
type ChartInfo struct {
// contains filtered or unexported fields
}
func NewChannelChartInfo ¶
func NewChartInfo ¶
func NewStableChartInfo ¶
type ConditionFunc ¶
type ConditionFunc func() error
type ConditionSet ¶
type ConditionSet interface { // CRDExists returns a function waiting for the CRD to appear in the // Kubernetes API described by the given definition. CRDExists(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) ConditionFunc // CRDNotFound returns a function waiting for the CRD to disappear in // the Kubernetes API described by the given definition. CRDNotFound(ctx context.Context, crd *apiextensionsv1beta1.CustomResourceDefinition) ConditionFunc // PodExists returns a function waiting for a Pod to appear in the // Kubernetes API described by the given label selector. PodExists(ctx context.Context, namespace, labelSelector string) ConditionFunc // PodNotFound returns a function waiting for a Pod to disappear in the // Kubernetes API described by the given label selector. PodNotFound(ctx context.Context, namespace, labelSelector string) ConditionFunc // SecretExists returns a function waiting for the Secret to appear in the // Kubernetes API described by the given name. SecretExists(ctx context.Context, namespace, name string) ConditionFunc // SecretNotFound returns a function waiting for the Secret to // disappear in the Kubernetes API described by the given name. SecretNotFound(ctx context.Context, namespace, name string) ConditionFunc }
type Config ¶
type Config struct { ApprClient *apprclient.Client ExtClient apiextensionsclient.Interface G8sClient versioned.Interface HelmClient *helmclient.Client K8sClient kubernetes.Interface Logger micrologger.Logger Namespace string }
type Release ¶
type Release struct {
// contains filtered or unexported fields
}
func (*Release) Condition ¶
func (r *Release) Condition() ConditionSet
func (*Release) EnsureDeleted ¶
func (r *Release) EnsureDeleted(ctx context.Context, name string, conditions ...ConditionFunc) error
EnsureDeleted makes sure the release is deleted and purged and all conditions are met.
func (*Release) EnsureInstalled ¶
func (r *Release) EnsureInstalled(ctx context.Context, name string, chartInfo ChartInfo, values string, conditions ...ConditionFunc) error
EnsureInstalled makes sure the release is installed and all conditions are met. If release name ends with "-operator" suffix it also selects a "app=${name}" pod and streams it logs to the ./logs directory.
NOTE: It does not update the release if it already exists.
func (*Release) InstallOperator ¶
func (r *Release) InstallOperator(ctx context.Context, name string, chartInfo ChartInfo, values string, crd *apiextensionsv1beta1.CustomResourceDefinition) error
TODO Remove once we are done with migration to EnsureInstalled.
Issue https://github.com/giantswarm/giantswarm/issues/4355.
func (*Release) WaitForChartInfo ¶
type Version ¶
type Version = ChartInfo
Version is an **alias** for ChartInfo. See https://golang.org/doc/go1.9#language.
func NewStableVersion ¶
func NewStableVersion() Version
NewStableVersion is a compatibility method used for transition period only. Use NewStableChartInfo instead. For the transition period both versions of the code will have the same semantics.
r.Install(ctx, "apiextensions-aws-config-e2e", NewStableChartInfo("apiextensions-aws-config-e2e-chart"), values) r.Install(ctx, "apiextensions-aws-config-e2e", NewStableVersion(), values))
The new ChartInfo struct was introduced to solve the problem of installing multiple releases of the same chart. E.g.
r.Install(ctx, "release-1", NewStableChartInfo("apiextensions-aws-config-e2e-chart"), values) r.Install(ctx, "release-2", NewStableChartInfo("apiextensions-aws-config-e2e-chart"), values)
func NewVersion ¶
NewVersion is a compatibility method used for transition period only. Use NewChartInfo instead. For the transition period both versions of the code will have the same semantics.
r.Install(ctx, "apiextensions-aws-config-e2e", NewChartInfo("apiextensions-aws-config-e2e-chart", "afae404f496389dd955e70dfc78e898aa6726265"), values) r.Install(ctx, "apiextensions-aws-config-e2e", NewVersion("afae404f496389dd955e70dfc78e898aa6726265"), values))
The new ChartInfo struct was introduced to solve the problem of installing multiple releases of the same chart. E.g.
r.Install(ctx, "release-1", NewChartInfo("apiextensions-aws-config-e2e-chart", "afae404f496389dd955e70dfc78e898aa6726265"), values) r.Install(ctx, "release-2", NewChartInfo("apiextensions-aws-config-e2e-chart", "afae404f496389dd955e70dfc78e898aa6726265"), values)