1
0

add webhook

This commit is contained in:
2023-09-06 17:52:39 +08:00
parent 586abdfd7b
commit b2972195cb
12 changed files with 882 additions and 12 deletions

View File

@@ -20,15 +20,11 @@ type ServiceReconciler struct {
//+kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;
func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
l := ctrl.LoggerFrom(ctx)
var svc corev1.Service
err := r.client.Get(ctx, req.NamespacedName, &svc)
if errors.IsNotFound(err) {
return ctrl.Result{}, nil
}
l.Info("got svc")
return ctrl.Result{}, nil
}