Update k8s dependencies to v1.22.0-rc.0

This commit is contained in:
Chris Henzie
2021-07-27 17:45:59 -07:00
parent e6e14c1601
commit 59725e39fe
708 changed files with 25967 additions and 20268 deletions

View File

@@ -50,7 +50,7 @@ func Job(name, namespace string) *JobApplyConfiguration {
// ExtractJob extracts the applied configuration owned by fieldManager from
// job. If no managedFields are found in job for fieldManager, a
// JobApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. Is is possible that no managed fields were found for because other
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// job must be a unmodified Job API object that was retrieved from the Kubernetes API.
@@ -59,8 +59,19 @@ func Job(name, namespace string) *JobApplyConfiguration {
// applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental!
func ExtractJob(job *apibatchv1.Job, fieldManager string) (*JobApplyConfiguration, error) {
return extractJob(job, fieldManager, "")
}
// ExtractJobStatus is the same as ExtractJob except
// that it extracts the status subresource applied configuration.
// Experimental!
func ExtractJobStatus(job *apibatchv1.Job, fieldManager string) (*JobApplyConfiguration, error) {
return extractJob(job, fieldManager, "status")
}
func extractJob(job *apibatchv1.Job, fieldManager string, subresource string) (*JobApplyConfiguration, error) {
b := &JobApplyConfiguration{}
err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b)
err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b, subresource)
if err != nil {
return nil, err
}