// Convert_rbac_ClusterRoleBinding_To_v1_ClusterRoleBinding is an autogenerated conversion function.
774924
func Convert_rbac_ClusterRoleBinding_To_v1_ClusterRoleBinding(in *rbac.ClusterRoleBinding, out *v1.ClusterRoleBinding, s conversion.Scope) error {
	return autoConvert_rbac_ClusterRoleBinding_To_v1_ClusterRoleBinding(in, out, s)
}
2243
func Convert_rbac_ClusterRole_To_v1beta1_ClusterRole(in *rbac.ClusterRole, out *v1beta1.ClusterRole, s conversion.Scope) error {
	return autoConvert_rbac_ClusterRole_To_v1beta1_ClusterRole(in, out, s)
}
805203
func (idr *InitDryRunGetter) handleSystemNodesClusterRoleBinding(action core.GetAction) (bool, runtime.Object, error) {
	if action.GetName() != constants.NodesClusterRoleBinding || action.GetResource().Resource != "clusterrolebindings" {
		// We can't handle this event
		return false, nil, nil
	}
	// We can safely return a NotFound error here as the code will just proceed normally and don't care about modifying this clusterrolebinding
	// This can only happen on an upgrade; and in that case the ClientBackedDryRunGetter impl will be used
	return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), "clusterrolebinding not found")
}
645705
func Convert_authorization_RoleBindingList_To_v1_RoleBindingList(in *authorization.RoleBindingList, out *v1.RoleBindingList, s conversion.Scope) error {
	return autoConvert_authorization_RoleBindingList_To_v1_RoleBindingList(in, out, s)
}
1235437
func Convert_v1_ClusterRoleScopeRestriction_To_oauth_ClusterRoleScopeRestriction(in *v1.ClusterRoleScopeRestriction, out *oauth.ClusterRoleScopeRestriction, s conversion.Scope) error {
	return autoConvert_v1_ClusterRoleScopeRestriction_To_oauth_ClusterRoleScopeRestriction(in, out, s)
}
82113
func Convert_config_ClusterNetworkEntry_To_v1_ClusterNetworkEntry(in *config.ClusterNetworkEntry, out *v1.ClusterNetworkEntry, s conversion.Scope) error {
	return autoConvert_config_ClusterNetworkEntry_To_v1_ClusterNetworkEntry(in, out, s)
}
335928
func Convert_rbac_RoleBinding_To_v1beta1_RoleBinding(in *rbac.RoleBinding, out *v1beta1.RoleBinding, s conversion.Scope) error {
	return autoConvert_rbac_RoleBinding_To_v1beta1_RoleBinding(in, out, s)
}
1370188
func Convert_rbac_AggregationRule_To_v1_AggregationRule(in *rbac.AggregationRule, out *v1.AggregationRule, s conversion.Scope) error {
	return autoConvert_rbac_AggregationRule_To_v1_AggregationRule(in, out, s)
}
468787
func Convert_rbac_RoleList_To_v1_RoleList(in *rbac.RoleList, out *v1.RoleList, s conversion.Scope) error {
	return autoConvert_rbac_RoleList_To_v1_RoleList(in, out, s)
}
1372438
func Convert_v1_ClusterRole_To_authorization_ClusterRole(in *v1.ClusterRole, out *authorization.ClusterRole, s conversion.Scope) error {
	return autoConvert_v1_ClusterRole_To_authorization_ClusterRole(in, out, s)
}
1099055
func ClusterRoleFromRBAC(obj *rbacv1.ClusterRole) (*authorizationapi.ClusterRole, error) {
	// do a deep copy here since conversion does not guarantee a new object.
	objCopy := obj.DeepCopy()

	convertedObjInternal := &rbac.ClusterRole{}
	if err := rbacv1helpers.Convert_v1_ClusterRole_To_rbac_ClusterRole(objCopy, convertedObjInternal, nil); err != nil {
		return nil, err
	}

	convertedObj := &authorizationapi.ClusterRole{}
	if err := rbacconversion.Convert_rbac_ClusterRole_To_authorization_ClusterRole(convertedObjInternal, convertedObj, nil); err != nil {
		return nil, err
	}

	return convertedObj, nil
}
952562
func Convert_core_NodeSelector_To_v1_NodeSelector(in *core.NodeSelector, out *v1.NodeSelector, s conversion.Scope) error {
	return autoConvert_core_NodeSelector_To_v1_NodeSelector(in, out, s)
}
341697
func Convert_network_ClusterNetworkList_To_v1_ClusterNetworkList(in *network.ClusterNetworkList, out *v1.ClusterNetworkList, s conversion.Scope) error {
	return autoConvert_network_ClusterNetworkList_To_v1_ClusterNetworkList(in, out, s)
}
230158
func Convert_network_ClusterNetwork_To_v1_ClusterNetwork(in *network.ClusterNetwork, out *v1.ClusterNetwork, s conversion.Scope) error {
	return autoConvert_network_ClusterNetwork_To_v1_ClusterNetwork(in, out, s)
}
452528
func Convert_v1_RoleList_To_rbac_RoleList(in *v1.RoleList, out *rbac.RoleList, s conversion.Scope) error {
	return autoConvert_v1_RoleList_To_rbac_RoleList(in, out, s)
}
1360490
func Convert_rbac_Role_To_v1_Role(in *rbac.Role, out *v1.Role, s conversion.Scope) error {
	return autoConvert_rbac_Role_To_v1_Role(in, out, s)
}
845717
func primeSplitClusterRoleBindings(clusterRoleBindingToSplit map[string]rbacapiv1.ClusterRoleBinding, clusterRoleBindingClient rbacv1client.ClusterRoleBindingsGetter) error {
	for existingBindingName, clusterRoleBindingToCreate := range clusterRoleBindingToSplit {
		// If source ClusterRoleBinding does not exist, do nothing.
		existingRoleBinding, err := clusterRoleBindingClient.ClusterRoleBindings().Get(existingBindingName, metav1.GetOptions{})
		if apierrors.IsNotFound(err) {
			continue
		}
		if err != nil {
			return err
		}

		// If the target ClusterRoleBinding already exists, do nothing.
		_, err = clusterRoleBindingClient.ClusterRoleBindings().Get(clusterRoleBindingToCreate.Name, metav1.GetOptions{})
		if err == nil {
			continue
		}
		if !apierrors.IsNotFound(err) {
			return err
		}

		// If the source exists, but the target does not,
		// copy the subjects, labels, and annotations from the former to create the latter.
		klog.V(1).Infof("copying subjects, labels, and annotations from ClusterRoleBinding %q to template %q", existingBindingName, clusterRoleBindingToCreate.Name)
		newCRB := clusterRoleBindingToCreate.DeepCopy()
		newCRB.Subjects = existingRoleBinding.Subjects
		newCRB.Labels = existingRoleBinding.Labels
		newCRB.Annotations = existingRoleBinding.Annotations
		if _, err := clusterRoleBindingClient.ClusterRoleBindings().Create(newCRB); err != nil && !apierrors.IsAlreadyExists(err) {
			return err
		}
	}
	return nil
}