From e5bbad6b2a830d3a3e5f0c5fa39a29ec745619e6 Mon Sep 17 00:00:00 2001 From: Arnau Verdaguer Date: Wed, 7 Aug 2024 13:57:58 +0200 Subject: [PATCH] [daemonset] Make get method public Needed-by: https://github.com/openstack-k8s-operators/ovn-operator/pull/337 Related: OSPRH-7463 (cherry picked from commit 321e10be6badfb256ed2e8f417db116c7b679771) --- modules/common/daemonset/daemonset.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/common/daemonset/daemonset.go b/modules/common/daemonset/daemonset.go index ec3d21b7..57ad5674 100644 --- a/modules/common/daemonset/daemonset.go +++ b/modules/common/daemonset/daemonset.go @@ -83,7 +83,7 @@ func (d *DaemonSet) CreateOrPatch( } // update the daemonset object of the daemonset type - d.daemonset, err = getDaemonSetWithName(ctx, h, daemonset.GetName(), daemonset.GetNamespace()) + d.daemonset, err = GetDaemonSetWithName(ctx, h, daemonset.GetName(), daemonset.GetNamespace()) if err != nil { if k8s_errors.IsNotFound(err) { return ctrl.Result{RequeueAfter: d.timeout}, nil @@ -112,7 +112,8 @@ func (d *DaemonSet) GetDaemonSet() appsv1.DaemonSet { return *d.daemonset } -func getDaemonSetWithName( +// GetDaemonSetWithName - get the daemonset object with a given name. +func GetDaemonSetWithName( ctx context.Context, h *helper.Helper, name string,