Documentation ¶
Index ¶
- Constants
- func CheckStatus(ctx context.Context, status *edgev1beta1.EdgeTaskResourceStatus, ...)
- func EdgeClusterTrigger(ctx context.Context, cli client.Client) handler.EventHandler
- func EdgeTaskResourceEventsFromEvents(events []corev1.Event) []edgev1beta1.EdgeTaskResourceEvent
- func ExtractEdgeTask(obj client.Object) (name string, namespace string)
- func FindOwnerControllerRecursively(ctx context.Context, cli client.Client, obj client.Object) (client.Object, error)
- func GetEdgeTaskCondition(status *edgev1beta1.EdgeTaskStatus, ...) (int, *edgev1beta1.EdgeTaskCondition)
- func HashResources(obj any) string
- func InjectEdgeTask(obj client.Object, edgetask *edgev1beta1.EdgeTask)
- func ParseResources(resources []runtime.RawExtension) ([]*unstructured.Unstructured, error)
- func ParseResourcesTyped(resources []runtime.RawExtension, schema *runtime.Scheme) ([]client.Object, error)
- func RemoveEdgeTaskCondition(status *edgev1beta1.EdgeTaskStatus, ...)
- func Run(ctx context.Context, options *Options) error
- func UpdateEdgeTaskCondition(task *edgev1beta1.EdgeTask, condition edgev1beta1.EdgeTaskCondition)
- type EdgeClientsHolder
- type EdgeClusterEvent
- type EdgeClusterResourceChangedCallback
- type Options
- type Reconciler
Constants ¶
View Source
const ( AnnotationEdgeTaskResourcesHash = "edge.kubegems.io/resources-hash" AnnotationEdgeTaskNameNamespace = "edge.kubegems.io/edge-task" )
View Source
const ( IndexFieldEdgeTaskStatusPhase = "status.phase" IndexFieldEdgeTaskSpecEdgeClusterName = "spec.edgeClusterName" IndexFieldEdgeClusterStatusPhase = "status.phase" )
View Source
const DefaultEdgeResourceQueueSize = 1024
Variables ¶
This section is empty.
Functions ¶
func CheckStatus ¶
func CheckStatus(ctx context.Context, status *edgev1beta1.EdgeTaskResourceStatus, edgeresource client.Object, edgecli client.Client)
func EdgeClusterTrigger ¶
func EdgeTaskResourceEventsFromEvents ¶
func EdgeTaskResourceEventsFromEvents(events []corev1.Event) []edgev1beta1.EdgeTaskResourceEvent
func GetEdgeTaskCondition ¶
func GetEdgeTaskCondition(status *edgev1beta1.EdgeTaskStatus, conditionType edgev1beta1.EdgeTaskConditionType) (int, *edgev1beta1.EdgeTaskCondition)
func HashResources ¶
func InjectEdgeTask ¶
func InjectEdgeTask(obj client.Object, edgetask *edgev1beta1.EdgeTask)
func ParseResources ¶
func ParseResources(resources []runtime.RawExtension) ([]*unstructured.Unstructured, error)
func ParseResourcesTyped ¶
func RemoveEdgeTaskCondition ¶
func RemoveEdgeTaskCondition(status *edgev1beta1.EdgeTaskStatus, conditionType edgev1beta1.EdgeTaskConditionType)
func UpdateEdgeTaskCondition ¶
func UpdateEdgeTaskCondition(task *edgev1beta1.EdgeTask, condition edgev1beta1.EdgeTaskCondition)
Types ¶
type EdgeClientsHolder ¶
type EdgeClientsHolder struct {
// contains filtered or unexported fields
}
func NewEdgeClientsHolder ¶
func NewEdgeClientsHolder(ctx context.Context, server string) (*EdgeClientsHolder, error)
func (*EdgeClientsHolder) Invalid ¶
func (c *EdgeClientsHolder) Invalid(uid string)
func (*EdgeClientsHolder) SourceFunc ¶
Start behaves like controller-runtime's source.Source interface
type EdgeClusterEvent ¶
type Options ¶
type Options struct { MaxConcurrentReconciles int `json:"maxConcurrentReconciles,omitempty"` HealthProbeBindAddress string `json:"healthProbeBindAddress,omitempty"` MetricsBindAddress string `json:"metricsBindAddress,omitempty"` EdgeServerAddr string `json:"edgeServerAddr,omitempty"` EdgeNamespace string `json:"edgeNamespace,omitempty"` }
func NewDefaultOptions ¶
func NewDefaultOptions() *Options
type Reconciler ¶
type Reconciler struct { client.Client EdgeClients *EdgeClientsHolder }
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options *Options) error
nolint: forcetypeassert
Click to show internal directories.
Click to hide internal directories.