Documentation ¶
Index ¶
- Constants
- func BundleInstanceProvisionerFilter(provisionerClassName string) predicate.Predicate
- func BundleLabels(bundleName string) map[string]string
- func BundleProvisionerFilter(provisionerClassName string) predicate.Predicate
- func CheckDesiredBundleTemplate(existingBundle *rukpakv1alpha1.Bundle, ...) bool
- func CheckExistingBundlesMatchesTemplate(existingBundles *rukpakv1alpha1.BundleList, ...) *rukpakv1alpha1.Bundle
- func CreateOrRecreate(ctx context.Context, cl client.Client, obj client.Object, ...) (controllerutil.OperationResult, error)
- func GenerateBundleName(biName string) string
- func GetBundlesForBundleInstanceSelector(ctx context.Context, c client.Client, bi *rukpakv1alpha1.BundleInstance) (*rukpakv1alpha1.BundleList, error)
- func MapBundleInstanceToBundles(ctx context.Context, c client.Client, bi rukpakv1alpha1.BundleInstance) *rukpakv1alpha1.BundleList
- func MapBundleToBundleInstanceHandler(cl client.Client, log logr.Logger) handler.MapFunc
- func MapBundleToBundleInstances(ctx context.Context, c client.Client, b rukpakv1alpha1.Bundle) []*rukpakv1alpha1.BundleInstance
- func MergeMaps(maps ...map[string]string) map[string]string
- func NewBundleInstanceLabelSelector(bi *rukpakv1alpha1.BundleInstance) labels.Selector
- func NewBundleLabelSelector(bundle *rukpakv1alpha1.Bundle) labels.Selector
- func PodName(provisionerName, bundleName string) string
- func PodNamespace(defaultNamespace string) string
- func SortBundlesByCreation(bundles *rukpakv1alpha1.BundleList)
Constants ¶
const ( CoreOwnerKindKey = "core.rukpak.io/owner-kind" CoreOwnerNameKey = "core.rukpak.io/owner-name" )
Variables ¶
This section is empty.
Functions ¶
func BundleLabels ¶
func BundleProvisionerFilter ¶
func CheckDesiredBundleTemplate ¶ added in v0.4.0
func CheckDesiredBundleTemplate(existingBundle *rukpakv1alpha1.Bundle, desiredBundle *rukpakv1alpha1.BundleTemplate) bool
CheckDesiredBundleTemplate is responsible for determining whether the existingBundle parameter is semantically equal to the desiredBundle Bundle template.
func CheckExistingBundlesMatchesTemplate ¶ added in v0.4.0
func CheckExistingBundlesMatchesTemplate(existingBundles *rukpakv1alpha1.BundleList, desiredBundleTemplate *rukpakv1alpha1.BundleTemplate) *rukpakv1alpha1.Bundle
CheckExistingBundlesMatchesTemplate evaluates whether the existing list of Bundle objects match the desired Bundle template that's specified in a BundleInstance object. If a match is found, that Bundle object is returned, so callers are responsible for nil checking the result.
func CreateOrRecreate ¶
func CreateOrRecreate(ctx context.Context, cl client.Client, obj client.Object, f controllerutil.MutateFn) (controllerutil.OperationResult, error)
func GenerateBundleName ¶ added in v0.4.0
GenerateBundleName is responsible for generating a unique Bundle metadata.Name using the biName parameter as the base.
func GetBundlesForBundleInstanceSelector ¶ added in v0.4.0
func GetBundlesForBundleInstanceSelector(ctx context.Context, c client.Client, bi *rukpakv1alpha1.BundleInstance) (*rukpakv1alpha1.BundleList, error)
GetBundlesForBundleInstanceSelector is responsible for returning a list of Bundle resource that exist on cluster that match the label selector specified in the BI parameter's spec.Selector field.
func MapBundleInstanceToBundles ¶ added in v0.4.0
func MapBundleInstanceToBundles(ctx context.Context, c client.Client, bi rukpakv1alpha1.BundleInstance) *rukpakv1alpha1.BundleList
func MapBundleToBundleInstances ¶ added in v0.4.0
func MapBundleToBundleInstances(ctx context.Context, c client.Client, b rukpakv1alpha1.Bundle) []*rukpakv1alpha1.BundleInstance
func NewBundleInstanceLabelSelector ¶ added in v0.3.0
func NewBundleInstanceLabelSelector(bi *rukpakv1alpha1.BundleInstance) labels.Selector
NewBundleInstanceLabelSelector is responsible for constructing a label.Selector for any underlying resources that are associated with the BundleInstance parameter.
func NewBundleLabelSelector ¶
func NewBundleLabelSelector(bundle *rukpakv1alpha1.Bundle) labels.Selector
NewBundleLabelSelector is responsible for constructing a label.Selector for any underlying resources that are associated with the Bundle parameter.
func PodNamespace ¶
GetPodNamespace checks whether the controller is running in a Pod vs. being run locally by inspecting the namespace file that gets mounted automatically for Pods at runtime. If that file doesn't exist, then return the @defaultNamespace namespace parameter.
func SortBundlesByCreation ¶ added in v0.4.0
func SortBundlesByCreation(bundles *rukpakv1alpha1.BundleList)
SortBundlesByCreation sorts a BundleList's items by it's metadata.CreationTimestamp value.
Types ¶
This section is empty.