Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to check the difference between SyncSet and Deployable #10

Open
gyliu513 opened this issue Oct 16, 2019 · 1 comment
Open

Need to check the difference between SyncSet and Deployable #10

gyliu513 opened this issue Oct 16, 2019 · 1 comment
Assignees

Comments

@gyliu513
Copy link
Contributor

gyliu513 commented Oct 16, 2019

@kuanf can you help check the difference between SyncSet and Deployable?

The SyncSet is a concept in Hive which is very similar with Deployable, here is the document https://github.com/openshift/hive/blob/master/docs/syncset.md

A sample SyncSet is as follows:

---
apiVersion: hive.openshift.io/v1alpha1
kind: SyncSet
metadata:
  name: mygroup
spec:
  clusterDeploymentRefs:
  - name: ClusterName

  resourceApplyMode: Upsert

  resources:
  - apiVersion: user.openshift.io/v1
    kind: Group
    metadata:
      name: mygroup
    users:
    - myuser

  patches:
  - kind: ConfigMap
    apiVersion: v1
    name: foo
    namespace: default
    applyMode: AlwaysApply
    patch: |-
      { "data": { "foo": "new-bar" } }
    patchType: merge

The SyncSet can not only distribute resources to different clusters, but also patch resources in different clusters.

FYI @mdelder @clyang82

@gyliu513 gyliu513 changed the title Need to check the different between SyncSet and Deployable Need to check the difference between SyncSet and Deployable Oct 16, 2019
@kuanf
Copy link
Contributor

kuanf commented Oct 17, 2019

At very high level, they share very similar objective: facilitate resource management in managed clusters. I guess we all acknowledge the needs of having a resource sitting in one k8s without being executed by that k8s.
In practice, they’re quite different.

  • clustering model. sync set introduces clusterdeployment. clusterdeployment must sit with syncset in samenamespace. with that, I can image many clusterdeployment resource are created in user’s workspace and some of them may point to same cluster. In that case, it might not be easy to have a overview of all resources go to same cluster across namespaces.
    Deployable is leveraging clusterregistry and have only 1 cluster object for each cluster in cluster namespace. and user don’t put resource to cluster namespace themselves, but modify spec.placement to let controller create copy there.
  • syncset/selectorsyncset accommodate more than 1 resource in 1 object, deployable only has 1.
  • deployable has a spec.dependency to describe (createIfNotExist) relationship for this deployable to others, and other user can also leverage this field
  • status. I didn’t find any thing in syncset status https://github.com/openshift/hive/blob/master/pkg/apis/hive/v1alpha1/syncset_types.go#L223. while deployable aggregates the status back to hub cluster.
    https://github.com/IBM/multicloud-operators-deployable/blob/master/pkg/apis/app/v1alpha1/deployable_types.go#L123
  • deployable resource is very easy to interact with kubefed as you can find the placement and override section are the same. (placement is enhanced with a placementref in deployable).

@kuanf kuanf self-assigned this Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants