// CreateManifestWorks create the manifestWork use for installing klusterlet
CreateManifestWorks create the manifestWork use for installing klusterlet
// CreateManifestWorks create the manifestWork use for installing klusterlet
func createOrUpdateManifestWorks(
	client client.Client,
	scheme *runtime.Scheme,
	managedCluster *clusterv1.ManagedCluster,
	ucrds []*unstructured.Unstructured,
	uyamls []*unstructured.Unstructured,
) (*workv1.ManifestWork, *workv1.ManifestWork, error) {
	crds, yamls, err := newManifestWorks(managedCluster, ucrds, uyamls)
	if err != nil {
		return nil, nil, err
	}
	mwcrds, err := createOrUpdateManifestWork(client, scheme, managedCluster, crds)
	if err != nil {
		return nil, nil, err
	}
	mwyamls, err := createOrUpdateManifestWork(client, scheme, managedCluster, yamls)
	if err != nil {
		return nil, nil, err
	}
	return mwcrds, mwyamls, nil
}
func createOrUpdateManifestWorks ( client client . Client , scheme * runtime . Scheme , managedCluster * clusterv1 . ManagedCluster , ucrds [ ] * unstructured . Unstructured , uyamls [ ] * unstructured . Unstructured , ) ( * workv1 . ManifestWork , * workv1 . ManifestWork , error ) { crds , yamls , err := newManifestWorks ( managedCluster , ucrds , uyamls ) if err != nil { return nil , nil , err } mwcrds , err := createOrUpdateManifestWork ( client , scheme , managedCluster , crds ) if err != nil { return nil , nil , err } mwyamls , err := createOrUpdateManifestWork ( client , scheme , managedCluster , yamls ) if err != nil { return nil , nil , err } return mwcrds , mwyamls , nil }
CreateManifestWorks create the manifestWork use for installing klusterlet
CreateManifestWorks create the manifestWork use for installing klusterlet