Re-generate extract functions

Kubernetes-commit: a24e8acc32d7c0380a7b2c8a2f500b48891a9987
This commit is contained in:
Joe Betz
2021-03-19 15:28:20 -07:00
committed by Kubernetes Publisher
parent d3fbdeba9a
commit 0fd603dad0
98 changed files with 1176 additions and 98 deletions

View File

@@ -59,8 +59,19 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration {
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractReplicaSet(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
return extractReplicaSet(replicaSet, fieldManager, "")
}
// ExtractReplicaSetStatus is the same as ExtractReplicaSet except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractReplicaSetStatus(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
return extractReplicaSet(replicaSet, fieldManager, "status")
}
func extractReplicaSet(replicaSet *extensionsv1beta1.ReplicaSet, fieldManager string, subresource string) (*ReplicaSetApplyConfiguration, error) {
b := &ReplicaSetApplyConfiguration{}
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.ReplicaSet"), fieldManager, b)
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.ReplicaSet"), fieldManager, b, subresource)
if err != nil {
return nil, err
}