Documentation ¶
Index ¶
- Constants
- func BundleDeploymentProvisionerFilter(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 DeepHashObject(hasher hash.Hash, objectToWrite interface{})
- func GenerateBundleName(bdName, hash string) string
- func GenerateTemplateHash(template *rukpakv1alpha1.BundleTemplate) string
- func GetBundlesForBundleDeploymentSelector(ctx context.Context, c client.Client, bd *rukpakv1alpha1.BundleDeployment) (*rukpakv1alpha1.BundleList, error)
- func LoadCertPool(certFile string) (*x509.CertPool, error)
- func MapBundleDeploymentToBundles(ctx context.Context, c client.Client, bd rukpakv1alpha1.BundleDeployment) *rukpakv1alpha1.BundleList
- func MapBundleToBundleDeploymentHandler(cl client.Client, log logr.Logger) handler.MapFunc
- func MapBundleToBundleDeployments(ctx context.Context, c client.Client, b rukpakv1alpha1.Bundle) []*rukpakv1alpha1.BundleDeployment
- func MapOwneeToOwnerProvisionerHandler(ctx context.Context, cl client.Client, log logr.Logger, ...) handler.EventHandler
- func MergeMaps(maps ...map[string]string) map[string]string
- func NewBundleDeploymentLabelSelector(bd *rukpakv1alpha1.BundleDeployment) 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)
- type ProvisionerClassNameGetter
Constants ¶
const ( CoreOwnerKindKey = "core.rukpak.io/owner-kind" CoreOwnerNameKey = "core.rukpak.io/owner-name" CoreBundleTemplateHashKey = "core.rukpak.io/bundle-template-hash" )
Variables ¶
This section is empty.
Functions ¶
func BundleDeploymentProvisionerFilter ¶ added in v0.6.0
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 hash is equal to the desiredBundle Bundle template hash.
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 BundleDeployment 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 DeepHashObject ¶ added in v0.5.0
DeepHashObject writes specified object to hash using the spew library which follows pointers and prints actual values of the nested objects ensuring the hash does not change when a pointer changes. From https://github.com/operator-framework/operator-lifecycle-manager/blob/master/pkg/lib/kubernetes/pkg/util/hash/hash.go
func GenerateBundleName ¶ added in v0.4.0
func GenerateTemplateHash ¶ added in v0.5.0
func GenerateTemplateHash(template *rukpakv1alpha1.BundleTemplate) string
func GetBundlesForBundleDeploymentSelector ¶ added in v0.6.0
func GetBundlesForBundleDeploymentSelector(ctx context.Context, c client.Client, bd *rukpakv1alpha1.BundleDeployment) (*rukpakv1alpha1.BundleList, error)
GetBundlesForBundleDeploymentSelector is responsible for returning a list of Bundle resource that exist on cluster that match the label selector specified in the BD parameter's spec.Selector field.
func MapBundleDeploymentToBundles ¶ added in v0.6.0
func MapBundleDeploymentToBundles(ctx context.Context, c client.Client, bd rukpakv1alpha1.BundleDeployment) *rukpakv1alpha1.BundleList
func MapBundleToBundleDeploymentHandler ¶ added in v0.6.0
func MapBundleToBundleDeployments ¶ added in v0.6.0
func MapBundleToBundleDeployments(ctx context.Context, c client.Client, b rukpakv1alpha1.Bundle) []*rukpakv1alpha1.BundleDeployment
func MapOwneeToOwnerProvisionerHandler ¶ added in v0.5.0
func MapOwneeToOwnerProvisionerHandler(ctx context.Context, cl client.Client, log logr.Logger, provisionerClassName string, owner ProvisionerClassNameGetter) handler.EventHandler
MapOwneeToOwnerProvisionerHandler is a handler implementation that finds an owner reference in the event object that references the provided owner. If a reference for the provided owner is found AND that owner's provisioner class name matches the provided provisionerClassName, this handler enqueues a request for that owner to be reconciled.
func NewBundleDeploymentLabelSelector ¶ added in v0.6.0
func NewBundleDeploymentLabelSelector(bd *rukpakv1alpha1.BundleDeployment) labels.Selector
NewBundleDeploymentLabelSelector is responsible for constructing a label.Selector for any underlying resources that are associated with the BundleDeployment 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.