Feature/kubernetes api access (#17)

Co-authored-by: M Essam Hamed <github@messam.xyz>
This commit is contained in:
Maycon Santos
2025-03-30 21:16:44 +02:00
committed by GitHub
co-authored by M Essam Hamed
parent 219ee9a0b6
commit c4d73d83b1
3 changed files with 85 additions and 1 deletions
@@ -58,6 +58,12 @@ func (r *ServiceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
return ctrl.Result{}, nil
}
// Special case for kubernetes API Service
// Handled by Helm chart
if svc.Namespace == "default" && svc.Name == "kubernetes" {
return ctrl.Result{}, nil
}
_, shouldExpose := svc.Annotations[ServiceExposeAnnotation]
// If Service is being deleted, un-expose