deps: update K8s dependencies (#1599)

* deps: update K8s dependencies

* deps: bump controller runtime

* chore: tidy

* bump helm and migrate controller runtime

* fix helm deprecation

---------

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
Co-authored-by: Leonard Cohnen <lc@edgeless.systems>
This commit is contained in:
renovate[bot] 2023-05-24 18:57:45 +02:00 committed by GitHub
parent 81c9c5205c
commit 2afddcb0f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 467 additions and 1773 deletions

View file

@ -23,7 +23,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"sigs.k8s.io/controller-runtime/pkg/source"
)
const (
@ -122,15 +121,15 @@ func (r *JoiningNodesReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&updatev1alpha1.JoiningNode{}).
Watches(
&source.Kind{Type: &corev1.Node{}},
client.Object(&corev1.Node{}),
handler.EnqueueRequestsFromMapFunc(r.findAllJoiningNodes),
).
Complete(r)
}
func (r *JoiningNodesReconciler) findAllJoiningNodes(obj client.Object) []reconcile.Request {
func (r *JoiningNodesReconciler) findAllJoiningNodes(ctx context.Context, obj client.Object) []reconcile.Request {
var joiningNodesList updatev1alpha1.JoiningNodeList
err := r.List(context.TODO(), &joiningNodesList, client.MatchingFields{joiningNodeNameKey: obj.GetName()})
err := r.List(ctx, &joiningNodesList, client.MatchingFields{joiningNodeNameKey: obj.GetName()})
if err != nil {
return []reconcile.Request{}
}