Generated apply configurations
This commit is contained in:
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationAppl
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a
|
||||
// MutatingWebhookConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *apiadmissionregistrationv1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
|
||||
b := &MutatingWebhookConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(mutatingWebhookConfiguration.Name)
|
||||
|
||||
b.WithKind("MutatingWebhookConfiguration")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiadmissionregistrationv1 "k8s.io/api/admissionregistration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfiguration
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a
|
||||
// ValidatingWebhookConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractValidatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *apiadmissionregistrationv1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
|
||||
b := &ValidatingWebhookConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(validatingWebhookConfiguration.Name)
|
||||
|
||||
b.WithKind("ValidatingWebhookConfiguration")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func MutatingWebhookConfiguration(name string) *MutatingWebhookConfigurationAppl
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractMutatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// mutatingWebhookConfiguration. If no managedFields are found in mutatingWebhookConfiguration for fieldManager, a
|
||||
// MutatingWebhookConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// mutatingWebhookConfiguration must be a unmodified MutatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractMutatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractMutatingWebhookConfiguration(mutatingWebhookConfiguration *admissionregistrationv1beta1.MutatingWebhookConfiguration, fieldManager string) (*MutatingWebhookConfigurationApplyConfiguration, error) {
|
||||
b := &MutatingWebhookConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(mutatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(mutatingWebhookConfiguration.Name)
|
||||
|
||||
b.WithKind("MutatingWebhookConfiguration")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func ValidatingWebhookConfiguration(name string) *ValidatingWebhookConfiguration
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractValidatingWebhookConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// validatingWebhookConfiguration. If no managedFields are found in validatingWebhookConfiguration for fieldManager, a
|
||||
// ValidatingWebhookConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// validatingWebhookConfiguration must be a unmodified ValidatingWebhookConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractValidatingWebhookConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractValidatingWebhookConfiguration(validatingWebhookConfiguration *admissionregistrationv1beta1.ValidatingWebhookConfiguration, fieldManager string) (*ValidatingWebhookConfigurationApplyConfiguration, error) {
|
||||
b := &ValidatingWebhookConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(validatingWebhookConfiguration, internal.Parser().Type("io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(validatingWebhookConfiguration.Name)
|
||||
|
||||
b.WithKind("ValidatingWebhookConfiguration")
|
||||
b.WithAPIVersion("admissionregistration.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -22,6 +22,8 @@ import (
|
||||
v1alpha1 "k8s.io/api/apiserverinternal/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +46,30 @@ func StorageVersion(name string) *StorageVersionApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStorageVersion extracts the applied configuration owned by fieldManager from
|
||||
// storageVersion. If no managedFields are found in storageVersion for fieldManager, a
|
||||
// StorageVersionApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// storageVersion must be a unmodified StorageVersion API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStorageVersion provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStorageVersion(storageVersion *v1alpha1.StorageVersion, fieldManager string) (*StorageVersionApplyConfiguration, error) {
|
||||
b := &StorageVersionApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageVersion, internal.Parser().Type("io.k8s.api.apiserverinternal.v1alpha1.StorageVersion"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageVersion.Name)
|
||||
|
||||
b.WithKind("StorageVersion")
|
||||
b.WithAPIVersion("internal.apiserver.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
appsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -45,6 +48,31 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractControllerRevision extracts the applied configuration owned by fieldManager from
|
||||
// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a
|
||||
// ControllerRevisionApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API.
|
||||
// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractControllerRevision(controllerRevision *appsv1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
|
||||
b := &ControllerRevisionApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1.ControllerRevision"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(controllerRevision.Name)
|
||||
b.WithNamespace(controllerRevision.Namespace)
|
||||
|
||||
b.WithKind("ControllerRevision")
|
||||
b.WithAPIVersion("apps/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiappsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDaemonSet extracts the applied configuration owned by fieldManager from
|
||||
// daemonSet. If no managedFields are found in daemonSet for fieldManager, a
|
||||
// DaemonSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDaemonSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDaemonSet(daemonSet *apiappsv1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) {
|
||||
b := &DaemonSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1.DaemonSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(daemonSet.Name)
|
||||
b.WithNamespace(daemonSet.Namespace)
|
||||
|
||||
b.WithKind("DaemonSet")
|
||||
b.WithAPIVersion("apps/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiappsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeployment extracts the applied configuration owned by fieldManager from
|
||||
// deployment. If no managedFields are found in deployment for fieldManager, a
|
||||
// DeploymentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeployment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDeployment(deployment *apiappsv1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
|
||||
b := &DeploymentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1.Deployment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deployment.Name)
|
||||
b.WithNamespace(deployment.Namespace)
|
||||
|
||||
b.WithKind("Deployment")
|
||||
b.WithAPIVersion("apps/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiappsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractReplicaSet extracts the applied configuration owned by fieldManager from
|
||||
// replicaSet. If no managedFields are found in replicaSet for fieldManager, a
|
||||
// ReplicaSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractReplicaSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractReplicaSet(replicaSet *apiappsv1.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
|
||||
b := &ReplicaSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1.ReplicaSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(replicaSet.Name)
|
||||
b.WithNamespace(replicaSet.Namespace)
|
||||
|
||||
b.WithKind("ReplicaSet")
|
||||
b.WithAPIVersion("apps/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiappsv1 "k8s.io/api/apps/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStatefulSet extracts the applied configuration owned by fieldManager from
|
||||
// statefulSet. If no managedFields are found in statefulSet for fieldManager, a
|
||||
// StatefulSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStatefulSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStatefulSet(statefulSet *apiappsv1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
b := &StatefulSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1.StatefulSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(statefulSet.Name)
|
||||
b.WithNamespace(statefulSet.Namespace)
|
||||
|
||||
b.WithKind("StatefulSet")
|
||||
b.WithAPIVersion("apps/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/apps/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -45,6 +48,31 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractControllerRevision extracts the applied configuration owned by fieldManager from
|
||||
// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a
|
||||
// ControllerRevisionApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API.
|
||||
// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractControllerRevision(controllerRevision *v1beta1.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
|
||||
b := &ControllerRevisionApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1beta1.ControllerRevision"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(controllerRevision.Name)
|
||||
b.WithNamespace(controllerRevision.Namespace)
|
||||
|
||||
b.WithKind("ControllerRevision")
|
||||
b.WithAPIVersion("apps/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
appsv1beta1 "k8s.io/api/apps/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeployment extracts the applied configuration owned by fieldManager from
|
||||
// deployment. If no managedFields are found in deployment for fieldManager, a
|
||||
// DeploymentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeployment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDeployment(deployment *appsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
|
||||
b := &DeploymentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta1.Deployment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deployment.Name)
|
||||
b.WithNamespace(deployment.Namespace)
|
||||
|
||||
b.WithKind("Deployment")
|
||||
b.WithAPIVersion("apps/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
appsv1beta1 "k8s.io/api/apps/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStatefulSet extracts the applied configuration owned by fieldManager from
|
||||
// statefulSet. If no managedFields are found in statefulSet for fieldManager, a
|
||||
// StatefulSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStatefulSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStatefulSet(statefulSet *appsv1beta1.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
b := &StatefulSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta1.StatefulSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(statefulSet.Name)
|
||||
b.WithNamespace(statefulSet.Namespace)
|
||||
|
||||
b.WithKind("StatefulSet")
|
||||
b.WithAPIVersion("apps/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
v1beta2 "k8s.io/api/apps/v1beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -45,6 +48,31 @@ func ControllerRevision(name, namespace string) *ControllerRevisionApplyConfigur
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractControllerRevision extracts the applied configuration owned by fieldManager from
|
||||
// controllerRevision. If no managedFields are found in controllerRevision for fieldManager, a
|
||||
// ControllerRevisionApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// controllerRevision must be a unmodified ControllerRevision API object that was retrieved from the Kubernetes API.
|
||||
// ExtractControllerRevision provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractControllerRevision(controllerRevision *v1beta2.ControllerRevision, fieldManager string) (*ControllerRevisionApplyConfiguration, error) {
|
||||
b := &ControllerRevisionApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(controllerRevision, internal.Parser().Type("io.k8s.api.apps.v1beta2.ControllerRevision"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(controllerRevision.Name)
|
||||
b.WithNamespace(controllerRevision.Namespace)
|
||||
|
||||
b.WithKind("ControllerRevision")
|
||||
b.WithAPIVersion("apps/v1beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDaemonSet extracts the applied configuration owned by fieldManager from
|
||||
// daemonSet. If no managedFields are found in daemonSet for fieldManager, a
|
||||
// DaemonSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDaemonSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDaemonSet(daemonSet *appsv1beta2.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) {
|
||||
b := &DaemonSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.DaemonSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(daemonSet.Name)
|
||||
b.WithNamespace(daemonSet.Namespace)
|
||||
|
||||
b.WithKind("DaemonSet")
|
||||
b.WithAPIVersion("apps/v1beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeployment extracts the applied configuration owned by fieldManager from
|
||||
// deployment. If no managedFields are found in deployment for fieldManager, a
|
||||
// DeploymentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeployment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDeployment(deployment *appsv1beta2.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
|
||||
b := &DeploymentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.apps.v1beta2.Deployment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deployment.Name)
|
||||
b.WithNamespace(deployment.Namespace)
|
||||
|
||||
b.WithKind("Deployment")
|
||||
b.WithAPIVersion("apps/v1beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractReplicaSet extracts the applied configuration owned by fieldManager from
|
||||
// replicaSet. If no managedFields are found in replicaSet for fieldManager, a
|
||||
// ReplicaSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractReplicaSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractReplicaSet(replicaSet *appsv1beta2.ReplicaSet, fieldManager string) (*ReplicaSetApplyConfiguration, error) {
|
||||
b := &ReplicaSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.ReplicaSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(replicaSet.Name)
|
||||
b.WithNamespace(replicaSet.Namespace)
|
||||
|
||||
b.WithKind("ReplicaSet")
|
||||
b.WithAPIVersion("apps/v1beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
appsv1beta2 "k8s.io/api/apps/v1beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func StatefulSet(name, namespace string) *StatefulSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStatefulSet extracts the applied configuration owned by fieldManager from
|
||||
// statefulSet. If no managedFields are found in statefulSet for fieldManager, a
|
||||
// StatefulSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// statefulSet must be a unmodified StatefulSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStatefulSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStatefulSet(statefulSet *appsv1beta2.StatefulSet, fieldManager string) (*StatefulSetApplyConfiguration, error) {
|
||||
b := &StatefulSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(statefulSet, internal.Parser().Type("io.k8s.api.apps.v1beta2.StatefulSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(statefulSet.Name)
|
||||
b.WithNamespace(statefulSet.Namespace)
|
||||
|
||||
b.WithKind("StatefulSet")
|
||||
b.WithAPIVersion("apps/v1beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apiautoscalingv1 "k8s.io/api/autoscaling/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from
|
||||
// horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a
|
||||
// HorizontalPodAutoscalerApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API.
|
||||
// ExtractHorizontalPodAutoscaler provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *apiautoscalingv1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) {
|
||||
b := &HorizontalPodAutoscalerApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(horizontalPodAutoscaler.Name)
|
||||
b.WithNamespace(horizontalPodAutoscaler.Namespace)
|
||||
|
||||
b.WithKind("HorizontalPodAutoscaler")
|
||||
b.WithAPIVersion("autoscaling/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v2beta1
|
||||
|
||||
import (
|
||||
autoscalingv2beta1 "k8s.io/api/autoscaling/v2beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from
|
||||
// horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a
|
||||
// HorizontalPodAutoscalerApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API.
|
||||
// ExtractHorizontalPodAutoscaler provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta1.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) {
|
||||
b := &HorizontalPodAutoscalerApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(horizontalPodAutoscaler.Name)
|
||||
b.WithNamespace(horizontalPodAutoscaler.Namespace)
|
||||
|
||||
b.WithKind("HorizontalPodAutoscaler")
|
||||
b.WithAPIVersion("autoscaling/v2beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v2beta2
|
||||
|
||||
import (
|
||||
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func HorizontalPodAutoscaler(name, namespace string) *HorizontalPodAutoscalerApp
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractHorizontalPodAutoscaler extracts the applied configuration owned by fieldManager from
|
||||
// horizontalPodAutoscaler. If no managedFields are found in horizontalPodAutoscaler for fieldManager, a
|
||||
// HorizontalPodAutoscalerApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// horizontalPodAutoscaler must be a unmodified HorizontalPodAutoscaler API object that was retrieved from the Kubernetes API.
|
||||
// ExtractHorizontalPodAutoscaler provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractHorizontalPodAutoscaler(horizontalPodAutoscaler *autoscalingv2beta2.HorizontalPodAutoscaler, fieldManager string) (*HorizontalPodAutoscalerApplyConfiguration, error) {
|
||||
b := &HorizontalPodAutoscalerApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(horizontalPodAutoscaler, internal.Parser().Type("io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(horizontalPodAutoscaler.Name)
|
||||
b.WithNamespace(horizontalPodAutoscaler.Namespace)
|
||||
|
||||
b.WithKind("HorizontalPodAutoscaler")
|
||||
b.WithAPIVersion("autoscaling/v2beta2")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apibatchv1 "k8s.io/api/batch/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCronJob extracts the applied configuration owned by fieldManager from
|
||||
// cronJob. If no managedFields are found in cronJob for fieldManager, a
|
||||
// CronJobApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCronJob provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCronJob(cronJob *apibatchv1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) {
|
||||
b := &CronJobApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1.CronJob"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cronJob.Name)
|
||||
b.WithNamespace(cronJob.Namespace)
|
||||
|
||||
b.WithKind("CronJob")
|
||||
b.WithAPIVersion("batch/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apibatchv1 "k8s.io/api/batch/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Job(name, namespace string) *JobApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// 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
|
||||
// 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.
|
||||
// ExtractJob provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// 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) {
|
||||
b := &JobApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(job, internal.Parser().Type("io.k8s.api.batch.v1.Job"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(job.Name)
|
||||
b.WithNamespace(job.Namespace)
|
||||
|
||||
b.WithKind("Job")
|
||||
b.WithAPIVersion("batch/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func CronJob(name, namespace string) *CronJobApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCronJob extracts the applied configuration owned by fieldManager from
|
||||
// cronJob. If no managedFields are found in cronJob for fieldManager, a
|
||||
// CronJobApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cronJob must be a unmodified CronJob API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCronJob provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCronJob(cronJob *batchv1beta1.CronJob, fieldManager string) (*CronJobApplyConfiguration, error) {
|
||||
b := &CronJobApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cronJob, internal.Parser().Type("io.k8s.api.batch.v1beta1.CronJob"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cronJob.Name)
|
||||
b.WithNamespace(cronJob.Namespace)
|
||||
|
||||
b.WithKind("CronJob")
|
||||
b.WithAPIVersion("batch/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicertificatesv1 "k8s.io/api/certificates/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCertificateSigningRequest extracts the applied configuration owned by fieldManager from
|
||||
// certificateSigningRequest. If no managedFields are found in certificateSigningRequest for fieldManager, a
|
||||
// CertificateSigningRequestApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// certificateSigningRequest must be a unmodified CertificateSigningRequest API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCertificateSigningRequest provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCertificateSigningRequest(certificateSigningRequest *apicertificatesv1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) {
|
||||
b := &CertificateSigningRequestApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1.CertificateSigningRequest"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(certificateSigningRequest.Name)
|
||||
|
||||
b.WithKind("CertificateSigningRequest")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
certificatesv1beta1 "k8s.io/api/certificates/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func CertificateSigningRequest(name string) *CertificateSigningRequestApplyConfi
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCertificateSigningRequest extracts the applied configuration owned by fieldManager from
|
||||
// certificateSigningRequest. If no managedFields are found in certificateSigningRequest for fieldManager, a
|
||||
// CertificateSigningRequestApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// certificateSigningRequest must be a unmodified CertificateSigningRequest API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCertificateSigningRequest provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCertificateSigningRequest(certificateSigningRequest *certificatesv1beta1.CertificateSigningRequest, fieldManager string) (*CertificateSigningRequestApplyConfiguration, error) {
|
||||
b := &CertificateSigningRequestApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(certificateSigningRequest, internal.Parser().Type("io.k8s.api.certificates.v1beta1.CertificateSigningRequest"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(certificateSigningRequest.Name)
|
||||
|
||||
b.WithKind("CertificateSigningRequest")
|
||||
b.WithAPIVersion("certificates.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicoordinationv1 "k8s.io/api/coordination/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Lease(name, namespace string) *LeaseApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractLease extracts the applied configuration owned by fieldManager from
|
||||
// lease. If no managedFields are found in lease for fieldManager, a
|
||||
// LeaseApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// lease must be a unmodified Lease API object that was retrieved from the Kubernetes API.
|
||||
// ExtractLease provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractLease(lease *apicoordinationv1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
|
||||
b := &LeaseApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1.Lease"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(lease.Name)
|
||||
b.WithNamespace(lease.Namespace)
|
||||
|
||||
b.WithKind("Lease")
|
||||
b.WithAPIVersion("coordination.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
coordinationv1beta1 "k8s.io/api/coordination/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Lease(name, namespace string) *LeaseApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractLease extracts the applied configuration owned by fieldManager from
|
||||
// lease. If no managedFields are found in lease for fieldManager, a
|
||||
// LeaseApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// lease must be a unmodified Lease API object that was retrieved from the Kubernetes API.
|
||||
// ExtractLease provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractLease(lease *coordinationv1beta1.Lease, fieldManager string) (*LeaseApplyConfiguration, error) {
|
||||
b := &LeaseApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(lease, internal.Parser().Type("io.k8s.api.coordination.v1beta1.Lease"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(lease.Name)
|
||||
b.WithNamespace(lease.Namespace)
|
||||
|
||||
b.WithKind("Lease")
|
||||
b.WithAPIVersion("coordination.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func ComponentStatus(name string) *ComponentStatusApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractComponentStatus extracts the applied configuration owned by fieldManager from
|
||||
// componentStatus. If no managedFields are found in componentStatus for fieldManager, a
|
||||
// ComponentStatusApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// componentStatus must be a unmodified ComponentStatus API object that was retrieved from the Kubernetes API.
|
||||
// ExtractComponentStatus provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractComponentStatus(componentStatus *apicorev1.ComponentStatus, fieldManager string) (*ComponentStatusApplyConfiguration, error) {
|
||||
b := &ComponentStatusApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(componentStatus, internal.Parser().Type("io.k8s.api.core.v1.ComponentStatus"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(componentStatus.Name)
|
||||
|
||||
b.WithKind("ComponentStatus")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -45,6 +48,31 @@ func ConfigMap(name, namespace string) *ConfigMapApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractConfigMap extracts the applied configuration owned by fieldManager from
|
||||
// configMap. If no managedFields are found in configMap for fieldManager, a
|
||||
// ConfigMapApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// configMap must be a unmodified ConfigMap API object that was retrieved from the Kubernetes API.
|
||||
// ExtractConfigMap provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractConfigMap(configMap *corev1.ConfigMap, fieldManager string) (*ConfigMapApplyConfiguration, error) {
|
||||
b := &ConfigMapApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(configMap, internal.Parser().Type("io.k8s.api.core.v1.ConfigMap"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(configMap.Name)
|
||||
b.WithNamespace(configMap.Namespace)
|
||||
|
||||
b.WithKind("ConfigMap")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Endpoints(name, namespace string) *EndpointsApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEndpoints extracts the applied configuration owned by fieldManager from
|
||||
// endpoints. If no managedFields are found in endpoints for fieldManager, a
|
||||
// EndpointsApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// endpoints must be a unmodified Endpoints API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEndpoints provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEndpoints(endpoints *apicorev1.Endpoints, fieldManager string) (*EndpointsApplyConfiguration, error) {
|
||||
b := &EndpointsApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(endpoints, internal.Parser().Type("io.k8s.api.core.v1.Endpoints"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(endpoints.Name)
|
||||
b.WithNamespace(endpoints.Namespace)
|
||||
|
||||
b.WithKind("Endpoints")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -56,6 +59,31 @@ func Event(name, namespace string) *EventApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEvent extracts the applied configuration owned by fieldManager from
|
||||
// event. If no managedFields are found in event for fieldManager, a
|
||||
// EventApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// event must be a unmodified Event API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEvent(event *apicorev1.Event, fieldManager string) (*EventApplyConfiguration, error) {
|
||||
b := &EventApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.core.v1.Event"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(event.Name)
|
||||
b.WithNamespace(event.Namespace)
|
||||
|
||||
b.WithKind("Event")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func LimitRange(name, namespace string) *LimitRangeApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractLimitRange extracts the applied configuration owned by fieldManager from
|
||||
// limitRange. If no managedFields are found in limitRange for fieldManager, a
|
||||
// LimitRangeApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// limitRange must be a unmodified LimitRange API object that was retrieved from the Kubernetes API.
|
||||
// ExtractLimitRange provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractLimitRange(limitRange *apicorev1.LimitRange, fieldManager string) (*LimitRangeApplyConfiguration, error) {
|
||||
b := &LimitRangeApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(limitRange, internal.Parser().Type("io.k8s.api.core.v1.LimitRange"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(limitRange.Name)
|
||||
b.WithNamespace(limitRange.Namespace)
|
||||
|
||||
b.WithKind("LimitRange")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func Namespace(name string) *NamespaceApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractNamespace extracts the applied configuration owned by fieldManager from
|
||||
// namespace. If no managedFields are found in namespace for fieldManager, a
|
||||
// NamespaceApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// namespace must be a unmodified Namespace API object that was retrieved from the Kubernetes API.
|
||||
// ExtractNamespace provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractNamespace(namespace *apicorev1.Namespace, fieldManager string) (*NamespaceApplyConfiguration, error) {
|
||||
b := &NamespaceApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(namespace, internal.Parser().Type("io.k8s.api.core.v1.Namespace"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(namespace.Name)
|
||||
|
||||
b.WithKind("Namespace")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func Node(name string) *NodeApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractNode extracts the applied configuration owned by fieldManager from
|
||||
// node. If no managedFields are found in node for fieldManager, a
|
||||
// NodeApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// node must be a unmodified Node API object that was retrieved from the Kubernetes API.
|
||||
// ExtractNode provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractNode(node *apicorev1.Node, fieldManager string) (*NodeApplyConfiguration, error) {
|
||||
b := &NodeApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(node, internal.Parser().Type("io.k8s.api.core.v1.Node"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(node.Name)
|
||||
|
||||
b.WithKind("Node")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func PersistentVolume(name string) *PersistentVolumeApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPersistentVolume extracts the applied configuration owned by fieldManager from
|
||||
// persistentVolume. If no managedFields are found in persistentVolume for fieldManager, a
|
||||
// PersistentVolumeApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// persistentVolume must be a unmodified PersistentVolume API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPersistentVolume provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPersistentVolume(persistentVolume *apicorev1.PersistentVolume, fieldManager string) (*PersistentVolumeApplyConfiguration, error) {
|
||||
b := &PersistentVolumeApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(persistentVolume, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolume"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(persistentVolume.Name)
|
||||
|
||||
b.WithKind("PersistentVolume")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func PersistentVolumeClaim(name, namespace string) *PersistentVolumeClaimApplyCo
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPersistentVolumeClaim extracts the applied configuration owned by fieldManager from
|
||||
// persistentVolumeClaim. If no managedFields are found in persistentVolumeClaim for fieldManager, a
|
||||
// PersistentVolumeClaimApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// persistentVolumeClaim must be a unmodified PersistentVolumeClaim API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPersistentVolumeClaim provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPersistentVolumeClaim(persistentVolumeClaim *apicorev1.PersistentVolumeClaim, fieldManager string) (*PersistentVolumeClaimApplyConfiguration, error) {
|
||||
b := &PersistentVolumeClaimApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(persistentVolumeClaim, internal.Parser().Type("io.k8s.api.core.v1.PersistentVolumeClaim"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(persistentVolumeClaim.Name)
|
||||
b.WithNamespace(persistentVolumeClaim.Namespace)
|
||||
|
||||
b.WithKind("PersistentVolumeClaim")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Pod(name, namespace string) *PodApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPod extracts the applied configuration owned by fieldManager from
|
||||
// pod. If no managedFields are found in pod for fieldManager, a
|
||||
// PodApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// pod must be a unmodified Pod API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPod provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPod(pod *apicorev1.Pod, fieldManager string) (*PodApplyConfiguration, error) {
|
||||
b := &PodApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(pod, internal.Parser().Type("io.k8s.api.core.v1.Pod"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(pod.Name)
|
||||
b.WithNamespace(pod.Namespace)
|
||||
|
||||
b.WithKind("Pod")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func PodTemplate(name, namespace string) *PodTemplateApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodTemplate extracts the applied configuration owned by fieldManager from
|
||||
// podTemplate. If no managedFields are found in podTemplate for fieldManager, a
|
||||
// PodTemplateApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podTemplate must be a unmodified PodTemplate API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodTemplate provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPodTemplate(podTemplate *apicorev1.PodTemplate, fieldManager string) (*PodTemplateApplyConfiguration, error) {
|
||||
b := &PodTemplateApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podTemplate, internal.Parser().Type("io.k8s.api.core.v1.PodTemplate"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podTemplate.Name)
|
||||
b.WithNamespace(podTemplate.Namespace)
|
||||
|
||||
b.WithKind("PodTemplate")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func ReplicationController(name, namespace string) *ReplicationControllerApplyCo
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractReplicationController extracts the applied configuration owned by fieldManager from
|
||||
// replicationController. If no managedFields are found in replicationController for fieldManager, a
|
||||
// ReplicationControllerApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// replicationController must be a unmodified ReplicationController API object that was retrieved from the Kubernetes API.
|
||||
// ExtractReplicationController provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractReplicationController(replicationController *apicorev1.ReplicationController, fieldManager string) (*ReplicationControllerApplyConfiguration, error) {
|
||||
b := &ReplicationControllerApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(replicationController, internal.Parser().Type("io.k8s.api.core.v1.ReplicationController"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(replicationController.Name)
|
||||
b.WithNamespace(replicationController.Namespace)
|
||||
|
||||
b.WithKind("ReplicationController")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func ResourceQuota(name, namespace string) *ResourceQuotaApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractResourceQuota extracts the applied configuration owned by fieldManager from
|
||||
// resourceQuota. If no managedFields are found in resourceQuota for fieldManager, a
|
||||
// ResourceQuotaApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// resourceQuota must be a unmodified ResourceQuota API object that was retrieved from the Kubernetes API.
|
||||
// ExtractResourceQuota provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractResourceQuota(resourceQuota *apicorev1.ResourceQuota, fieldManager string) (*ResourceQuotaApplyConfiguration, error) {
|
||||
b := &ResourceQuotaApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(resourceQuota, internal.Parser().Type("io.k8s.api.core.v1.ResourceQuota"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(resourceQuota.Name)
|
||||
b.WithNamespace(resourceQuota.Namespace)
|
||||
|
||||
b.WithKind("ResourceQuota")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -22,6 +22,8 @@ import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -47,6 +49,31 @@ func Secret(name, namespace string) *SecretApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractSecret extracts the applied configuration owned by fieldManager from
|
||||
// secret. If no managedFields are found in secret for fieldManager, a
|
||||
// SecretApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// secret must be a unmodified Secret API object that was retrieved from the Kubernetes API.
|
||||
// ExtractSecret provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractSecret(secret *corev1.Secret, fieldManager string) (*SecretApplyConfiguration, error) {
|
||||
b := &SecretApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(secret, internal.Parser().Type("io.k8s.api.core.v1.Secret"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(secret.Name)
|
||||
b.WithNamespace(secret.Namespace)
|
||||
|
||||
b.WithKind("Secret")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Service(name, namespace string) *ServiceApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractService extracts the applied configuration owned by fieldManager from
|
||||
// service. If no managedFields are found in service for fieldManager, a
|
||||
// ServiceApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// service must be a unmodified Service API object that was retrieved from the Kubernetes API.
|
||||
// ExtractService provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractService(service *apicorev1.Service, fieldManager string) (*ServiceApplyConfiguration, error) {
|
||||
b := &ServiceApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(service, internal.Parser().Type("io.k8s.api.core.v1.Service"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(service.Name)
|
||||
b.WithNamespace(service.Namespace)
|
||||
|
||||
b.WithKind("Service")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apicorev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -45,6 +48,31 @@ func ServiceAccount(name, namespace string) *ServiceAccountApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractServiceAccount extracts the applied configuration owned by fieldManager from
|
||||
// serviceAccount. If no managedFields are found in serviceAccount for fieldManager, a
|
||||
// ServiceAccountApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// serviceAccount must be a unmodified ServiceAccount API object that was retrieved from the Kubernetes API.
|
||||
// ExtractServiceAccount provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractServiceAccount(serviceAccount *apicorev1.ServiceAccount, fieldManager string) (*ServiceAccountApplyConfiguration, error) {
|
||||
b := &ServiceAccountApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(serviceAccount, internal.Parser().Type("io.k8s.api.core.v1.ServiceAccount"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(serviceAccount.Name)
|
||||
b.WithNamespace(serviceAccount.Namespace)
|
||||
|
||||
b.WithKind("ServiceAccount")
|
||||
b.WithAPIVersion("v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -22,6 +22,8 @@ import (
|
||||
discoveryv1 "k8s.io/api/discovery/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -46,6 +48,31 @@ func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from
|
||||
// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a
|
||||
// EndpointSliceApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) {
|
||||
b := &EndpointSliceApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1.EndpointSlice"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(endpointSlice.Name)
|
||||
b.WithNamespace(endpointSlice.Namespace)
|
||||
|
||||
b.WithKind("EndpointSlice")
|
||||
b.WithAPIVersion("discovery.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -22,6 +22,8 @@ import (
|
||||
v1beta1 "k8s.io/api/discovery/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -46,6 +48,31 @@ func EndpointSlice(name, namespace string) *EndpointSliceApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEndpointSlice extracts the applied configuration owned by fieldManager from
|
||||
// endpointSlice. If no managedFields are found in endpointSlice for fieldManager, a
|
||||
// EndpointSliceApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// endpointSlice must be a unmodified EndpointSlice API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEndpointSlice provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEndpointSlice(endpointSlice *v1beta1.EndpointSlice, fieldManager string) (*EndpointSliceApplyConfiguration, error) {
|
||||
b := &EndpointSliceApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(endpointSlice, internal.Parser().Type("io.k8s.api.discovery.v1beta1.EndpointSlice"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(endpointSlice.Name)
|
||||
b.WithNamespace(endpointSlice.Namespace)
|
||||
|
||||
b.WithKind("EndpointSlice")
|
||||
b.WithAPIVersion("discovery.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apieventsv1 "k8s.io/api/events/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -57,6 +60,31 @@ func Event(name, namespace string) *EventApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEvent extracts the applied configuration owned by fieldManager from
|
||||
// event. If no managedFields are found in event for fieldManager, a
|
||||
// EventApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// event must be a unmodified Event API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEvent(event *apieventsv1.Event, fieldManager string) (*EventApplyConfiguration, error) {
|
||||
b := &EventApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.events.v1.Event"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(event.Name)
|
||||
b.WithNamespace(event.Namespace)
|
||||
|
||||
b.WithKind("Event")
|
||||
b.WithAPIVersion("events.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
eventsv1beta1 "k8s.io/api/events/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -57,6 +60,31 @@ func Event(name, namespace string) *EventApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEvent extracts the applied configuration owned by fieldManager from
|
||||
// event. If no managedFields are found in event for fieldManager, a
|
||||
// EventApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// event must be a unmodified Event API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEvent provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEvent(event *eventsv1beta1.Event, fieldManager string) (*EventApplyConfiguration, error) {
|
||||
b := &EventApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(event, internal.Parser().Type("io.k8s.api.events.v1beta1.Event"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(event.Name)
|
||||
b.WithNamespace(event.Namespace)
|
||||
|
||||
b.WithKind("Event")
|
||||
b.WithAPIVersion("events.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func DaemonSet(name, namespace string) *DaemonSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDaemonSet extracts the applied configuration owned by fieldManager from
|
||||
// daemonSet. If no managedFields are found in daemonSet for fieldManager, a
|
||||
// DaemonSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// daemonSet must be a unmodified DaemonSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDaemonSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDaemonSet(daemonSet *extensionsv1beta1.DaemonSet, fieldManager string) (*DaemonSetApplyConfiguration, error) {
|
||||
b := &DaemonSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(daemonSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.DaemonSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(daemonSet.Name)
|
||||
b.WithNamespace(daemonSet.Namespace)
|
||||
|
||||
b.WithKind("DaemonSet")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Deployment(name, namespace string) *DeploymentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractDeployment extracts the applied configuration owned by fieldManager from
|
||||
// deployment. If no managedFields are found in deployment for fieldManager, a
|
||||
// DeploymentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// deployment must be a unmodified Deployment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractDeployment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractDeployment(deployment *extensionsv1beta1.Deployment, fieldManager string) (*DeploymentApplyConfiguration, error) {
|
||||
b := &DeploymentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(deployment, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Deployment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(deployment.Name)
|
||||
b.WithNamespace(deployment.Namespace)
|
||||
|
||||
b.WithKind("Deployment")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Ingress(name, namespace string) *IngressApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractIngress extracts the applied configuration owned by fieldManager from
|
||||
// ingress. If no managedFields are found in ingress for fieldManager, a
|
||||
// IngressApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API.
|
||||
// ExtractIngress provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractIngress(ingress *extensionsv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) {
|
||||
b := &IngressApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.extensions.v1beta1.Ingress"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(ingress.Name)
|
||||
b.WithNamespace(ingress.Namespace)
|
||||
|
||||
b.WithKind("Ingress")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func NetworkPolicy(name, namespace string) *NetworkPolicyApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from
|
||||
// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a
|
||||
// NetworkPolicyApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractNetworkPolicy provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractNetworkPolicy(networkPolicy *extensionsv1beta1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) {
|
||||
b := &NetworkPolicyApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(networkPolicy, internal.Parser().Type("io.k8s.api.extensions.v1beta1.NetworkPolicy"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(networkPolicy.Name)
|
||||
b.WithNamespace(networkPolicy.Namespace)
|
||||
|
||||
b.WithKind("NetworkPolicy")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func PodSecurityPolicy(name string) *PodSecurityPolicyApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodSecurityPolicy extracts the applied configuration owned by fieldManager from
|
||||
// podSecurityPolicy. If no managedFields are found in podSecurityPolicy for fieldManager, a
|
||||
// PodSecurityPolicyApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podSecurityPolicy must be a unmodified PodSecurityPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodSecurityPolicy provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPodSecurityPolicy(podSecurityPolicy *extensionsv1beta1.PodSecurityPolicy, fieldManager string) (*PodSecurityPolicyApplyConfiguration, error) {
|
||||
b := &PodSecurityPolicyApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podSecurityPolicy, internal.Parser().Type("io.k8s.api.extensions.v1beta1.PodSecurityPolicy"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podSecurityPolicy.Name)
|
||||
|
||||
b.WithKind("PodSecurityPolicy")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func ReplicaSet(name, namespace string) *ReplicaSetApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractReplicaSet extracts the applied configuration owned by fieldManager from
|
||||
// replicaSet. If no managedFields are found in replicaSet for fieldManager, a
|
||||
// ReplicaSetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// replicaSet must be a unmodified ReplicaSet API object that was retrieved from the Kubernetes API.
|
||||
// ExtractReplicaSet provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// 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) {
|
||||
b := &ReplicaSetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(replicaSet, internal.Parser().Type("io.k8s.api.extensions.v1beta1.ReplicaSet"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(replicaSet.Name)
|
||||
b.WithNamespace(replicaSet.Namespace)
|
||||
|
||||
b.WithKind("ReplicaSet")
|
||||
b.WithAPIVersion("extensions/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractFlowSchema extracts the applied configuration owned by fieldManager from
|
||||
// flowSchema. If no managedFields are found in flowSchema for fieldManager, a
|
||||
// FlowSchemaApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API.
|
||||
// ExtractFlowSchema provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractFlowSchema(flowSchema *flowcontrolv1alpha1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) {
|
||||
b := &FlowSchemaApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1alpha1.FlowSchema"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(flowSchema.Name)
|
||||
|
||||
b.WithKind("FlowSchema")
|
||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
flowcontrolv1alpha1 "k8s.io/api/flowcontrol/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a
|
||||
// PriorityLevelConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPriorityLevelConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1alpha1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
||||
b := &PriorityLevelConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(priorityLevelConfiguration.Name)
|
||||
|
||||
b.WithKind("PriorityLevelConfiguration")
|
||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func FlowSchema(name string) *FlowSchemaApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractFlowSchema extracts the applied configuration owned by fieldManager from
|
||||
// flowSchema. If no managedFields are found in flowSchema for fieldManager, a
|
||||
// FlowSchemaApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// flowSchema must be a unmodified FlowSchema API object that was retrieved from the Kubernetes API.
|
||||
// ExtractFlowSchema provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractFlowSchema(flowSchema *flowcontrolv1beta1.FlowSchema, fieldManager string) (*FlowSchemaApplyConfiguration, error) {
|
||||
b := &FlowSchemaApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(flowSchema, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.FlowSchema"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(flowSchema.Name)
|
||||
|
||||
b.WithKind("FlowSchema")
|
||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
flowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func PriorityLevelConfiguration(name string) *PriorityLevelConfigurationApplyCon
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPriorityLevelConfiguration extracts the applied configuration owned by fieldManager from
|
||||
// priorityLevelConfiguration. If no managedFields are found in priorityLevelConfiguration for fieldManager, a
|
||||
// PriorityLevelConfigurationApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// priorityLevelConfiguration must be a unmodified PriorityLevelConfiguration API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPriorityLevelConfiguration provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPriorityLevelConfiguration(priorityLevelConfiguration *flowcontrolv1beta1.PriorityLevelConfiguration, fieldManager string) (*PriorityLevelConfigurationApplyConfiguration, error) {
|
||||
b := &PriorityLevelConfigurationApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(priorityLevelConfiguration, internal.Parser().Type("io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(priorityLevelConfiguration.Name)
|
||||
|
||||
b.WithKind("PriorityLevelConfiguration")
|
||||
b.WithAPIVersion("flowcontrol.apiserver.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
imagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ImageReview(name string) *ImageReviewApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractImageReview extracts the applied configuration owned by fieldManager from
|
||||
// imageReview. If no managedFields are found in imageReview for fieldManager, a
|
||||
// ImageReviewApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// imageReview must be a unmodified ImageReview API object that was retrieved from the Kubernetes API.
|
||||
// ExtractImageReview provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractImageReview(imageReview *imagepolicyv1alpha1.ImageReview, fieldManager string) (*ImageReviewApplyConfiguration, error) {
|
||||
b := &ImageReviewApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(imageReview, internal.Parser().Type("io.k8s.api.imagepolicy.v1alpha1.ImageReview"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(imageReview.Name)
|
||||
|
||||
b.WithKind("ImageReview")
|
||||
b.WithAPIVersion("imagepolicy.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
10759
staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go
Normal file
10759
staging/src/k8s.io/client-go/applyconfigurations/internal/internal.go
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apinetworkingv1 "k8s.io/api/networking/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Ingress(name, namespace string) *IngressApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractIngress extracts the applied configuration owned by fieldManager from
|
||||
// ingress. If no managedFields are found in ingress for fieldManager, a
|
||||
// IngressApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API.
|
||||
// ExtractIngress provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractIngress(ingress *apinetworkingv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) {
|
||||
b := &IngressApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1.Ingress"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(ingress.Name)
|
||||
b.WithNamespace(ingress.Namespace)
|
||||
|
||||
b.WithKind("Ingress")
|
||||
b.WithAPIVersion("networking.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apinetworkingv1 "k8s.io/api/networking/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func IngressClass(name string) *IngressClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractIngressClass extracts the applied configuration owned by fieldManager from
|
||||
// ingressClass. If no managedFields are found in ingressClass for fieldManager, a
|
||||
// IngressClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractIngressClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractIngressClass(ingressClass *apinetworkingv1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) {
|
||||
b := &IngressClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(ingressClass, internal.Parser().Type("io.k8s.api.networking.v1.IngressClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(ingressClass.Name)
|
||||
|
||||
b.WithKind("IngressClass")
|
||||
b.WithAPIVersion("networking.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apinetworkingv1 "k8s.io/api/networking/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func NetworkPolicy(name, namespace string) *NetworkPolicyApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractNetworkPolicy extracts the applied configuration owned by fieldManager from
|
||||
// networkPolicy. If no managedFields are found in networkPolicy for fieldManager, a
|
||||
// NetworkPolicyApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// networkPolicy must be a unmodified NetworkPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractNetworkPolicy provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractNetworkPolicy(networkPolicy *apinetworkingv1.NetworkPolicy, fieldManager string) (*NetworkPolicyApplyConfiguration, error) {
|
||||
b := &NetworkPolicyApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(networkPolicy, internal.Parser().Type("io.k8s.api.networking.v1.NetworkPolicy"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(networkPolicy.Name)
|
||||
b.WithNamespace(networkPolicy.Namespace)
|
||||
|
||||
b.WithKind("NetworkPolicy")
|
||||
b.WithAPIVersion("networking.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func Ingress(name, namespace string) *IngressApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractIngress extracts the applied configuration owned by fieldManager from
|
||||
// ingress. If no managedFields are found in ingress for fieldManager, a
|
||||
// IngressApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API.
|
||||
// ExtractIngress provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractIngress(ingress *networkingv1beta1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) {
|
||||
b := &IngressApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(ingress, internal.Parser().Type("io.k8s.api.networking.v1beta1.Ingress"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(ingress.Name)
|
||||
b.WithNamespace(ingress.Namespace)
|
||||
|
||||
b.WithKind("Ingress")
|
||||
b.WithAPIVersion("networking.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func IngressClass(name string) *IngressClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractIngressClass extracts the applied configuration owned by fieldManager from
|
||||
// ingressClass. If no managedFields are found in ingressClass for fieldManager, a
|
||||
// IngressClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// ingressClass must be a unmodified IngressClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractIngressClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractIngressClass(ingressClass *networkingv1beta1.IngressClass, fieldManager string) (*IngressClassApplyConfiguration, error) {
|
||||
b := &IngressClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(ingressClass, internal.Parser().Type("io.k8s.api.networking.v1beta1.IngressClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(ingressClass.Name)
|
||||
|
||||
b.WithKind("IngressClass")
|
||||
b.WithAPIVersion("networking.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apinodev1 "k8s.io/api/node/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,30 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from
|
||||
// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a
|
||||
// RuntimeClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRuntimeClass(runtimeClass *apinodev1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) {
|
||||
b := &RuntimeClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1.RuntimeClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(runtimeClass.Name)
|
||||
|
||||
b.WithKind("RuntimeClass")
|
||||
b.WithAPIVersion("node.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
nodev1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from
|
||||
// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a
|
||||
// RuntimeClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRuntimeClass(runtimeClass *nodev1alpha1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) {
|
||||
b := &RuntimeClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1alpha1.RuntimeClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(runtimeClass.Name)
|
||||
|
||||
b.WithKind("RuntimeClass")
|
||||
b.WithAPIVersion("node.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
nodev1beta1 "k8s.io/api/node/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,30 @@ func RuntimeClass(name string) *RuntimeClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRuntimeClass extracts the applied configuration owned by fieldManager from
|
||||
// runtimeClass. If no managedFields are found in runtimeClass for fieldManager, a
|
||||
// RuntimeClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// runtimeClass must be a unmodified RuntimeClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRuntimeClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRuntimeClass(runtimeClass *nodev1beta1.RuntimeClass, fieldManager string) (*RuntimeClassApplyConfiguration, error) {
|
||||
b := &RuntimeClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(runtimeClass, internal.Parser().Type("io.k8s.api.node.v1beta1.RuntimeClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(runtimeClass.Name)
|
||||
|
||||
b.WithKind("RuntimeClass")
|
||||
b.WithAPIVersion("node.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apipolicyv1 "k8s.io/api/policy/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodDisruptionBudget extracts the applied configuration owned by fieldManager from
|
||||
// podDisruptionBudget. If no managedFields are found in podDisruptionBudget for fieldManager, a
|
||||
// PodDisruptionBudgetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podDisruptionBudget must be a unmodified PodDisruptionBudget API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodDisruptionBudget provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPodDisruptionBudget(podDisruptionBudget *apipolicyv1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) {
|
||||
b := &PodDisruptionBudgetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1.PodDisruptionBudget"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podDisruptionBudget.Name)
|
||||
b.WithNamespace(podDisruptionBudget.Namespace)
|
||||
|
||||
b.WithKind("PodDisruptionBudget")
|
||||
b.WithAPIVersion("policy/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/policy/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Eviction(name, namespace string) *EvictionApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractEviction extracts the applied configuration owned by fieldManager from
|
||||
// eviction. If no managedFields are found in eviction for fieldManager, a
|
||||
// EvictionApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// eviction must be a unmodified Eviction API object that was retrieved from the Kubernetes API.
|
||||
// ExtractEviction provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractEviction(eviction *v1beta1.Eviction, fieldManager string) (*EvictionApplyConfiguration, error) {
|
||||
b := &EvictionApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(eviction, internal.Parser().Type("io.k8s.api.policy.v1beta1.Eviction"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(eviction.Name)
|
||||
b.WithNamespace(eviction.Namespace)
|
||||
|
||||
b.WithKind("Eviction")
|
||||
b.WithAPIVersion("policy/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func PodDisruptionBudget(name, namespace string) *PodDisruptionBudgetApplyConfig
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodDisruptionBudget extracts the applied configuration owned by fieldManager from
|
||||
// podDisruptionBudget. If no managedFields are found in podDisruptionBudget for fieldManager, a
|
||||
// PodDisruptionBudgetApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podDisruptionBudget must be a unmodified PodDisruptionBudget API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodDisruptionBudget provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPodDisruptionBudget(podDisruptionBudget *policyv1beta1.PodDisruptionBudget, fieldManager string) (*PodDisruptionBudgetApplyConfiguration, error) {
|
||||
b := &PodDisruptionBudgetApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podDisruptionBudget, internal.Parser().Type("io.k8s.api.policy.v1beta1.PodDisruptionBudget"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podDisruptionBudget.Name)
|
||||
b.WithNamespace(podDisruptionBudget.Namespace)
|
||||
|
||||
b.WithKind("PodDisruptionBudget")
|
||||
b.WithAPIVersion("policy/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func PodSecurityPolicy(name string) *PodSecurityPolicyApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPodSecurityPolicy extracts the applied configuration owned by fieldManager from
|
||||
// podSecurityPolicy. If no managedFields are found in podSecurityPolicy for fieldManager, a
|
||||
// PodSecurityPolicyApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// podSecurityPolicy must be a unmodified PodSecurityPolicy API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPodSecurityPolicy provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPodSecurityPolicy(podSecurityPolicy *policyv1beta1.PodSecurityPolicy, fieldManager string) (*PodSecurityPolicyApplyConfiguration, error) {
|
||||
b := &PodSecurityPolicyApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(podSecurityPolicy, internal.Parser().Type("io.k8s.api.policy.v1beta1.PodSecurityPolicy"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(podSecurityPolicy.Name)
|
||||
|
||||
b.WithKind("PodSecurityPolicy")
|
||||
b.WithAPIVersion("policy/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apirbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRole extracts the applied configuration owned by fieldManager from
|
||||
// clusterRole. If no managedFields are found in clusterRole for fieldManager, a
|
||||
// ClusterRoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRole(clusterRole *apirbacv1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) {
|
||||
b := &ClusterRoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1.ClusterRole"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRole.Name)
|
||||
|
||||
b.WithKind("ClusterRole")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apirbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a
|
||||
// ClusterRoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRoleBinding(clusterRoleBinding *apirbacv1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) {
|
||||
b := &ClusterRoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1.ClusterRoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRoleBinding.Name)
|
||||
|
||||
b.WithKind("ClusterRoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apirbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Role(name, namespace string) *RoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRole extracts the applied configuration owned by fieldManager from
|
||||
// role. If no managedFields are found in role for fieldManager, a
|
||||
// RoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// role must be a unmodified Role API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRole(role *apirbacv1.Role, fieldManager string) (*RoleApplyConfiguration, error) {
|
||||
b := &RoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1.Role"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(role.Name)
|
||||
b.WithNamespace(role.Namespace)
|
||||
|
||||
b.WithKind("Role")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apirbacv1 "k8s.io/api/rbac/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// roleBinding. If no managedFields are found in roleBinding for fieldManager, a
|
||||
// RoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRoleBinding(roleBinding *apirbacv1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) {
|
||||
b := &RoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1.RoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(roleBinding.Name)
|
||||
b.WithNamespace(roleBinding.Namespace)
|
||||
|
||||
b.WithKind("RoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRole extracts the applied configuration owned by fieldManager from
|
||||
// clusterRole. If no managedFields are found in clusterRole for fieldManager, a
|
||||
// ClusterRoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRole(clusterRole *rbacv1alpha1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) {
|
||||
b := &ClusterRoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.ClusterRole"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRole.Name)
|
||||
|
||||
b.WithKind("ClusterRole")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a
|
||||
// ClusterRoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRoleBinding(clusterRoleBinding *rbacv1alpha1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) {
|
||||
b := &ClusterRoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.ClusterRoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRoleBinding.Name)
|
||||
|
||||
b.WithKind("ClusterRoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Role(name, namespace string) *RoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRole extracts the applied configuration owned by fieldManager from
|
||||
// role. If no managedFields are found in role for fieldManager, a
|
||||
// RoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// role must be a unmodified Role API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRole(role *rbacv1alpha1.Role, fieldManager string) (*RoleApplyConfiguration, error) {
|
||||
b := &RoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.Role"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(role.Name)
|
||||
b.WithNamespace(role.Namespace)
|
||||
|
||||
b.WithKind("Role")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// roleBinding. If no managedFields are found in roleBinding for fieldManager, a
|
||||
// RoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRoleBinding(roleBinding *rbacv1alpha1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) {
|
||||
b := &RoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1alpha1.RoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(roleBinding.Name)
|
||||
b.WithNamespace(roleBinding.Namespace)
|
||||
|
||||
b.WithKind("RoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRole(name string) *ClusterRoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRole extracts the applied configuration owned by fieldManager from
|
||||
// clusterRole. If no managedFields are found in clusterRole for fieldManager, a
|
||||
// ClusterRoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRole must be a unmodified ClusterRole API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRole(clusterRole *rbacv1beta1.ClusterRole, fieldManager string) (*ClusterRoleApplyConfiguration, error) {
|
||||
b := &ClusterRoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRole, internal.Parser().Type("io.k8s.api.rbac.v1beta1.ClusterRole"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRole.Name)
|
||||
|
||||
b.WithKind("ClusterRole")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func ClusterRoleBinding(name string) *ClusterRoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractClusterRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// clusterRoleBinding. If no managedFields are found in clusterRoleBinding for fieldManager, a
|
||||
// ClusterRoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// clusterRoleBinding must be a unmodified ClusterRoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractClusterRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractClusterRoleBinding(clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, fieldManager string) (*ClusterRoleBindingApplyConfiguration, error) {
|
||||
b := &ClusterRoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(clusterRoleBinding, internal.Parser().Type("io.k8s.api.rbac.v1beta1.ClusterRoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(clusterRoleBinding.Name)
|
||||
|
||||
b.WithKind("ClusterRoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,31 @@ func Role(name, namespace string) *RoleApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRole extracts the applied configuration owned by fieldManager from
|
||||
// role. If no managedFields are found in role for fieldManager, a
|
||||
// RoleApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// role must be a unmodified Role API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRole provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRole(role *rbacv1beta1.Role, fieldManager string) (*RoleApplyConfiguration, error) {
|
||||
b := &RoleApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(role, internal.Parser().Type("io.k8s.api.rbac.v1beta1.Role"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(role.Name)
|
||||
b.WithNamespace(role.Namespace)
|
||||
|
||||
b.WithKind("Role")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
rbacv1beta1 "k8s.io/api/rbac/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -44,6 +47,31 @@ func RoleBinding(name, namespace string) *RoleBindingApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractRoleBinding extracts the applied configuration owned by fieldManager from
|
||||
// roleBinding. If no managedFields are found in roleBinding for fieldManager, a
|
||||
// RoleBindingApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// roleBinding must be a unmodified RoleBinding API object that was retrieved from the Kubernetes API.
|
||||
// ExtractRoleBinding provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractRoleBinding(roleBinding *rbacv1beta1.RoleBinding, fieldManager string) (*RoleBindingApplyConfiguration, error) {
|
||||
b := &RoleBindingApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(roleBinding, internal.Parser().Type("io.k8s.api.rbac.v1beta1.RoleBinding"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(roleBinding.Name)
|
||||
b.WithNamespace(roleBinding.Namespace)
|
||||
|
||||
b.WithKind("RoleBinding")
|
||||
b.WithAPIVersion("rbac.authorization.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -20,8 +20,11 @@ package v1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
schedulingv1 "k8s.io/api/scheduling/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -46,6 +49,30 @@ func PriorityClass(name string) *PriorityClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPriorityClass extracts the applied configuration owned by fieldManager from
|
||||
// priorityClass. If no managedFields are found in priorityClass for fieldManager, a
|
||||
// PriorityClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// priorityClass must be a unmodified PriorityClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPriorityClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPriorityClass(priorityClass *schedulingv1.PriorityClass, fieldManager string) (*PriorityClassApplyConfiguration, error) {
|
||||
b := &PriorityClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(priorityClass, internal.Parser().Type("io.k8s.api.scheduling.v1.PriorityClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(priorityClass.Name)
|
||||
|
||||
b.WithKind("PriorityClass")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -20,8 +20,11 @@ package v1alpha1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1alpha1 "k8s.io/api/scheduling/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -46,6 +49,30 @@ func PriorityClass(name string) *PriorityClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPriorityClass extracts the applied configuration owned by fieldManager from
|
||||
// priorityClass. If no managedFields are found in priorityClass for fieldManager, a
|
||||
// PriorityClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// priorityClass must be a unmodified PriorityClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPriorityClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPriorityClass(priorityClass *v1alpha1.PriorityClass, fieldManager string) (*PriorityClassApplyConfiguration, error) {
|
||||
b := &PriorityClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(priorityClass, internal.Parser().Type("io.k8s.api.scheduling.v1alpha1.PriorityClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(priorityClass.Name)
|
||||
|
||||
b.WithKind("PriorityClass")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -20,8 +20,11 @@ package v1beta1
|
||||
|
||||
import (
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
v1beta1 "k8s.io/api/scheduling/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -46,6 +49,30 @@ func PriorityClass(name string) *PriorityClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractPriorityClass extracts the applied configuration owned by fieldManager from
|
||||
// priorityClass. If no managedFields are found in priorityClass for fieldManager, a
|
||||
// PriorityClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// priorityClass must be a unmodified PriorityClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractPriorityClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractPriorityClass(priorityClass *v1beta1.PriorityClass, fieldManager string) (*PriorityClassApplyConfiguration, error) {
|
||||
b := &PriorityClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(priorityClass, internal.Parser().Type("io.k8s.api.scheduling.v1beta1.PriorityClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(priorityClass.Name)
|
||||
|
||||
b.WithKind("PriorityClass")
|
||||
b.WithAPIVersion("scheduling.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apistoragev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func CSIDriver(name string) *CSIDriverApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSIDriver extracts the applied configuration owned by fieldManager from
|
||||
// cSIDriver. If no managedFields are found in cSIDriver for fieldManager, a
|
||||
// CSIDriverApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSIDriver must be a unmodified CSIDriver API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSIDriver provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSIDriver(cSIDriver *apistoragev1.CSIDriver, fieldManager string) (*CSIDriverApplyConfiguration, error) {
|
||||
b := &CSIDriverApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSIDriver, internal.Parser().Type("io.k8s.api.storage.v1.CSIDriver"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSIDriver.Name)
|
||||
|
||||
b.WithKind("CSIDriver")
|
||||
b.WithAPIVersion("storage.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apistoragev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func CSINode(name string) *CSINodeApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSINode extracts the applied configuration owned by fieldManager from
|
||||
// cSINode. If no managedFields are found in cSINode for fieldManager, a
|
||||
// CSINodeApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSINode must be a unmodified CSINode API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSINode provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSINode(cSINode *apistoragev1.CSINode, fieldManager string) (*CSINodeApplyConfiguration, error) {
|
||||
b := &CSINodeApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSINode, internal.Parser().Type("io.k8s.api.storage.v1.CSINode"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSINode.Name)
|
||||
|
||||
b.WithKind("CSINode")
|
||||
b.WithAPIVersion("storage.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -23,7 +23,9 @@ import (
|
||||
storagev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -51,6 +53,30 @@ func StorageClass(name string) *StorageClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStorageClass extracts the applied configuration owned by fieldManager from
|
||||
// storageClass. If no managedFields are found in storageClass for fieldManager, a
|
||||
// StorageClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// storageClass must be a unmodified StorageClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStorageClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStorageClass(storageClass *storagev1.StorageClass, fieldManager string) (*StorageClassApplyConfiguration, error) {
|
||||
b := &StorageClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageClass, internal.Parser().Type("io.k8s.api.storage.v1.StorageClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageClass.Name)
|
||||
|
||||
b.WithKind("StorageClass")
|
||||
b.WithAPIVersion("storage.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
apistoragev1 "k8s.io/api/storage/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func VolumeAttachment(name string) *VolumeAttachmentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractVolumeAttachment extracts the applied configuration owned by fieldManager from
|
||||
// volumeAttachment. If no managedFields are found in volumeAttachment for fieldManager, a
|
||||
// VolumeAttachmentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// volumeAttachment must be a unmodified VolumeAttachment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractVolumeAttachment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractVolumeAttachment(volumeAttachment *apistoragev1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) {
|
||||
b := &VolumeAttachmentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(volumeAttachment, internal.Parser().Type("io.k8s.api.storage.v1.VolumeAttachment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(volumeAttachment.Name)
|
||||
|
||||
b.WithKind("VolumeAttachment")
|
||||
b.WithAPIVersion("storage.k8s.io/v1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -47,6 +50,31 @@ func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfigur
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from
|
||||
// cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a
|
||||
// CSIStorageCapacityApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSIStorageCapacity(cSIStorageCapacity *v1alpha1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) {
|
||||
b := &CSIStorageCapacityApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1alpha1.CSIStorageCapacity"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSIStorageCapacity.Name)
|
||||
b.WithNamespace(cSIStorageCapacity.Namespace)
|
||||
|
||||
b.WithKind("CSIStorageCapacity")
|
||||
b.WithAPIVersion("storage.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
storagev1alpha1 "k8s.io/api/storage/v1alpha1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func VolumeAttachment(name string) *VolumeAttachmentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractVolumeAttachment extracts the applied configuration owned by fieldManager from
|
||||
// volumeAttachment. If no managedFields are found in volumeAttachment for fieldManager, a
|
||||
// VolumeAttachmentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// volumeAttachment must be a unmodified VolumeAttachment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractVolumeAttachment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractVolumeAttachment(volumeAttachment *storagev1alpha1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) {
|
||||
b := &VolumeAttachmentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(volumeAttachment, internal.Parser().Type("io.k8s.api.storage.v1alpha1.VolumeAttachment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(volumeAttachment.Name)
|
||||
|
||||
b.WithKind("VolumeAttachment")
|
||||
b.WithAPIVersion("storage.k8s.io/v1alpha1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func CSIDriver(name string) *CSIDriverApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSIDriver extracts the applied configuration owned by fieldManager from
|
||||
// cSIDriver. If no managedFields are found in cSIDriver for fieldManager, a
|
||||
// CSIDriverApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSIDriver must be a unmodified CSIDriver API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSIDriver provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSIDriver(cSIDriver *storagev1beta1.CSIDriver, fieldManager string) (*CSIDriverApplyConfiguration, error) {
|
||||
b := &CSIDriverApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSIDriver, internal.Parser().Type("io.k8s.api.storage.v1beta1.CSIDriver"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSIDriver.Name)
|
||||
|
||||
b.WithKind("CSIDriver")
|
||||
b.WithAPIVersion("storage.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -42,6 +45,30 @@ func CSINode(name string) *CSINodeApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSINode extracts the applied configuration owned by fieldManager from
|
||||
// cSINode. If no managedFields are found in cSINode for fieldManager, a
|
||||
// CSINodeApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSINode must be a unmodified CSINode API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSINode provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSINode(cSINode *storagev1beta1.CSINode, fieldManager string) (*CSINodeApplyConfiguration, error) {
|
||||
b := &CSINodeApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSINode, internal.Parser().Type("io.k8s.api.storage.v1beta1.CSINode"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSINode.Name)
|
||||
|
||||
b.WithKind("CSINode")
|
||||
b.WithAPIVersion("storage.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,9 +19,12 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
resource "k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -47,6 +50,31 @@ func CSIStorageCapacity(name, namespace string) *CSIStorageCapacityApplyConfigur
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractCSIStorageCapacity extracts the applied configuration owned by fieldManager from
|
||||
// cSIStorageCapacity. If no managedFields are found in cSIStorageCapacity for fieldManager, a
|
||||
// CSIStorageCapacityApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// cSIStorageCapacity must be a unmodified CSIStorageCapacity API object that was retrieved from the Kubernetes API.
|
||||
// ExtractCSIStorageCapacity provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractCSIStorageCapacity(cSIStorageCapacity *v1beta1.CSIStorageCapacity, fieldManager string) (*CSIStorageCapacityApplyConfiguration, error) {
|
||||
b := &CSIStorageCapacityApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(cSIStorageCapacity, internal.Parser().Type("io.k8s.api.storage.v1beta1.CSIStorageCapacity"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(cSIStorageCapacity.Name)
|
||||
b.WithNamespace(cSIStorageCapacity.Namespace)
|
||||
|
||||
b.WithKind("CSIStorageCapacity")
|
||||
b.WithAPIVersion("storage.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -23,7 +23,9 @@ import (
|
||||
v1beta1 "k8s.io/api/storage/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
applyconfigurationscorev1 "k8s.io/client-go/applyconfigurations/core/v1"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -51,6 +53,30 @@ func StorageClass(name string) *StorageClassApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractStorageClass extracts the applied configuration owned by fieldManager from
|
||||
// storageClass. If no managedFields are found in storageClass for fieldManager, a
|
||||
// StorageClassApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// storageClass must be a unmodified StorageClass API object that was retrieved from the Kubernetes API.
|
||||
// ExtractStorageClass provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractStorageClass(storageClass *v1beta1.StorageClass, fieldManager string) (*StorageClassApplyConfiguration, error) {
|
||||
b := &StorageClassApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(storageClass, internal.Parser().Type("io.k8s.api.storage.v1beta1.StorageClass"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(storageClass.Name)
|
||||
|
||||
b.WithKind("StorageClass")
|
||||
b.WithAPIVersion("storage.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
@@ -19,8 +19,11 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
|
||||
internal "k8s.io/client-go/applyconfigurations/internal"
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
@@ -43,6 +46,30 @@ func VolumeAttachment(name string) *VolumeAttachmentApplyConfiguration {
|
||||
return b
|
||||
}
|
||||
|
||||
// ExtractVolumeAttachment extracts the applied configuration owned by fieldManager from
|
||||
// volumeAttachment. If no managedFields are found in volumeAttachment for fieldManager, a
|
||||
// VolumeAttachmentApplyConfiguration 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
|
||||
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
|
||||
// the fieldManager never owned fields any fields.
|
||||
// volumeAttachment must be a unmodified VolumeAttachment API object that was retrieved from the Kubernetes API.
|
||||
// ExtractVolumeAttachment provides a way to perform a extract/modify-in-place/apply workflow.
|
||||
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
|
||||
// applied if another fieldManager has updated or force applied any of the previously applied fields.
|
||||
// Experimental!
|
||||
func ExtractVolumeAttachment(volumeAttachment *storagev1beta1.VolumeAttachment, fieldManager string) (*VolumeAttachmentApplyConfiguration, error) {
|
||||
b := &VolumeAttachmentApplyConfiguration{}
|
||||
err := managedfields.ExtractInto(volumeAttachment, internal.Parser().Type("io.k8s.api.storage.v1beta1.VolumeAttachment"), fieldManager, b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b.WithName(volumeAttachment.Name)
|
||||
|
||||
b.WithKind("VolumeAttachment")
|
||||
b.WithAPIVersion("storage.k8s.io/v1beta1")
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// WithKind sets the Kind field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
|
Reference in New Issue
Block a user