Skip to content

Commit ddde68f

Browse files
committed
UPSTREAM: <carry>: Export internal code from k8s.io/apimachinery/pkg/util/managedfields
Some of the code we use in openshift-tests was recently made internal in kubernetes#115065. This patch exposes the code we need there.
1 parent b26def1 commit ddde68f

File tree

1 file changed

+15
-0
lines changed
  • staging/src/k8s.io/apimachinery/pkg/util/managedfields

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package managedfields
2+
3+
import (
4+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5+
"k8s.io/apimachinery/pkg/util/managedfields/internal"
6+
)
7+
8+
// ManagedInterface groups a fieldpath.ManagedFields together with the timestamps associated with each operation.
9+
type ManagedInterface = internal.ManagedInterface
10+
11+
// DecodeManagedFields converts ManagedFields from the wire format (api format)
12+
// to the format used by sigs.k8s.io/structured-merge-diff
13+
func DecodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (ManagedInterface, error) {
14+
return internal.DecodeManagedFields(encodedManagedFields)
15+
}

0 commit comments

Comments
 (0)