Documentation ¶
Index ¶
- Constants
- Variables
- func AppendHelmReleaseToString(content string, newRelease *helmv2beta1.HelmRelease) (string, error)
- func MakeHelmRelease(name, version, cluster, namespace string, helmRepository types.NamespacedName) *helmv2beta1.HelmRelease
- func MarshalHelmReleases(existingReleases []*helmv2beta1.HelmRelease) (string, error)
- func SplitHelmReleaseYAML(resources []byte) ([]*helmv2beta1.HelmRelease, error)
- type ChartPredicate
- type ChartReference
- type HelmRepoManager
- type RepoManager
Constants ¶
const DefaultBufferSize = 2048
const LayerAnnotation = "weave.works/layer"
LayerAnnotation specifies profile application order. Profiles are sorted by layer and those at a higher "layer" are only installed after lower layers have successfully installed and started.
const ProfileAnnotation = "weave.works/profile"
ProfileAnnotation is the annotation that Helm charts must have to indicate that they provide a Profile.
Variables ¶
var Profiles = func(v *repo.ChartVersion) bool { return hasAnnotation(v.Metadata, ProfileAnnotation) }
Profiles is a predicate for scanning charts with the ProfileAnnotation.
Functions ¶
func AppendHelmReleaseToString ¶ added in v0.7.0
func AppendHelmReleaseToString(content string, newRelease *helmv2beta1.HelmRelease) (string, error)
AppendHelmReleaseToString appends "---" and a HelmRelease to string that may or may not be empty. This creates the content of a manifest that contains HelmReleases separated by "---".
func MakeHelmRelease ¶ added in v0.7.0
func MakeHelmRelease(name, version, cluster, namespace string, helmRepository types.NamespacedName) *helmv2beta1.HelmRelease
MakeHelmRelease returns a HelmRelease object given a name, version, cluster, namespace, and HelmRepository's name and namespace.
func MarshalHelmReleases ¶ added in v0.7.0
func MarshalHelmReleases(existingReleases []*helmv2beta1.HelmRelease) (string, error)
MarshalHelmReleases marshals a list of HelmReleases.
func SplitHelmReleaseYAML ¶ added in v0.7.0
func SplitHelmReleaseYAML(resources []byte) ([]*helmv2beta1.HelmRelease, error)
SplitHelmReleaseYAML splits a manifest file that contains one or more Helm Releases that may be separated by '---'.
Types ¶
type ChartPredicate ¶
type ChartPredicate func(*repo.ChartVersion) bool
type ChartReference ¶
ChartReference is a Helm chart reference
type HelmRepoManager ¶ added in v0.6.1
type HelmRepoManager interface { ListCharts(ctx context.Context, hr *sourcev1beta1.HelmRepository, pred ChartPredicate) ([]*pb.Profile, error) GetValuesFile(ctx context.Context, helmRepo *sourcev1beta1.HelmRepository, c *ChartReference, filename string) ([]byte, error) }
type RepoManager ¶
RepoManager implements HelmRepoManager interface using the Helm library packages.
func NewRepoManager ¶
func NewRepoManager(kc client.Client, cacheDir string) *RepoManager
NewRepoManager creates and returns a new RepoManager.
func (*RepoManager) GetValuesFile ¶
func (h *RepoManager) GetValuesFile(ctx context.Context, helmRepo *sourcev1beta1.HelmRepository, c *ChartReference, filename string) ([]byte, error)
GetValuesFile fetches the value file from a chart.
func (*RepoManager) ListCharts ¶ added in v0.6.1
func (h *RepoManager) ListCharts(ctx context.Context, hr *sourcev1beta1.HelmRepository, pred ChartPredicate) ([]*pb.Profile, error)
ListCharts filters charts using the provided predicate.
Directories ¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
cache/cachefakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
controller/controllerfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |