Documentation
¶
Index ¶
- func CertificateRevisions(certs []*certmanagerv1.Certificate) (map[string]string, bool)
- func EngageFor(opts []mcbuilder.EngageOptions) []mcbuilder.ForOption
- func EngageOwns(opts []mcbuilder.EngageOptions) []mcbuilder.OwnsOption
- func EngageWatches(opts []mcbuilder.EngageOptions) []mcbuilder.WatchesOption
- func EnqueueAllInNamespace(newList func() ctrlruntimeclient.ObjectList) mchandler.EventHandlerFunc
- func EnqueueMapped(mapFunc ClusterMapFunc) mchandler.EventHandlerFunc
- func FakeSingleCluster(c ctrlruntimeclient.Client) func(context.Context, multicluster.ClusterName) (cluster.Cluster, error)
- func FetchRootShard(ctx context.Context, client ctrlruntimeclient.Client, namespace string, ...) (metav1.Condition, *operatorv1alpha1.RootShard)
- func GetCompiledAvailableCondition(conditions []metav1.Condition, compiledName string) metav1.Condition
- func GetDeploymentAvailableCondition(ctx context.Context, client ctrlruntimeclient.Client, key types.NamespacedName) (metav1.Condition, error)
- func GetRootShardChildren(ctx context.Context, client ctrlruntimeclient.Client, ...) ([]operatorv1alpha1.Shard, error)
- func GetShardPeers(ctx context.Context, client ctrlruntimeclient.Client, ...) ([]deployv1alpha1.ShardPeer, error)
- func GetTestScheme() *runtime.Scheme
- func MutateKeys(m map[string]string, prefix, suffix string) map[string]string
- func UpdateCondition(conditions []metav1.Condition, newCondition metav1.Condition) []metav1.Condition
- type ClusterMapFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertificateRevisions ¶
func CertificateRevisions(certs []*certmanagerv1.Certificate) (map[string]string, bool)
CertificateRevisions returns a map of name to revision for each certificate. It returns false if any Certificate is not ready.
func EngageFor ¶
func EngageFor(opts []mcbuilder.EngageOptions) []mcbuilder.ForOption
EngageFor casts engage options for For. mcbuilder has no controller-wide engage setting, so the same options must be cast per builder method.
func EngageOwns ¶
func EngageOwns(opts []mcbuilder.EngageOptions) []mcbuilder.OwnsOption
EngageOwns casts engage options for Owns.
func EngageWatches ¶
func EngageWatches(opts []mcbuilder.EngageOptions) []mcbuilder.WatchesOption
EngageWatches casts engage options for Watches.
func EnqueueAllInNamespace ¶
func EnqueueAllInNamespace(newList func() ctrlruntimeclient.ObjectList) mchandler.EventHandlerFunc
EnqueueAllInNamespace wakes every object the given list type yields in the changed object's namespace. The compiled controllers mount Secrets they do not own, so an ownership-based watch would never fire for them and a Deployment blocked on a missing mount would never be retried.
func EnqueueMapped ¶
func EnqueueMapped(mapFunc ClusterMapFunc) mchandler.EventHandlerFunc
EnqueueMapped adapts a ClusterMapFunc to Watches, which takes a factory rather than a handler because the cluster is only known once it is engaged.
func FakeSingleCluster ¶
func FakeSingleCluster(c ctrlruntimeclient.Client) func(context.Context, multicluster.ClusterName) (cluster.Cluster, error)
FakeSingleCluster serves the given client for every cluster name, so a reconciler can be tested without a manager or a provider.
func FetchRootShard ¶
func FetchRootShard(ctx context.Context, client ctrlruntimeclient.Client, namespace string, ref *corev1.LocalObjectReference) (metav1.Condition, *operatorv1alpha1.RootShard)
func GetCompiledAvailableCondition ¶
func GetCompiledAvailableCondition(conditions []metav1.Condition, compiledName string) metav1.Condition
GetCompiledAvailableCondition adopts the Available condition published on a Compiled* object, so the source object still reports on the Deployment it no longer owns.
func GetDeploymentAvailableCondition ¶
func GetDeploymentAvailableCondition(ctx context.Context, client ctrlruntimeclient.Client, key types.NamespacedName) (metav1.Condition, error)
func GetRootShardChildren ¶
func GetRootShardChildren(ctx context.Context, client ctrlruntimeclient.Client, rootShard *operatorv1alpha1.RootShard) ([]operatorv1alpha1.Shard, error)
GetRootShardChildren returns all shards that are currently registered with the given root shard. The shards are sorted by name before returning.
func GetShardPeers ¶ added in v0.11.0
func GetShardPeers(ctx context.Context, client ctrlruntimeclient.Client, rootShard *operatorv1alpha1.RootShard, shards []operatorv1alpha1.Shard) ([]deployv1alpha1.ShardPeer, error)
GetShardPeers returns the root shard and all given shards as peers serving the Admin workspace (/services/admin). Like kcp itself, a shard with an external VirtualWorkspace is reached through that VirtualWorkspace, since the shard does not serve /services/ in that case.
func GetTestScheme ¶
func MutateKeys ¶
MutateKeys returns a copy of m with each key wrapped by prefix and suffix.
Types ¶
type ClusterMapFunc ¶
type ClusterMapFunc func(ctx context.Context, client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object) []reconcile.Request
ClusterMapFunc is a handler.MapFunc that also gets a client, because the reverse lookups these controllers watch on have to run against the cluster the event came from.