Closed cvvz closed 1 year ago
I do not think kubefedv2, karmada and clusternet has a similar API to deploy workload? Do you ask an API that in higher level primitive which you can define "I want to create deployment in a set of clusters". Or do you want a way that you can directly call deployment API in a spoke cluster?
Use karmada as an example, if I want to create deployment across multiple clusters. I can use the native deployment API of k8s in hub cluster, the components of karmada will do reconciling, and generate ResourceBindingSpec as a result, which is similar to the concept of work in work-api. Is it possible to use OCM the same way? That is, use k8s native API in hub cluster directly rather than use ManifestWork directly.
oh, we do not do it in ocm core component. But it is possible to develop an extension to do that. There is a proposal by @yue9944882 https://github.com/open-cluster-management-io/enhancements/pull/31 that may be able to support this case.
We try to avoid normalizing the interface of the end user in ocm core part, since we see a bunch of different ways users can deliver workload (native way, gitops way, helm way etc.). Instead the ocm core component is trying to provide an interface that other more user oriented interfaces can easily plug in.
Got it! Does it mean that I can create an add-on through addon-framework or a third-party system(i.e., higher primitive
) writen by myself (as long as it can transform a native resource to manifestwork) to support my case?
That is for sure!
weeks ago i had a poc implementation of the enhancement above, now it's holding on the status-reporting feature by the work api from https://github.com/open-cluster-management-io/api/pull/108 b/c the advance workload distribution needs to actively reading the existence/status from the distributed resources. the new api proposed in the enhancement allows users to "import" an existing workload resource from the hub cluster as the template then replicate them to the selected managed clusters and the imported native workload will be automatically packed into a work api.
btw i am also thinking of another approach to convert native api to work -- by a custom kustomize generator plugin, the plugin should be packing all the resources under the kustomize folders to a single work resource.
This issue is stale because it has been open for 120 days with no activity. After 14 days of inactivity, it will be closed. Remove the stable
label to prevent this issue from being closed.
I want to create work like
deployment
by using K8s API but not aWorkManifest
with template in it, just like what kubefedV2, karmada or clusternet does. Is it possible?