Merge pull request #305 from darkowlzz/rm-util-objectkey
This commit is contained in:
commit
8ffa994a76
|
|
@ -710,7 +710,7 @@ func (r *HelmReleaseReconciler) requestsForHelmChartChange(o client.Object) []re
|
|||
ctx := context.Background()
|
||||
var list v2.HelmReleaseList
|
||||
if err := r.List(ctx, &list, client.MatchingFields{
|
||||
v2.SourceIndexKey: util.ObjectKey(hc).String(),
|
||||
v2.SourceIndexKey: client.ObjectKeyFromObject(hc).String(),
|
||||
}); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -722,7 +722,7 @@ func (r *HelmReleaseReconciler) requestsForHelmChartChange(o client.Object) []re
|
|||
if hc.GetArtifact().Revision == i.Status.LastAttemptedRevision {
|
||||
continue
|
||||
}
|
||||
reqs = append(reqs, reconcile.Request{NamespacedName: util.ObjectKey(&i)})
|
||||
reqs = append(reqs, reconcile.Request{NamespacedName: client.ObjectKeyFromObject(&i)})
|
||||
}
|
||||
return reqs
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ import (
|
|||
|
||||
"helm.sh/helm/v3/pkg/chartutil"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"sigs.k8s.io/controller-runtime/pkg/client"
|
||||
)
|
||||
|
||||
// ValuesChecksum calculates and returns the SHA1 checksum for the
|
||||
|
|
@ -43,11 +41,3 @@ func ReleaseRevision(rel *release.Release) int {
|
|||
}
|
||||
return rel.Version
|
||||
}
|
||||
|
||||
// ObjectKey returns client.ObjectKey for the object.
|
||||
func ObjectKey(object metav1.Object) client.ObjectKey {
|
||||
return client.ObjectKey{
|
||||
Namespace: object.GetNamespace(),
|
||||
Name: object.GetName(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue