Documentation ¶
Index ¶
- func GetClusterNameNs(ns string) (clusterName, namespace string)
- func MuiltClustersEnqueue(clusterName string) handler.EventHandler
- type TestJobReconciler
- func (r *TestJobReconciler) GetClient(name string) client.Client
- func (r *TestJobReconciler) GetClientByNs(ns string) client.Client
- func (r *TestJobReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *TestJobReconciler) SetupWithManager(mgr ctrl.Manager, cs map[string]cluster.Cluster) error
- type TestReconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterNameNs ¶
GetClusterNameNs 获取集群名称和 NS
func MuiltClustersEnqueue ¶
func MuiltClustersEnqueue(clusterName string) handler.EventHandler
MuiltClustersEnqueue 多集群入队器 将集群名称附加在 Namespace 上
Types ¶
type TestJobReconciler ¶
type TestJobReconciler struct { // 主集群 client client.Client // 所有集群的客户端列表 Clients map[string]client.Client Scheme *runtime.Scheme }
TestJobReconciler reconciles a Test object
func NewTestJobReconciler ¶
func NewTestJobReconciler(mgr ctrl.Manager, clusters map[string]cluster.Cluster) (*TestJobReconciler, error)
NewTestReconciler ...
func (*TestJobReconciler) GetClient ¶
func (r *TestJobReconciler) GetClient(name string) client.Client
GetClient by cluster name
func (*TestJobReconciler) GetClientByNs ¶
func (r *TestJobReconciler) GetClientByNs(ns string) client.Client
GetClientByNs 通过命名空间获取 client
func (*TestJobReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type TestReconciler ¶
type TestReconciler struct { // 主集群 client client.Client // 所有集群的客户端列表 Clients map[string]client.Client Scheme *runtime.Scheme }
TestReconciler reconciles a Test object
func NewTestReconciler ¶
func NewTestReconciler(mgr ctrl.Manager, clusters map[string]cluster.Cluster) (*TestReconciler, error)
NewTestReconciler ...
func (*TestReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.2/pkg/reconcile
func (*TestReconciler) SetupWithManager ¶
func (r *TestReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Click to show internal directories.
Click to hide internal directories.