{"modulePath":"github.com/kcp-dev/kcp-operator","version":"v0.9.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package bundle\n\n## Functions\n\n```go\nfunc EnsureBundleForOwner(ctx context.Context, client ctrlruntimeclient.Client, scheme *runtime.Scheme, owner ctrlruntimeclient.Object) (*operatorv1alpha1.Bundle, error)\n```\nEnsureBundleForOwner ensures that a Bundle object exists for the given owner if it has the bundle annotation. If the annotation is present and no Bundle exists, it creates one owned by the object. Returns the Bundle object if it exists/was created, or nil if no bundle annotation is present.\n\n```go\nfunc GetBundleObjectsForTarget(target operatorv1alpha1.BundleTarget, namespace string, shard *operatorv1alpha1.Shard, rootShard *operatorv1alpha1.RootShard, frontProxy *operatorv1alpha1.FrontProxy) []operatorv1alpha1.BundleObject\n```\nGetBundleObjectsForTarget returns the list of objects required for a Bundle based on the target\n\n```go\nfunc GetBundleReadyCondition(ctx context.Context, client ctrlruntimeclient.Client, owner ctrlruntimeclient.Object, generation int64) metav1.Condition\n```\nGetBundleReadyCondition checks if the Bundle associated with the owner is ready. Returns a condition that can be added to the owner's status.\n\n## Types\n\n```go\ntype BundleObjectSpec struct {\n\t// TargetKind is the kind of the target object (RootShard, Shard, FrontProxy)\n\tTargetKind string\n\t// Objects is the list of objects that should be included in the bundle\n\tObjects []operatorv1alpha1.BundleObject\n}\n```\nBundleObjectSpec defines the required objects for a specific target type\n\n```go\ntype BundleReconciler struct {\n\tGetCluster func(ctx context.Context, clusterName multicluster.ClusterName) (cluster.Cluster, error)\n}\n```\nBundleReconciler reconciles a Bundle object\n\n```go\nfunc (r *BundleReconciler) Reconcile(ctx context.Context, req mcreconcile.Request) (res ctrl.Result, recErr error)\n```\nReconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.\n\n```go\nfunc (r *BundleReconciler) SetupWithManager(mgr mcmanager.Manager, opts ...mcbuilder.EngageOptions) error\n```\nSetupWithManager sets up the controller with the Manager.\n\n","path":"github.com/kcp-dev/kcp-operator/pkg/controller/bundle","name":"bundle","synopsis":"","isRedistributable":true}
